Global SkinMngr:tSkinManager = tSkinManager.Create() 

Type tSkinManager
	Field Array:tImageSkin[] 
	Field SkinsFolder:String[] 
	
	Function Create:tSkinManager() 
		Local this:tSkinManager = New tSkinManager
		this.init() 
		Return this
	End Function
	
	Method reset() 
		Self.Array = Self.Array[0..0] 
		Self.SkinsFolder = Self.SkinsFolder[0..0] 
	End Method
	
	Method add(imgskin:tImageSkin) 
		Self.Array = Self.Array[0..Self.Array.Length + 1] 
		Self.Array[Self.Array.Length-1] = imgskin
	End Method
	
	Method init() 
		Local dirStream:Int
		dirStream = ReadDir("Style\") 
		Local file:String
		Repeat
	       file = NextFile(dirStream) 
           If (file) And (file <> ".") And (file <> "..") 
			  Local fullPath:String = RealPath("Style\" + file) 
	 		  If FileType(fullPath) = FILETYPE_DIR
				   	 Self.SkinsFolder = Self.SkinsFolder[0..Self.SkinsFolder.Length + 1] 
					 Self.SkinsFolder[Self.SkinsFolder.Length - 1] = file
					 
			  EndIf
      	   End If
        Until (file = Null) 
	End Method
	
	Method update(folder:String) 
		DebugLog folder
		For Local i:Int = 0 To Self.Array.Length - 1
   		 	Local img:TImage = LoadImage("Style\" + folder + "\" + Self.Array[i].filename, DYNAMICIMAGE) 
		 	Local immagine:TImage = Self.Array[i].image
			DebugLog Self.Array[i].filename
			If(immagine.WIDTH < img.WIDTH) Then immagine.WIDTH = img.WIDTH
			If(immagine.HEIGHT < img.HEIGHT) Then immagine.HEIGHT = img.HEIGHT
			immagine.flags = img.flags
			immagine.mask_r = img.mask_r
			immagine.mask_g = img.mask_g
			immagine.mask_b = img.mask_b
			immagine.pixmaps = img.pixmaps
			immagine.frames = img.frames
			immagine.seqs = img.seqs
        	'immagine.handle_x = img.handle_x
        	'immagine.handle_y = img.handle_y
		Next
		ProgMngr.PauseAlpha = 0.9
		ProgMngr.Mouse.status = 1
		'Self.reset() 
		'Self.init() 
		Style = folder
	End Method
End Type

Type tImageSkin
	Field image:TImage
	Field filename:String
	Function Create:tImageSkin(path:String) 
		Local imageSkin:tImageSkin = New tImageSkin
		imageSkin.image = LoadImage(path) 
		imageSkin.filename = StripDir(path) 
		Return imageSkin
	End Function

End Type


Function loadImageSkin:tImage(path:String) 
 	Local imageSkin:tImageSkin = tImageSkin.Create(path) 
			SkinMngr.add(imageSkin) 
	Return imageSkin.image
End Function



Global IMG_BG1:Int = 1

Global IMG_LineA:TImage = loadImageSkin("Style\" + Style + "\LineA.png") 
Global IMG_LineB:TImage = loadImageSkin("Style\" + Style + "\LineB.png") 
Global IMG_VLine:TImage = loadImageSkin("Style\" + Style + "\Vline.png") 

Global IMG_logo:TImage = loadImageSkin("Style\" + Style + "\logo.png") 

Global IMG_optionsBG:TImage = loadImageSkin("Style\" + Style + "\OptionsBG.png") 

Global IMG_Intro  :TImage=GUI.LoadTImage("Intro.png")

Global IMG_bgSlider    :TImage=GUI.LoadTImage("bgSlider.png")
Global IMG_ScrollBG    :TImage=GUI.LoadTImage("scroll.png")
Global IMG_ScrollBall  :TImage=GUI.LoadTImage("scrollBall.png")
Global IMG_Field       :TImage[3]
Global IMG_FieldO      :TImage[3]
       IMG_Field[0] = loadImageSkin("Style\" + Style + "\field.png") 
       IMG_FieldO[0] = loadImageSkin("Style\" + Style + "\fieldO.png") 
       IMG_Field[1] = loadImageSkin("Style\" + Style + "\fieldS.png") 
       IMG_FieldO[1] = loadImageSkin("Style\" + Style + "\fieldSO.png") 
       IMG_Field[2] = loadImageSkin("Style\" + Style + "\fieldL.png") 
       IMG_FieldO[2] = loadImageSkin("Style\" + Style + "\fieldLO.png") 
	   
Global IMG_TitleBG:TImage = loadImageSkin("Style\" + Style + "\Title.png") 
Global IMG_FormBG:TImage = loadImageSkin("Style\" + Style + "\shade1.png") 
Global IMG_FormBG1:TImage = loadImageSkin("Style\" + Style + "\shade2.png") 
Global IMG_FormBGExtras:TImage = loadImageSkin("Style\" + Style + "\ExtrasBarr.png") 

Global IMG_FormBG2:TImage = loadImageSkin("Style\" + Style + "\shade3.png") 
Global IMG_FormBG2A:TImage = loadImageSkin("Style\" + Style + "\shadeProp.png") 

Global IMG_FormBGExtrasFileBG:TImage = loadImageSkin("Style\" + Style + "\ExtrasFileBarr.png") 

Global IMG_TypeBarr0:TImage = loadImageSkin("Style\" + Style + "\tMngrBar.png") 
Global IMG_TypeBarr1:TImage = loadImageSkin("Style\" + Style + "\tMngrBarO.png") 
Global IMG_TypeBG:TImage = loadImageSkin("Style\" + Style + "\tMngrSubBG.png") 
Global IMG_TypeSelect:TImage = loadImageSkin("Style\" + Style + "\BGType.png") 
Global IMG_TypeSelectO:TImage = loadImageSkin("Style\" + Style + "\BGTypeO.png") 
Global IMG_TypeSubBarr:TImage = loadImageSkin("Style\" + Style + "\tMngrSubBar.png") 
Global IMG_TypeSubBarrN:TImage = loadImageSkin("Style\" + Style + "\tMngrSubBarNew.png") 
Global IMG_TypeNew:TImage = loadImageSkin("Style\" + Style + "\newType.png") 
Global IMG_TypeNewO:TImage = loadImageSkin("Style\" + Style + "\newTypeO.png") 

Global IMG_TypeBarrSmall:TImage = loadImageSkin("Style\" + Style + "\tMngrMBar.png") 

Global IMG_ToolTypeI:TImage = loadImageSkin("Style\" + Style + "\Tool_TypI.png") 
Global IMG_ToolTypeIO:TImage = loadImageSkin("Style\" + Style + "\Tool_TypIO.png") 
Global IMG_Slider:TImage = loadImageSkin("Style\" + Style + "\sliderBG.png") 
'Global IMG_SliderLIST  :TImage=LoadImage("Style\"+Style+"\ListBG.png")
Global IMG_SliderLISTO:TImage = loadImageSkin("Style\" + Style + "\vetro.png") 

Global IMG_TndG:TImage = loadImageSkin("Style\" + Style + "\TndBG.png") 
Global IMG_Ico_arrow0:TImage = loadImageSkin("Style\" + Style + "\ico_up.png") 
Global IMG_Ico_arrow1:TImage = loadImageSkin("Style\" + Style + "\ico_down.png") 


Global IMG_eye:tImage[2] 
	   IMG_eye:TImage[0] = loadImageSkin("Style\" + Style + "\eye.png") 
	   IMG_eye:TImage[1] = loadImageSkin("Style\" + Style + "\eyeO.png") 
	  
Global IMG_lock:tImage[2] 
	   IMG_lock:TImage[0] = loadImageSkin("Style\" + Style + "\lock.png") 
	   IMG_lock:TImage[1] = loadImageSkin("Style\" + Style + "\lockO.png") 
	   
	   
Global IMG_tempBG:TImage = loadImageSkin("Style\" + Style + "\barrBG.PNG") 
Global IMG_temp:TImage = loadImageSkin("Style\" + Style + "\tempBarr.png") 
Global IMG_temp1:TImage = loadImageSkin("Style\" + Style + "\tempBarr1.png") 

Global IMG_P_S:TImage = loadImageSkin("Style\" + Style + "\P_S.png") 
Global IMG_P_SO:TImage = loadImageSkin("Style\" + Style + "\P_SO.png") 
Global IMG_P_SO1:TImage = loadImageSkin("Style\" + Style + "\P_SO1.png") 

Global IMG_BrushBG:TImage = loadImageSkin("Style\" + Style + "\brushBG.png") 

Global IMG_LbarBG:TImage = loadImageSkin("Style\" + Style + "\LbarBG.png") 

Global IMG_TfUp:TImage[2] 
	   IMG_TfUp[0] = loadImageSkin("Style\" + Style + "\TfUp.png") 
       IMG_TfUp[1] = loadImageSkin("Style\" + Style + "\TfUpO.png") 

Global IMG_FrameIcon:TImage = loadImageSkin("Style\" + Style + "\FormIcons.png") 
Global IMG_FrameIconO:TImage[4]
       IMG_FrameIconO[0] = loadImageSkin("Style\" + Style + "\FormIcon0.png") 
       IMG_FrameIconO[1] = loadImageSkin("Style\" + Style + "\FormIcon1.png") 
	   IMG_FrameIconO[2] = loadImageSkin("Style\" + Style + "\FormIcon2.png") 
	   IMG_FrameIconO[3] = loadImageSkin("Style\" + Style + "\FormIcon3.png") 
	    
Global IMG_FormMode:TImage[2] 
       IMG_FormMode[0] = loadImageSkin("Style\" + Style + "\formMode0.png") 
       IMG_FormMode[1] = loadImageSkin("Style\" + Style + "\formMode1.png") 
	 
Global IMG_option:tImage = loadImageSkin("Style\" + Style + "\option.png") 
	   
Global IMG_List:TImage[7]
       IMG_List[0] = loadImageSkin("Style\" + Style + "\ListIco0.png") 
	   IMG_List[1] = loadImageSkin("Style\" + Style + "\ListIco1.png") 
	   IMG_List[2] = loadImageSkin("Style\" + Style + "\ListIco2.png") 
	   IMG_List[4] = loadImageSkin("Style\" + Style + "\ListIco4.png") 

Global IMG_PROP:TImage = loadImageSkin("Style\" + Style + "\bProp.png") 

Global IMG_Thumb:TImage = loadImageSkin("Style\" + Style + "\thumb.png") 

Global IMG_DragForm    :TImage=GUI.LoadTImage("dragForm.png")

Global IMG_Wait        :TImage=GUI.LoadTImage("wait.png")

Global IMG_PopUpBG:TImage = loadImageSkin("Style\" + Style + "\PopUpBG.png") 
Global IMG_PopUpNewBG:TImage = loadImageSkin("Style\" + Style + "\PopUpNewBG.png") 



Global IMG_PointS:TImage = GUI.LoadTImage("PoS.png") 


Global BT_Yes:GUI_buttonIMG = GUI_buttonIMG.create("B_yes.png","B_yesO.png") 
Global BT_No:GUI_buttonIMG = GUI_buttonIMG.create("B_no.png","B_noO.png") 


Global GRP_Tile:GUI_buttonIMG = GUI_buttonIMG.create("Grph1.png", "Grph1O.png") 
Global GRP_BG:TImage = loadImageSkin("Style\" + Style + "\contBG.png") 
Global GRP_Arrow:TImage = loadImageSkin("Style\" + Style + "\arrow.png") 

Global IMG_imodeBG:TImage = loadImageSkin("Style\" + Style + "\imodeBG.png") 

Global IMG_scaleY:TImage = loadImageSkin("Style\" + Style + "\scaleY.png") 

Global ButtonBrowser:GUI_buttonIMG = GUI_buttonIMG.Create("browser.png", "browserO.png") 

GRP_Arrow.handle_x = 12
GRP_Arrow.handle_y = 15
'Global GRP_Tile:TImage = LoadImage("Style\" + Style + "\Grph1.png") 
'Global GRP_TileOn:TImage = LoadImage("Style\" + Style + "\Grph1O.png") 

Global IMG_DIR:GUI_buttonIMG = GUI_buttonIMG.Create("dir.png", "dirO.png") 


Global _NewInputText:GUI_inputText = GUI_inputText.Create("*NAME*") 
Global _NewInputType:GUI_Select = GUI_Select.Create("*TYPE*", Null) 
Global _NewInputVal:GUI_inputText = GUI_inputText.Create("*DEFAULT*") 

Global _InputAsk:GUI_inputText = GUI_inputText.Create("ENTITY") 
Global _InputMesh:GUI_inputText = GUI_inputText.Create("MESHNAME") 


Global _ButtonSrc:GUI_buttonIMG = GUI_buttonIMG.Create("browser.png", "browserO.png") 
Global _ButtonEdit:GUI_buttonIMG = GUI_buttonIMG.Create("modify.png", "modifyO.png") 
Global _ButtonReload:GUI_buttonIMG = GUI_buttonIMG.Create("reload.png", "reloadO.png") 

Global _InputMeshField_MESH:GUI_inputText = GUI_inputText.Create("MESH") 
Global _InputMeshField_X:GUI_inputText = GUI_inputText.Create("X") 
Global _InputMeshField_Y:GUI_inputText = GUI_inputText.Create("Y") 
Global _InputMeshField_Z:GUI_inputText = GUI_inputText.Create("Z") 
Global _InputMeshField_AX:GUI_inputText = GUI_inputText.Create("AX") 
Global _InputMeshField_AY:GUI_inputText = GUI_inputText.Create("AY") 
Global _InputMeshField_AZ:GUI_inputText = GUI_inputText.Create("AZ") 
Global _InputMeshField_SX:GUI_inputText = GUI_inputText.Create("SX") 
Global _InputMeshField_SY:GUI_inputText = GUI_inputText.Create("SY") 
Global _InputMeshField_SZ:GUI_inputText = GUI_inputText.Create("SZ") 

Global IMG_MESHstr:tImage = loadImageSkin("Style\" + Style + "\meshstr.png") ;

'CANCELLA----
'Global TEMP_MEDIA      :TImage=LoadImage("Style\"+Style+"\TEMPMEDIA.png")
'------------------
Global IMG_W         :TImage[2]
       IMG_W[0] = loadImageSkin("Style\" + Style + "\WOff.png") 
       IMG_W[1] = loadImageSkin("Style\" + Style + "\WOn.png") 

Global GUI_COLOR:Int[3]
       GUI_COLOR[0] = settingsGUI.getNumber("gui_color_red")   '255
	   GUI_COLOR[1] = settingsGUI.getNumber("gui_color_green")    '255
	   GUI_COLOR[2] = settingsGUI.getNumber("gui_color_blue")   '255
	   
Global GUI_COLOR_SelMesh:Int[] = settingsGUI.getNumberArray("gui_color_SelectedMesh")  '[50,50,255]
Global GUI_COLOR_BG1:Int[] = settingsGUI.getNumberArray("gui_color_BackGround_1")   '[45,62,94]

Global GUI_COLOR_ARROW_1:Int[] = settingsGUI.getNumberArray("gui_color_arrow_1") 
Global GUI_COLOR_ARROW_2:Int[] = settingsGUI.getNumberArray("gui_color_arrow_2") 
Global GUI_COLOR_ARROW_3:Int[] = settingsGUI.getNumberArray("gui_color_arrow_3") 
Global GUI_COLOR_ARROW_TEXT:Int[] = settingsGUI.getNumberArray("gui_color_arrow_text") 


'----------
'OPTIONS
'----------
Global GUI_OPT_styleSelect:GUI_Select = GUI_Select.Create(Style, SkinMngr.SkinsFolder) 
Global GUI_OPT_languageSelect:GUI_Select = GUI_Select.Create(S_Language, SkinMngr.SkinsFolder) 




Function DrawImageColor(im:TImage,x:Int,y:Int)
    If(GUI_COLOR[0]>250 And GUI_COLOR[1]>250 And GUI_COLOR[2]>250 )
	Else
	 SetColor GUI_COLOR[0],GUI_COLOR[1],GUI_COLOR[2]

	EndIf
    'SetBlend MASKBLEND+ALPHABLEND
	DrawImage im,x,y
End Function

Function GUI_openFileSelector:String(title:String,format:String,save:Int,path:String)
     Return RequestFile(title,format,save,path)
End Function


Global RoundRect:GUI_RndRect = GUI_RndRect.Create() 

Type GUI_RndRect
	Field IMG:TImage[] 
	
	Function Create:GUI_RndRect() 
		Local this:GUI_RndRect = New GUI_RndRect
			this.IMG = New TImage[9] 
			this.IMG[0] = loadImageSkin("Style\" + Style + "\rd_UpSx.png") 
			this.IMG[1] = loadImageSkin("Style\" + Style + "\rd_UpCx.png") 
			this.IMG[2] = loadImageSkin("Style\" + Style + "\rd_UpDx.png") 
			this.IMG[3] = loadImageSkin("Style\" + Style + "\rd_CxSx.png") 
			this.IMG[4] = loadImageSkin("Style\" + Style + "\rd_CxCx.png") 
			this.IMG[5] = loadImageSkin("Style\" + Style + "\rd_CxDx.png") 
			this.IMG[6] = loadImageSkin("Style\" + Style + "\rd_DnSx.png") 
			this.IMG[7] = loadImageSkin("Style\" + Style + "\rd_DnCx.png") 
			this.IMG[8] = loadImageSkin("Style\" + Style + "\rd_DnDx.png") 
		Return this
	End Function
	
	Method Draw(x:Int, y:Int, w:Int, h:Int) 
	
		If(W > (Self.IMG[0].width + Self.IMG[2].width)) 
			Self.IMG[1].width = W - (Self.IMG[0].width + Self.IMG[2].width) 
			Self.IMG[4].width = W - (Self.IMG[0].width + Self.IMG[2].width) 
			Self.IMG[7].width = W - (Self.IMG[0].width + Self.IMG[2].width) 
		EndIf
		If(H > (Self.IMG[0].height + Self.IMG[6].height)) 
			Self.IMG[3].height = H - (Self.IMG[0].height + Self.IMG[6].height) 
			Self.IMG[4].height = H - (Self.IMG[0].height + Self.IMG[6].height) 
			Self.IMG[5].height = H - (Self.IMG[0].height + Self.IMG[6].height) 
		EndIf
				
		DrawImage(Self.IMG[0] , x, y) 
		DrawImage(Self.IMG[1] , x + Self.IMG[0].width, y) 
		DrawImage(Self.IMG[2] , x + Self.IMG[0].width + Self.IMG[1].width, y) 
		
		DrawImage(Self.IMG[3] , x, y + Self.IMG[0].height) 
		DrawImage(Self.IMG[4] , x + Self.IMG[0].width, y + Self.IMG[0].height) 
		DrawImage(Self.IMG[5] , x + Self.IMG[0].width + Self.IMG[1].width, y + Self.IMG[0].height) 

		DrawImage(Self.IMG[6] , x, y + Self.IMG[0].height + Self.IMG[3].height) 
		DrawImage(Self.IMG[7] , x + Self.IMG[0].width, y + Self.IMG[0].height + Self.IMG[3].height) 
		DrawImage(Self.IMG[8] , x + Self.IMG[0].width + Self.IMG[1].width, y + Self.IMG[0].height + Self.IMG[3].height) 
	
	EndMethod
End Type


Type GUI
	Function LoadTImage:tImage(filename:String) 
	  Local img:TImage = loadImageSkin("Style\" + Style + "\" + filename) 
	   img.handle_x= img.width/2
	   img.handle_y= img.height/2	

	   Return img
    EndFunction 	

	
	
End Type

Type GUI_Help
	Field x:Int,y:Int
	Field Text:String
	Field OldText:String
	Field Lang:String
	Field Frasi:TMap
	Field folders:String[] 
	
	
	Method SetText(t:String)
	   
		Text=String(GUI_Help_Text(Frasi.ValueForKey(Lang)).Frasi.ValueForKey(t.ToLower()))		
	End Method
	
	Method getText:String(t:String) 
		Return String(GUI_Help_Text(Frasi.ValueForKey(Lang)).Frasi.ValueForKey(t.ToLower())) 
	End Method
	
	Method Draw()
		DrawText "HELP: "+Text,x,y
	End Method
	
	Method addFolder(name:String) 
		Self.folders = Self.folders[0..Self.folders.Length + 1] 
		Self.folders[Self.folders.Length - 1] = name
	End Method
End Type

Type GUI_Help_Text
    Field Variabili:TMap
	Field Frasi:TMap
	Field MbLeft:String,MbRight:String
	
	Function create:GUI_Help_Text(fileName:String)
		Local this:GUI_Help_Text= New GUI_Help_Text
		 this.Frasi = New TMap
		 this.Variabili = New TMap
		 this.loadFile(filename) 
		Return this
	End Function
		
	Method loadFile(fileName:String) 
		Local file:TStream = ReadFile(filename) 
   		 If(file) 
		   DebugLog "____________________ LANG: "+filename+"__________"
       	   Local count:Int = 0
       	   While Not Eof(file) 
	        Self._addLine(Trim(ReadLine(file))) 
	        count = count + 1
           Wend
           CloseFile(file) 
         EndIf
	End Method
	Method _addLine(line:String)
		If(Mid(line,1,1)="*")
		  Local tokens:String[] = _parseLine(line)
		  If(tokens.Length>1)
		   Variabili.Insert(tokens[0] , tokens[1] ) 
		   DebugLog "[VAR]<------"+tokens[0]+ "  <- "+tokens[1]
	      EndIf		  
		Else
		  Local tokens:String[] = _parseLine(line)
		  If(tokens.Length>1)
		    Local frase:String = tokens[1]
		    For Local vkey:String = EachIn Variabili.Keys()
				If(frase.Contains(vkey))
				  frase=frase.Replace(vkey,String(Variabili.ValueForKey(vkey)))
				EndIf
			Next
		   DebugLog "<------"+tokens[0]+ "  <- "+frase
		   Frasi.Insert(tokens[0],frase)
	      EndIf	
		EndIf
	End Method
		 
		 
	Method _parseLine:String[](line:String)
	    Local result:String[2]
		Local tokens:String[]=line.split("=")
	   If(line.Length>2)
		If(tokens.Length>1)
		  result[0]=tokens[0].ToLower().Trim();
		  result[1]=tokens[1].Trim();
		Else
		  RuntimeError("LANGUAGE FILE ERROR: "+line +" contains errors")
		EndIf  
	   EndIf
		Return result
	End Method
End Type


Global ContentHelp:GUI_Help = New GUI_Help
       ContentHelp.x=10
	   ContentHelp.y=ScreenY-20
	   ContentHelp.Lang=S_Language.ToUpper()
	   ContentHelp.Frasi = New TMap
	   
	   
	   'Local languages:TMap = New TMap
	   Local rootFolder:String = "Data\Language\"
	   Local folder:Int=ReadDir(rootFolder)
       Local file:String    
	   DebugLog "----------LANGUAGES---------"
       Repeat
        file=NextFile(folder)
        If (file) And (file <> ".") And (file <> "..")
            Local fullPath:String=RealPath(rootFolder+"\"+file)
            If FileType(fullPath)=FILETYPE_DIR
            Else
				If(Instr(fullPath,".edl"))
				   DebugLog file.Replace(".edl","")
				   'languages.Insert(file.Replace(".edl",""),GUI_Help_Text.create(rootFolder+"/"+file))
				   ContentHelp.Frasi.Insert((file.Replace(".edl","").ToUpper()),GUI_Help_Text.create(rootFolder+"/"+file))
			       
				   ContentHelp.addFolder((file.Replace(".edl", "").ToUpper())) 
				EndIf
            End If
        End If

       Until (file=Null)
	   DebugLog "____________________________"
	   

	  

	   
Type tAltManager	   
  Field AltText:String[]=Null
  Field AltTextOLD:String[]=Null
  Field AltX:Int=0;
  Field AltY:Int=0;
  
  Field Alpha:Float=0.0;

  Method setText(lines:String[],x:Int,y:Int)
     AltText=lines
	 AltX=x
	 AltY=y
	 'DebugLog ":::::::"
  End Method

  Method draw()
    Local ox:Int = 20
	Local oy:Int = 20
	Local dx:Int = ox+3
	Local dy:Int = ox+3
	
	If(checkOldText(AltText))
	   If(alpha<0.8) Then alpha=alpha+0.01
	Else
	   'Debuglog "___OO___"
	   alpha=0
	EndIf
    If(altText<>Null)
	
	 SetAlpha alpha
	 SetColor 255,255,100
	     'larghezza ALTRect
		 Local hh:Int =0
	 	 Local ww:Int =0
	 	 For Local i:Int = 0 To altText.Length-1
		 	If(TextWidth(altText[i])>ww) Then ww=TextWidth(altText[i])
			hh=hh+12
		 Next
	 If(AltX + ox + ww + 5 >= ScreenX) Then AltX = (ScreenX - ox - ww - 5) 
	 DrawRect AltX + ox, AltY + ox, ww + 5, hh + 5
	 
	 SetColor 0,0,0
	 For Local i:Int = 0 To altText.Length-1
	 	DrawText trim(altText[i]),AltX+dx,altY+dy+i*12
	 Next
	 
	 setOldText(AltText)
	 AltText=Null
	 
	 SetAlpha 1
	 SetColor 255,255,255
	EndIf	 
  End Method
  
  Method setOldText(AltText:String[])
      AltTextOLD=Null
  	  For Local i:Int = 0 To altText.Length-1
	 	AltTextOLD=AltTextOLD[0..AltTextOLD.Length+1]
		AltTextOLD[AltTextOLD.Length-1]=AltText[i]
	  Next
  End Method
  
  Method checkOldText:Int(AltText:String[])
      Local result:Int=True
	   If(AltText.Length=AltTextOLD.Length)
  	    For Local i:Int = 0 To altText.Length-1
	     ' DebugLog AltText[i]+"<---->"+AltTextOLD[i]
	 	  If(AltText[i]<>AltTextOLD[i]) Then result = False
	    Next
	   Else
	    result=False
	   EndIf
	  Return result
  End Method
  
End Type

Global AltMngr:tAltManager = New tAltManager 






	   rem
	   Local Italiano:GUI_Help_Text=New GUI_Help_Text

	     Italiano.Frasi=New TMap
		 Italiano.MbLeft="il tasto sinistro del mouse"
		 Italiano.MbRight="il tasto destro del mouse"
	     Italiano.Frasi.Insert("Center","Premi "+Italiano.MbLeft+" per trascinare la TrackBall, Premi "+Italiano.MbRight+" perpassare dalla modalità 3D a 2D e viceversa.")
		 Italiano.Frasi.Insert("OpenType","Clicca con "+Italiano.MbLeft+" sul Type per mostrare o nascondere il suo contenuto ")
		 Italiano.Frasi.Insert("DeleteType","Clicca con "+Italiano.MbLeft+" sul bottone per cancellare il Type")
	     Italiano.Frasi.Insert("ViewType","Clicca con "+Italiano.MbLeft+" sul bottone per aggiungere il Type nella lista degli oggetti inseribili nella scena")
	     Italiano.Frasi.Insert("SelectType","Clicca con "+Italiano.MbLeft+" sul tipo per assegnarlo al Field selezionato")
		 Italiano.Frasi.Insert("DeleteField","Clicca con "+Italiano.MbLeft+" sul bottone per eliminare il Field")
		 Italiano.Frasi.Insert("NewField","Clicca con "+Italiano.MbLeft+" sul bottone per creare un nuovo Field")
	   
	     Italiano.Frasi.Insert("NewType","Clicca con "+Italiano.MbLeft+" sul bottone per creare un nuovo Type")
	     
		 Italiano.Frasi.Insert("NewTypeSet","Clicca con "+Italiano.MbLeft+" sul bottone per creare un nuovo 'TypeSET', sostituendo quello attuale")
		 Italiano.Frasi.Insert("LoadTypeSet","Clicca con "+Italiano.MbLeft+" sul bottone per caricare 'TypeSET' precedentemente salvato, sostituendo quello attuale")
		 Italiano.Frasi.Insert("SaveTypeSet","Clicca con "+Italiano.MbLeft+" sul bottone per salvare il 'TypeSET' attuale, sul file attuale")
		 Italiano.Frasi.Insert("SaveASTypeSet","Clicca con "+Italiano.MbLeft+" sul bottone per salvare il 'TypeSET' attuale su un file a discrezione")
		 Italiano.Frasi.Insert("DefaultTypeSet","Clicca con "+Italiano.MbLeft+" sul bottone per settare il 'TypeSET' attuale come di default")
		 
		 Italiano.Frasi.Insert("NewMedia","Clicca con "+Italiano.MbLeft+" sul bottone per settare inserire un nuovo Media dal file selezionato")
		 Italiano.Frasi.Insert("SrcMedia","Clicca con "+Italiano.MbLeft+" sul bottone per selezionare il file da caricare nel 'MediaSET'")
		 Italiano.Frasi.Insert("OnMedia","Clicca con "+Italiano.MbLeft+" sul bottone Media, per poterlo visionare in Thumbnails e modificarne le proprietà")
		 
		 
		 Italiano.Frasi.Insert("InsertObject", "Clicca con " + Italiano.MbLeft + " sul bottone, per Aprire / Chiudere il pannello di inserimento oggetti nella scena") 
		 Italiano.Frasi.Insert("ListObject","Clicca con "+Italiano.MbLeft+" sul bottone, per Aprire / Chiudere la lista degli oggetti inseriti nella scena")
	     Italiano.Frasi.Insert("PropObject","Clicca con "+Italiano.MbLeft+" sul bottone, per Aprire / Chiudere il pannello di gestione delle proprietà degli oggetti selezionati")
		 
		 
		 Italiano.Frasi.Insert("ScrollTool","Premi" + Italiano.MbLeft + " per muovere verticalmente il contenuto della ToolBarr") 
		 Italiano.Frasi.Insert("InsertInstance", "Clicca con " + Italiano.MbLeft + " sul bottone per inserire un istanza dell'oggetto all'interno della scena") 
		 Italiano.Frasi.Insert("SeselectAll", "Clicca con " + Italiano.MbLeft + " sul bottone per deselezionare tutti le istanze presenti in scena") 
		 Italiano.Frasi.Insert("SelectAll", "Clicca con " + Italiano.MbLeft + " sul bottone per selezionare tutti le istanze presenti in scena") 
		 Italiano.Frasi.Insert("DeleteInstance", "Clicca con " + Italiano.MbLeft + " sul bottone cancellare l'istanza/e selezionate") 
		 
	
		 
	   ContentHelp.Frasi=New TMap
	   ContentHelp.Frasi.Insert("ITA",Italiano)
	   	endrem 
	   
	   
