#notrayicon #include-once #include #include #include #include #include #include #include #include #include #include "_Funcs.au3" #RequireAdmin ;~ ConsoleWrite(@lf&"it's on...") ;~ #include #Region Options Opt('MustDeclareVars', 1) ; 1 = Variables must be pre-declared ;~ Opt('PixelCoordMode' ,0 ) ; 0 = relative coords to the defined window Opt("MouseCoordMode", 0) ; Maus-Koordinaten relativ zum Fenster Opt("GUIOnEventMode", 1) ; Wechsle in den OnEvent Modus #EndRegion #Region ;Hauptprogramm _GDIPlus_Startup() _Init() _Load_INI() _CreateSet_GUI() While 1=1 ;True Sleep(1000) WEnd #EndRegion ;Ende Hauptprogramm Func _Init() Global Const $SC_Frame_Thickness = 3 Global Const $SC_Avatar_Pos[10][4] = [ _ ;PosX, PosY für classic und modern der 10 Positionen [478, 69, 459, 34], _ [651, 124, 596, 65], _ [693, 218, 678, 180], _ [646, 369, 596, 302], _ [458, 394, 433, 331], _ [216, 394, 263, 331], _ [ 41, 352, 100, 302], _ [ 5, 223, 18, 180], _ [ 47, 103, 100, 65], _ [222, 69, 237, 34] _ ] Global Const $SC_Dealer_Pos[10][4] = [ _ ;PosX_DealerBtn, PosY_DealerBtn der 10 Positionen [545, 124, 442, 120], _ [639, 172, 573, 132], _ [665, 260, 650, 188], _ [608, 344, 558, 305], _ [438, 354, 425, 312], _ [233, 347, 349, 312], _ [135, 298, 212, 305], _ [120, 216, 125, 190], _ [203, 140, 205, 133], _ [318, 154, 335, 120] _ ] Global Const $SC_Flash_Pos[10][6] = [ _ ;PosX_Arrow, PosY_Arrow, PosX_Flash, PosY_Flash, Width_Flash, Height_Flash der 10 Positionen [495, 110, 407, 98, 163, 101], _ [620, 130, 474, 127, 190, 80], _ [680, 210, 507, 182, 174, 81], _ [660, 330, 474, 241, 192, 80], _ [570, 385, 406, 250, 164, 98], _ [325, 385, 227, 264, 166, 84], _ [170, 360, 134, 244, 198, 81], _ [115, 275, 120, 180, 149, 85], _ [150, 155, 140, 124, 197, 82], _ [245, 110, 236, 104, 148, 79] _ ] Global Const $SC_ClassicCard_Pos[10][2] = [ _ ;PosX_HoleCard1, PosY_HoleCard1 der 10 Positionen für Classic Layout [510, 106], _ [610, 147], _ [665, 227], _ [629, 326], _ [494, 347], _ [258, 344], _ [141, 318], _ [108, 239], _ [168, 145], _ [261, 106] _ ] Global Const $SC_ClassicModern_Dim [6][4] = [ _ ;0-classic Width ,classic Height , 2-modern Width, 3-modern Height ; ID [796,579,800,566], _ ; 0 ;SkinChanger Width/Height [ 26, 0, 29, 26], _ ; 1 ;Titlebar/Footer Height [ 20, 26, 29, 40], _ ; 2 ;CardBacks Holecards [ 57, 77, 58, 82], _ ; 3 ;Cards und eigene Karten [ 5,309, 3,294], _ ; 4 ;Abstand Chips beim Stapeln [167,311,112,296] _ ; 5 ;Abstand Schrift Pot von oben für beide Pot-Anzeigen ] ; enhält Namen zu allen Bildern, die für modern&classic gelten - das heißt nicht das diese immer im gleichen Ordner liegen! Manchmal verschiedene Ordner - 0-Layout, 1-Karten, 2-Kartenrücken ;enhält Pfade/Namen zu allen Bildern, die für modern gelten - 0-Layout, 1-Karten, 2-Kartenrücken, 3-Frames, 4-Arrows Global Const $Arr_Filenames_Layouts[4][3] = [ _ ;Dir, Name, ; ID [0, "Carpet.jpg", "Table_Carpet.jpg"], _ ; 0 [0, "ppicon.ico", "pp-logo.png"], _ ; 1 [0, "DealerControl.gif", "DealerControl.png"], _ ; 2 [0, "OpenTable.png", "OpenTable.png"] _ ; 3 ] Global Const $Arr_Filenames_Chips[16][3] = [ _ ;Dir, Name, ; ID [0, "d1000000.gif", "d1000000.png"], _ ; 0 [0, "d500000.gif", "d500000.png"], _ ; 1 [0, "d100000.gif", "d100000.png"], _ ; 2 [0, "d25000.gif", "d25000.png"], _ ; 3 [0, "d5000.gif", "d5000.png"], _ ; 4 [0, "d1000.gif", "d1000.png"], _ ; 5 [0, "d500.gif", "d500.png"], _ ; 6 [0, "d100.gif", "d100.png"], _ ; 7 [0, "d25.gif", "d25.png"], _ ; 8 [0, "d5.gif", "d5.png"], _ ; 9 [0, "d1.gif", "d1.png"], _ ; 10 [0, "c50.gif", "c50.png"], _ ; 11 [0, "c25.gif", "c25.png"], _ ; 12 [0, "c10.gif", "c10.png"], _ ; 13 [0, "c5.gif", "c5.png"], _ ; 14 [0, "c1.gif", "c1.png"] _ ; 15 ] Global Const $Arr_Filenames_Arrows[10][3] = [ _ ;Dir, Name, ; ID [4, "0.png", "10_seat_flashlight_0.png"], _ ; 0 [4, "1.png", "10_seat_flashlight_1.png"], _ ; 1 [4, "2.png", "10_seat_flashlight_2.png"], _ ; 2 [4, "3.png", "10_seat_flashlight_3.png"], _ ; 3 [4, "4.png", "10_seat_flashlight_4.png"], _ ; 4 [4, "5.png", "10_seat_flashlight_5.png"], _ ; 5 [4, "6.png", "10_seat_flashlight_6.png"], _ ; 6 [4, "7.png", "10_seat_flashlight_7.png"], _ ; 7 [4, "8.png", "10_seat_flashlight_8.png"], _ ; 8 [4, "9.png", "10_seat_flashlight_9.png"] _ ; 9 ] Global Const $Arr_Filenames_Cards[1][2] = [ _ ;Dir, Name, ; ID [1, "cards.png"] _ ; 0 ] Global Const $Arr_Filenames_CardBacks[1][2] = [ _ ;Dir, Name, ; ID [2, "1_smallcard1.png"] _ ; 0 ] Global Const $Arr_Filenames_Frames[11][2] = [ _ ;Dir, Name, ; ID [3, "Newskin.png"], _ ; 0 [3, "but.png"], _ ; 1 [3, "btn_tile.png"], _ ; 2 [3, "btn_cascade.png"], _ ; 3 [3, "btn_defualt.png"], _ ; 4 [3, "btn_mt.png"], _ ; 5 [3, "btn_stack.png"], _ ; 6 [3, "bt_menu.png"], _ ; 7 [3, "footer-bg.jpg"], _ ; 8 [3, "header_black_tint.png"], _ ; 9 [3, "resize_button.png"] _ ; 10 ] Global Const $Arr_Filenames_Layouts_modern[14][2] = [ _ ;Dir, Name, ; ID [0, "Tabbed_MinBG.png"], _ ; 0 [0, "chat_icon_min.png"], _ ; 1 [0, "note_icon_min.png"], _ ; 2 [0, "rebuy_icon_min.png"], _ ; 3 [0, "deposit_icon_min.png"], _ ; 4 [0, "footericon_1.png"], _ ; 5 [0, "footericon_2.png"], _ ; 6 [0, "footericon_3.png"], _ ; 7 [0, "footericon_5.png"], _ ; 8 [0, "footericon_6.png"], _ ; 9 [0, "footericon_8.png"], _ ; 10 [0, "avatar.png"], _ ; 11 [0, "avatar_disabled.png"], _ ; 12 [0, "btn_divider.png"] _ ; 13 ] Global $i_Index_Layout = 100 Global $i_Index_Cards = 200 Global $i_Index_Arrow = 300 Global $i_Index_CardBacks = 400 Global $i_Index_Frame = 800 Global $i_Index_Btn = 900 Global Const $iID_Layouts = 0 Global Const $iID_Chips = UBound($Arr_Filenames_Layouts) Global Const $iID_Arrows = $iID_Chips + UBound($Arr_Filenames_Chips) Global Const $iID_Cards = $iID_Arrows + UBound($Arr_Filenames_Arrows) Global Const $iID_CardBacks = $iID_Cards + UBound($Arr_Filenames_Cards) Global Const $iID_Frames = $iID_CardBacks + UBound($Arr_Filenames_CardBacks) Global Const $iID_Layouts_modern = $iID_Frames + UBound($Arr_Filenames_Frames) Global Const $iFilenames_total = $iID_Layouts_modern + UBound($Arr_Filenames_Layouts_modern) Global $Arr_hImg[$iFilenames_total][3]; 0-Handle, 1-Breite, 2-Höhe Global Const $Str_Author = "JStaxton" Global $Str_Author_Layout Global Const $Str_CurrentSkinChangerVersion = "2.05" Global Const $Str_IniFile = ".\settings.ini" Global Const $Str_IniFile_Info_Layout = "info.ini" Global Const $Str_Modern = "modern" Global Const $Str_Classic = "classic" Global Const $Str_ImgClassic_rel = "\ClassicTable" Global Const $Str_ImgModern_rel = "\NewGameTable" Global Const $Str_ServerAdress = "http://download.erik-brenncke.de/SkinChanger/" Global Const $Str_ServerVersionFile = "CurrentVersion.txt" Global Const $Str_HdVersionFile = ".\CurrentVersion.txt" Global $Str_SkinFolder_rel = "Skins\" Global Const $Str_UpdateDir = "SkinChangerUpdate\" Global Const $Str_SkinIni = "Skins.ini" Global Const $Str_ImgLangDir_rel_us = "\en_US" Global Const $Str_ImgLangDir_rel_de = "\de_DE" Global Const $Str_PartyPokerExe = "PartyGaming.exe -P=PartyPoker" ;Achtung: diese liegt im PartyGaming-Verzeichnis Global Const $Str_StatusSpacer = " " Global Const $Str_StatusDefault = $Str_StatusSpacer & "" Global Const $Str_ShortcutsSpacer = " " Global Const $Str_Shortcuts = $Str_ShortcutsSpacer&"{UP}"&@TAB&@TAB&"- next Cards"&@LF& _ $Str_ShortcutsSpacer&"{DOWN}"&@TAB&"- previous Cards"&@LF& _ $Str_ShortcutsSpacer&"{LEFT}"&@TAB&@TAB&"- next Layout"&@LF& _ $Str_ShortcutsSpacer&"{RIGHT}"&@TAB&"- previous Layout"&@LF& _ $Str_ShortcutsSpacer&"{SPACE}"&@TAB&"- switch Modern/Classic"&@LF& _ $Str_ShortcutsSpacer&"{PGUP}"&@TAB&"- next Cardbacks"&@LF& _ $Str_ShortcutsSpacer&"{PGDN}"&@TAB&"- previous Cardbacks"&@LF& _ $Str_ShortcutsSpacer&"{HOME}"&@TAB&"- next Arrows"&@LF& _ $Str_ShortcutsSpacer&"{END}"&@TAB&@TAB&"- previous Arrows"&@LF Global Const $Str_SkinChangerTitle_short = "SkinChanger"; for PartyPoker" & $Str_StatusDefault; (V" & $Str_CurrentSkinChangerVersion & ") by " & $Str_Author Global Const $Str_SkinChangerTitle = "SkinChanger for PartyPoker" & " V" & $Str_CurrentSkinChangerVersion & " by " & $Str_Author; & " (BETA)" Global $Str_SelectedTableBool = 1 Global $hBmp_Buffer_LCF, $hBmp_Buffer_Frame, $hBmp_Buffer_Layout, $hBmp_Buffer_Avatare, $hBmp_Buffer_Labels, $hBmp_Buffer_Cards, $hBmp_Buffer_Chips Global $Str_SC_Title_Msg = $Str_SkinChangerTitle Global $Update_msg = "" Global $Str_ProcessName = StringLeft(@ScriptName, StringLen(@ScriptName)-4) & ".exe" Global $Arr_ProcessList ;~ Global $NoGarbageCollection = False #Region Font-Erstellung Global $hBrush ; = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) Global Const $hFormat = _GDIPlus_StringFormatCreate () Global Const $hFamily = _GDIPlus_FontFamilyCreate ("Verdana") Global $hFont ; = _GDIPlus_FontCreate ($hFamily, 11, 0,2) Global $tLayout ; z.B. $tLayout = _GDIPlus_RectFCreate (75, 8, 450, 18) #EndRegion #Region Pen-Erstellung GLobal $hPen = _GDIPlus_PenCreate('0xFF00GG00', 3, 2) #EndRegion #Region alte Variablen Global $Arr_UniqueFolders[1] ;~ Global $Str_SkinFolder_abs ;~ Global $Str_Table ;~ Global $Str_Layout ;~ Global $Str_Cards ;~ Global $Str_Arrows ;~ Global $Str_CardBacks ;~ Global $Str_Frames Global $Arr_VersionFileLines[1] ;~ Global $Arr_Tables[1] Global $Arr_Layouts[1] Global $Arr_Cards[1] Global $Arr_1pixSeats[1] Global $Arr_Arrows[1] Global $Arr_CardBacks[1] Global $Arr_Frames[1] Global $Arr_LayoutFiles[1] Global $Arr_CardsFiles[1] Global $Arr_1pixSeatsFiles[1] Global $Arr_ArrowsFiles[1] Global $Arr_CardBacksFiles[1] Global $Arr_FramesFiles[1] ;~ Global $Bool_SetGui ;~ Global $Str_PGDir_abs ;~ Global $Str_SkinsDir_abs ;~ Global $Str_PPDir_abs ;~ Global $Str_ImgDir_abs ;~ Global $Str_ImgLangDir_abs ;~ Global $Str_ImgLangDir_rel ;~ Global $Str_ImgBckpDir_abs ;~ Global $Str_ImgBckpLangDir_abs ;~ Global $Str_SkinsDir_rel ;~ Global $Str_LayoutsDir_abs ;~ Global $Str_LayoutsModernDir_abs ;~ Global $Str_LayoutsClassicDir_abs ;~ Global $Str_CardsDir_abs ;~ Global $Str_1pixSeatsDir_abs ;~ Global $Str_ArrowsDir_abs ;~ Global $Str_CardBacksDir_abs ;~ Global $Str_FramesDir_abs ;~ Global $Str_CardsPNGFile ;~ GLobal $Str_BacksPNGFile ;========================== ;~ Global $hw_SkinChanger ;~ Global $h_Status ;~ Global $Radio_Table_classic ;~ Global $Radio_Table_modern Global $Label_Tables Global $Label_CardBacks Global $Label_Layouts Global $Label_Cards Global $Label_Arrows Global $Label_Frames ;~ Global $Button_DelLayout ;~ Global $Button_DelCards ;$Button_Del1pixSeats ;~ Global $Button_DelArrows ;~ Global $Button_AddLayout ;~ Global $Button_AddCards ;Global $Button_Add1pixSeats ;~ Global $Button_AddArrows ;~ Global $Rect_Spacer_0 ;Global $checkCN ;~ Global $Label_Shortcuts ;~ Global $Label_Status ;~ Global $Button_SetLayout ;~ Global $Button_SetStandard ;~ Global $Button_Cancel ;~ Global $Pic_Arrows ;~ Global $Menu_filemenu ;~ Global $MenuItem_Install ;~ Global $MenuItem_Layout ;~ Global $MenuItem_Cards ;~ Global $MenuItem_separator ;~ ;Global $MenuItem_1pixSeat ;~ Global $MenuItem_Arrows ;~ Global $MenuItem_Cardback ;~ Global $MenuItem_separator ;~ Global $MenuItem_Backup ;~ Global $MenuItem_Restore ;~ Global $MenuItem_separator ;~ Global $MenuItem_Exit ;~ Global $Menu_viewmenu ;~ Global $MenuItem_RandomSkin ;~ Global $MenuItem_Options ;~ Global $MenuItem_Viewstatus ;~ Global $Menu_helpmenu ;~ Global $MenuItem_Info_Layout ;~ Global $MenuItem_Feedback ;~ Global $MenuItem_Update ;~ Global $MenuItem_UpdateSkins ;~ Global $MenuItem_Info ;----- ab hier das Optionen-Fenster ---- ;~ Global $hw_Options ;~ Global $Button_DelCardBacks ;~ Global $Button_AddCardBacks ;~ Global $Pic_CardBacks_1 ;~ Global $Pic_CardBacks_2 ;~ Global $Pic_CardBacks_3 ;~ Global $Pic_CardBacks_4 ;~ Global $Pic_CardBacks_5 ;~ Global $Pic_CardBacks_6 ;~ Global $Label_Selected_CardBacks ;~ Global $Button_Update ;~ Global $Button_CloseOptions ;========================= ;~ Global $h_mygui, $h_mypopup, $h_mylistview, $Str_myListElement,$h_label ;~ Global $h_Context, $con_Tab, $con_Add, $con_Del, $con_Sep, $con_CheckSkins, $con_Install ;~ Global $GUI_CtrlId_parent #EndRegion EndFunc ;==> _Init Func _Update_Variables() _Set_SkinDirDefault() ;belegt den Layout-Pfad nach SelectedTable ;hier werden Variablen mit den eingelesenen Bildern belegt ;--> Code lesbarer _Update_Layouts_Variables() _Update_Chips_Variables() _Update_Arrows_Variables() _Update_Cards_Variables() _Update_CardBacks_Variables() _Update_Frames_Variables() if $Str_SelectedTable = $Str_Modern Then _Update_Layouts_modern_Variables() ;~ Sleep(100) ; falls Diagnose in _LoadFilesToImagesArray aktiviert, dann Sleep aktievieren, sonst oft kein Hintergrundbild im SC EndFunc ;==> _Update_Variables Func _Set_SkinDirDefault() Global $StrDirDefault if $Str_SelectedTable=$Str_Modern Then $StrDirDefault=$Str_ImgBckpDir_abs & $Str_ImgModern_rel Else $StrDirDefault=$Str_ImgBckpDir_abs & $Str_ImgClassic_rel EndIf EndFunc ;==> _Set_SkinDirDefault Func _Update_Layouts_Variables() ;~ ConsoleWrite(@LF&"$Str_ImgBckpDir_abs = " & $Str_ImgBckpDir_abs) _LoadFilesToImagesArray($Arr_hImg, $Arr_Filenames_Layouts, $iID_Layouts, $Str_SelectedTableBool+1, $StrDirDefault) Global $hImg_Layout = $Arr_hImg[$iID_Layouts+0][0] Global $SC_Layout_Width = $Arr_hImg[$iID_Layouts+0][1] Global $SC_Layout_Height = $Arr_hImg[$iID_Layouts+0][2] Global $hImg_Logo = $Arr_hImg[$iID_Layouts+1][0] Global $hImg_DealerBtn = $Arr_hImg[$iID_Layouts+2][0] Global $hImg_OpenTable = $Arr_hImg[$iID_Layouts+3][0] Global $SC_OpenTable_Width = $Arr_hImg[$iID_Layouts+3][1]/3 Global $SC_OpenTable_Height = $Arr_hImg[$iID_Layouts+3][2] EndFunc ;==> _Update_Layouts_Variables Func _Update_Chips_Variables() _LoadFilesToImagesArray($Arr_hImg, $Arr_Filenames_Chips, $iID_Chips, $Str_SelectedTableBool+1, $StrDirDefault) Global $hImg_Chips[16][3] = [ _ ;enthält Chipsbilder, -werte & anzahlen [$Arr_hImg[$iID_Chips+ 0][0],1000000 ,0], _ [$Arr_hImg[$iID_Chips+ 1][0], 500000 ,0], _ [$Arr_hImg[$iID_Chips+ 2][0], 100000 ,0], _ [$Arr_hImg[$iID_Chips+ 3][0], 25000 ,0], _ [$Arr_hImg[$iID_Chips+ 4][0], 5000 ,0], _ [$Arr_hImg[$iID_Chips+ 5][0], 1000 ,0], _ [$Arr_hImg[$iID_Chips+ 6][0], 500 ,0], _ [$Arr_hImg[$iID_Chips+ 7][0], 100 ,0], _ [$Arr_hImg[$iID_Chips+ 8][0], 25 ,0], _ [$Arr_hImg[$iID_Chips+ 9][0], 5 ,0], _ [$Arr_hImg[$iID_Chips+10][0], 1 ,0], _ [$Arr_hImg[$iID_Chips+11][0], 0.5 ,0], _ [$Arr_hImg[$iID_Chips+12][0], 0.25,0], _ [$Arr_hImg[$iID_Chips+13][0], 0.1 ,0], _ [$Arr_hImg[$iID_Chips+14][0], 0.05,0], _ [$Arr_hImg[$iID_Chips+15][0], 0.01,0] _ ] Global $SC_Chips_Width = $Arr_hImg[$iID_Chips+ 0][1] Global $SC_Chips_Height = $Arr_hImg[$iID_Chips+ 0][2] EndFunc ;==> _Update_Chips_Variables Func _Update_Arrows_Variables() _LoadFilesToImagesArray($Arr_hImg, $Arr_Filenames_Arrows, $iID_Arrows, $Str_SelectedTableBool+1, $StrDirDefault) Global $Arr_hImg_Flash[10] ;enthält die Referenzen zu den Flashlights For $i=0 to Ubound($Arr_hImg_Flash)-1 $Arr_hImg_Flash[$i] = $Arr_hImg[$iID_Arrows+$i][0] Next EndFunc Func _Update_Cards_Variables() _LoadFilesToImagesArray($Arr_hImg, $Arr_Filenames_Cards, $iID_Cards, 1, $StrDirDefault) Global $hImg_Cards = $Arr_hImg[$iID_Cards+0][0] Global $SC_Cards_Width = $Arr_hImg[$iID_Cards+0][1]/85 Global $SC_Cards_Height = $Arr_hImg[$iID_Cards+0][2] EndFunc ;==> _Update_Cards_Variables Func _Update_CardBacks_Variables() _LoadFilesToImagesArray($Arr_hImg, $Arr_Filenames_CardBacks, $iID_CardBacks, 1, $StrDirDefault) Global $hImg_HoleCards = $Arr_hImg[$iID_CardBacks+0][0] EndFunc ;==> _Update_CardBacks_Variables Func _Update_Frames_Variables() ;~ ConsoleWrite(@lf&@lf&"$StrDirDefault = "& $StrDirDefault) _LoadFilesToImagesArray($Arr_hImg, $Arr_Filenames_Frames, $iID_Frames, 1, $StrDirDefault) Global $hImg_Title = $Arr_hImg[$iID_Frames+ 0][0] Global $hImg_Title_Width = $Arr_hImg[$iID_Frames+ 0][1]/2 Global $hImg_Frame = _GDIPlus_BitmapCloneArea ($hImg_Title, 1, $SC_Titlebar_Height-2,2,2) Global $hImg_Btn = $Arr_hImg[$iID_Frames+ 1][0] Global $SC_Btn_Dim = $Arr_hImg[$iID_Frames+ 1][1]/24 Global $hImg_Tile = $Arr_hImg[$iID_Frames+ 2][0] Global $SC_Def_Dim = $Arr_hImg[$iID_Frames+ 2][1]/8 Global $hImg_Cascade = $Arr_hImg[$iID_Frames+ 3][0] Global $hImg_Default = $Arr_hImg[$iID_Frames+ 4][0] Global $hImg_Multi = $Arr_hImg[$iID_Frames+ 5][0] Global $SC_Multi_Width = $Arr_hImg[$iID_Frames+ 5][1]/8 Global $SC_Multi_Height = $Arr_hImg[$iID_Frames+ 5][2] Global $hImg_Stack = $Arr_hImg[$iID_Frames+ 6][0] Global $hImg_Menu = $Arr_hImg[$iID_Frames+ 7][0] Global $SC_Menu_Width = $Arr_hImg[$iID_Frames+ 7][1]/8 Global $SC_Menu_Height = $Arr_hImg[$iID_Frames+ 7][2] Global $hImg_Footer = $Arr_hImg[$iID_Frames+ 8][0] Global $SC_Footer_Width = $Arr_hImg[$iID_Frames+ 8][1] Global $SC_Footer_Height = $Arr_hImg[$iID_Frames+ 8][2] Global $hImg_TitleTint = $Arr_hImg[$iID_Frames+ 9][0] Global $SC_Tint_Width = $Arr_hImg[$iID_Frames+ 9][1] Global $SC_Tint_Height = $Arr_hImg[$iID_Frames+ 9][2] Global $hImg_Resizer = $Arr_hImg[$iID_Frames+10][0] Global $SC_Resizer_Dim = $Arr_hImg[$iID_Frames+10][1] EndFunc ;==> _Update_Frames_Variables Func _Update_Layouts_modern_Variables() _LoadFilesToImagesArray($Arr_hImg, $Arr_Filenames_Layouts_modern, $iID_Layouts_modern, 1, $StrDirDefault) Global $hImg_MinBG = $Arr_hImg[$iID_Layouts_modern+ 0][0] Global $hImg_Icon1 = $Arr_hImg[$iID_Layouts_modern+ 1][0] Global $hImg_Icon2 = $Arr_hImg[$iID_Layouts_modern+ 2][0] Global $hImg_Icon3 = $Arr_hImg[$iID_Layouts_modern+ 3][0] Global $hImg_Icon4 = $Arr_hImg[$iID_Layouts_modern+ 4][0] Global $SC_Icon_Dim = $Arr_hImg[$iID_Layouts_modern+ 4][2]+1 Global $hImg_Footer1 = $Arr_hImg[$iID_Layouts_modern+ 5][0] Global $hImg_Footer2 = $Arr_hImg[$iID_Layouts_modern+ 6][0] Global $hImg_Footer3 = $Arr_hImg[$iID_Layouts_modern+ 7][0] Global $hImg_Footer4 = $Arr_hImg[$iID_Layouts_modern+ 8][0] Global $hImg_Footer5 = $Arr_hImg[$iID_Layouts_modern+ 9][0] Global $hImg_Footer6 = $Arr_hImg[$iID_Layouts_modern+10][0] Global $SC_Foot_Dim = $Arr_hImg[$iID_Layouts_modern+10][2] Global $hImg_Avatar_on = $Arr_hImg[$iID_Layouts_modern+11][0] Global $SC_Avatar_on_Width = $Arr_hImg[$iID_Layouts_modern+11][1] Global $SC_Avatar_on_Height = $Arr_hImg[$iID_Layouts_modern+11][2] Global $hImg_Avatar_off = $Arr_hImg[$iID_Layouts_modern+12][0] Global $SC_Avatar_off_Width = $Arr_hImg[$iID_Layouts_modern+12][1] Global $SC_Avatar_off_Height= $Arr_hImg[$iID_Layouts_modern+12][2] Global $hImg_Divider = $Arr_hImg[$iID_Layouts_modern+13][0] Global $SC_Divider_Width = $Arr_hImg[$iID_Layouts_modern+13][1] Global $SC_Divider_Height = $Arr_hImg[$iID_Layouts_modern+13][2] EndFunc ;==> _Update_Layouts_modern_Variables Func _Load_INI() ;IniRead ließt Einstellungen aus einer ini-Datei Global $Str_PGDir_abs = IniRead($Str_IniFile, "paths", "PGDir", @ProgramFilesDir & "\PartyGaming") Global $Str_SkinsDir_abs = IniRead($Str_IniFile, "paths", "SkinsDir", @WorkingDir & "\Skins") Global $Str_ImgLangDir_rel = IniRead($Str_IniFile, "paths", "ImgLangDir", $Str_ImgLangDir_rel_us) Global $Str_StandardTable = IniRead($Str_IniFile, "standards", "Table", $Str_Modern) Global $Str_StandardLayout = IniRead($Str_IniFile, "standards", "Layout", "") Global $Str_StandardCards = IniRead($Str_IniFile, "standards", "Cards", "") Global $Str_Standard1pixSeats = IniRead($Str_IniFile, "standards", "1pixSeats", "transparent") Global $Str_StandardArrows = IniRead($Str_IniFile, "standards", "Arrows", "") Global $Str_StandardCardBacks = IniRead($Str_IniFile, "standards", "CardBacks", "") Global $Str_StandardFrame = IniRead($Str_IniFile, "standards", "Frame", "") Global $Str_StandardStatus = IniRead($Str_IniFile, "standards", "Status", "True") Global $Str_SelectedTable=$Str_StandardTable Global $Str_SelectedLayout=$Str_StandardLayout Global $Str_SelectedCards=$Str_StandardCards Global $Str_SelectedCardBacks=$Str_StandardCardBacks Global $Str_SelectedArrows=$Str_StandardArrows Global $Str_Selected1pixSeats=$Str_Standard1pixSeats Global $Str_SelectedFrame=$Str_StandardFrame ;~ ConsoleWrite(@lf&"$Str_Selected1pixSeats="& $Str_Selected1pixSeats) if $Str_SelectedTable = $Str_Modern Then $Str_SelectedTableBool=1 Else $Str_SelectedTableBool=0 EndIf If $Str_StandardStatus="False" Then Global $Str_SelectedStatus=False Else Global $Str_SelectedStatus=True EndIf EndFunc ;==> _Load_INI Func _Save_INI() local $h_Error $h_Error = IniWrite($Str_IniFile, "paths", "PGDir", $Str_PGDir_abs) ;msgbox(0,"","ini geschrieben: "&$Str_IniFile) If $h_Error = 1 Then $h_Error = IniWrite($Str_IniFile, "standards", "Table", $Str_SelectedTable) $h_Error = IniWrite($Str_IniFile, "standards", "Layout", $Str_SelectedLayout) $h_Error = IniWrite($Str_IniFile, "standards", "Cards", $Str_SelectedCards) $h_Error = IniWrite($Str_IniFile, "standards", "1pixSeats", $Str_Selected1pixSeats) $h_Error = IniWrite($Str_IniFile, "standards", "Arrows", $Str_SelectedArrows) $h_Error = IniWrite($Str_IniFile, "standards", "CardBacks", $Str_SelectedCardBacks) $h_Error = IniWrite($Str_IniFile, "standards", "Frame", $Str_SelectedFrame) $h_Error = IniWrite($Str_IniFile, "standards", "Status", $Str_SelectedStatus) $h_Error = IniWrite($Str_IniFile, "paths", "ImgLangDir", $Str_ImgLangDir_rel) Else msgbox(0,"","Ini write failed!") EndIf EndFunc ;==> _Save_INI Func _UpdatePaths() ; Ini-Read in extra Funktion auslagern, und GUI restartable machen ohne INI-Read! Global $Str_PPDir_abs = $Str_PGDir_abs & "\PartyPoker" Global $Str_ImgDir_abs = $Str_PPDir_abs & "\Images" Global $Str_ImgLangDir_abs = $Str_PPDir_abs & "\Language" & $Str_ImgLangDir_rel & "\images" Global $Str_ImgBckpDir_abs = $Str_PPDir_abs & "\Images_bckp" Global $Str_ImgBckpLangDir_abs = $Str_PPDir_abs & "\ImagesLang_bckp\" Global $Str_SkinsDir_rel = "\Skins" Global $Str_LayoutsDir_abs = $Str_SkinsDir_abs & "\Layouts" Global $Str_LayoutsModernDir_abs = $Str_LayoutsDir_abs & "\" & $Str_Modern Global $Str_LayoutsClassicDir_abs = $Str_LayoutsDir_abs & "\" & $Str_Classic Global $Str_CardsDir_abs = $Str_SkinsDir_abs & "\Cards" Global $Str_1pixSeatsDir_abs = $Str_SkinsDir_abs & "\1pixSeats" Global $Str_ArrowsDir_abs = $Str_SkinsDir_abs & "\Arrows" Global $Str_ArrowsModernDir_abs = $Str_ArrowsDir_abs & "\" & $Str_Modern Global $Str_ArrowsClassicDir_abs = $Str_ArrowsDir_abs & "\" & $Str_Classic Global $Str_CardBacksDir_abs = $Str_SkinsDir_abs & "\CardBacks" Global $Str_CardBacksModernDir_abs = $Str_CardBacksDir_abs & "\" & $Str_Modern Global $Str_CardBacksClassicDir_abs = $Str_CardBacksDir_abs & "\" & $Str_Classic Global $Str_FramesDir_abs = $Str_SkinsDir_abs & "\Frames" Global $Str_SkinFolder_abs = $Str_SkinsDir_abs & "\" ;~ ConsoleWrite(@lf&"$Str_SkinFolder_abs = "& $Str_SkinFolder_abs) Global $SC_Width = $SC_ClassicModern_Dim[0][$Str_SelectedTableBool*2] Global $SC_Height = $SC_ClassicModern_Dim[0][$Str_SelectedTableBool*2+1] Global $SC_Titlebar_Height = $SC_ClassicModern_Dim[1][$Str_SelectedTableBool*2] Global $SC_Footer_Height_Init = $SC_ClassicModern_Dim[1][$Str_SelectedTableBool*2+1] EndFunc ;==> _UpdatePaths Func _Create_GUI() ConsoleWrite(@lf & $Str_ProcessName) $Arr_ProcessList = ProcessList($Str_ProcessName) ;~ _ArrayDisplay($list, StringLeft(@ScriptName, StringLen(@ScriptName)-4)&".exe") if $Arr_ProcessList[0][0]>1 Then ;~ msgbox(0,"SkinChanger process detected twice", "The SkinChanger process was started twice." @lf & "This process will close now...") Exit ; Das Skript läuft bereits EndIf $Arr_ProcessList=0 Global $hWnd_SC = GUICreate($Str_SkinChangerTitle_short, $SC_Width, $SC_Height, -1, -1,$WS_POPUP); $WS_CLIPCHILDREN; GUISetOnEvent($GUI_EVENT_CLOSE, "_exitMain") GUIRegisterMsg(0x0207, "_Switch_Table") GUIRegisterMsg(0x020A, "_WM_MOUSEWHEEL") ;~ GUISetState(@SW_SHOW) Global $Context = GUICtrlCreateContextMenu() Global $Context_Install = GUICtrlCreateMenuItem("Install Skin"&@TAB&"Enter", $Context) GUICtrlSetOnEvent($Context_Install, "_Install_Skin") GUICtrlCreateMenuItem("", $Context) ; separator Global $Context_Help = GUICtrlCreateMenuItem("Help hide/show"&@TAB&"F1", $Context) GUICtrlSetOnEvent($Context_Help, "_SwapShortCuts") Global $Context_About = GUICtrlCreateMenuItem("About"&@TAB&"F2", $Context) GUICtrlSetOnEvent($Context_About, "_Info") Global $Context_Donate = GUICtrlCreateMenuItem("Donate!"&@TAB&"F4", $Context) GUICtrlSetOnEvent($Context_Donate, "_Donate") GUICtrlCreateMenuItem("", $Context) ; separator Global $Context_Udpate = GUICtrlCreateMenuItem("Check for Updates"&@TAB&"F5", $Context) GUICtrlSetOnEvent($Context_Udpate, "_Update") ;~ WinWait('GUI') Global $Lbl_Title = GUICtrlCreateLabel('', 0, 0, $SC_Width, $SC_Titlebar_Height, -1, $GUI_WS_EX_PARENTDRAG+$WS_EX_LAYERED ) ;~ GUICtrlSetState ( -1, $GUI_HIDE ) Global $Lbl_Footer = GUICtrlCreateLabel('', 0, $SC_Height-$SC_Footer_Height_Init, $SC_Width, $SC_Footer_Height_Init) GUICtrlSetState ( -1, $GUI_HIDE ) if IsDeclared("hGraphic") Then _GDIPlus_GraphicsDispose($hGraphic) Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd_SC) ; these Controls are invisible, but have correct position for user interaction Global $Lbl_Layout = GUICtrlCreateLabel('',$SC_Frame_Thickness, $SC_Titlebar_Height, $SC_Width-2*$SC_Frame_Thickness, $SC_Height-$SC_Titlebar_Height-$SC_Footer_Height_Init) GUICtrlSetState ( -1, $GUI_HIDE ) Global $Lbl_Minimize = GUICtrlCreateLabel('',$SC_Width- 64, 6, $SC_Btn_Dim, $SC_Btn_Dim) GUICtrlSetOnEvent($Lbl_Minimize, "_Minimize") GUICtrlSetState ( $Lbl_Minimize, $GUI_ONTOP ) Global $Lbl_Close = GUICtrlCreateLabel('',$SC_Width- 24, 6, $SC_Btn_Dim, $SC_Btn_Dim) GUICtrlSetOnEvent($Lbl_Close, "_exitMain") GUICtrlSetState ( $Lbl_Close, $GUI_ONTOP ) Global $Label_Tables = GUICtrlCreateLabel('', $SC_Frame_Thickness, $SC_Height-$SC_Frame_Thickness-$SC_Footer_Height_Init-15, 80,15) GUICtrlSetState ( $Label_Tables, $GUI_ONTOP ) Global $Arr_Ctrls_Click[1][2] = [[0,0]] ;hier werden die Ctrls für Click-Überwachung registiert ;~ _Ctrl_Register($Arr_Ctrls_Click, $Lbl_Minimize, $i_Index_Btn) ;~ _Ctrl_Register($Arr_Ctrls_Click, $Lbl_Close, $i_Index_Btn) Global $Arr_Ctrls_Scroll[1][2] = [[0,0]] ;hier werden die Ctrls für Scroll-Überwachung registiert _Ctrl_Register($Arr_Ctrls_Scroll, $Lbl_Title, $i_Index_Frame) _Ctrl_Register($Arr_Ctrls_Scroll, $Lbl_Footer, $i_Index_Frame) _Ctrl_Register($Arr_Ctrls_Scroll, $Lbl_Layout, $i_Index_Layout) ;~ _Ctrl_Register($Arr_Ctrls_Scroll, $Lbl_Minimize, $i_Index_Btn) ;~ _Ctrl_Register($Arr_Ctrls_Scroll, $Lbl_Close, $i_Index_Btn) ;~ _ArrayDisplay($Arr_Ctrls_Scroll) ;~ SetContext($Label_Tables) ;these Controls have no dimension, only for functions fired by Hotkeys; Global $Lbl_Redraw_GUI = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_Switch_Table = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_CardsUp = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_CardsDown = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_LayoutUp = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_LayoutDown = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_FrameUp = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_FrameDown = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_ArrowsUp = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_ArrowsDown = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_CardBacksUp = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_CardBacksDown = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_Install = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_Update = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_Help = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_About = GUICtrlCreateLabel('',0,0,0,0) Global $Lbl_Donate = GUICtrlCreateLabel('',0,0,0,0) GUICtrlSetOnEvent($Lbl_Redraw_GUI, "_Redraw_GUI" ) GUICtrlSetOnEvent($Lbl_Switch_Table, "_Switch_Table" ) GUICtrlSetOnEvent($Lbl_CardsUp, "_CardsUp" ) GUICtrlSetOnEvent($Lbl_CardsDown, "_CardsDown" ) GUICtrlSetOnEvent($Lbl_LayoutUp, "_LayoutUp" ) GUICtrlSetOnEvent($Lbl_LayoutDown, "_LayoutDown" ) GUICtrlSetOnEvent($Lbl_FrameUp, "_FrameUp" ) GUICtrlSetOnEvent($Lbl_FrameDown, "_FrameDown" ) GUICtrlSetOnEvent($Lbl_ArrowsUp, "_ArrowsUp" ) GUICtrlSetOnEvent($Lbl_ArrowsDown, "_ArrowsDown" ) GUICtrlSetOnEvent($Lbl_CardBacksUp, "_CardBacksUp" ) GUICtrlSetOnEvent($Lbl_CardBacksDown, "_CardBacksDown") GUICtrlSetOnEvent($Lbl_Install, "_Install_Skin") GUICtrlSetOnEvent($Lbl_Update, "_Update" ) GUICtrlSetOnEvent($Lbl_Help, "_SwapShortCuts") GUICtrlSetOnEvent($Lbl_About, "_Info" ) GUICtrlSetOnEvent($Lbl_Donate, "_Donate" ) GUISetState() EndFunc ;==> _Create_GUI Func _CreateSet_GUI() _UpdatePaths() _Update_Variables() _Create_GUI() _SetVars() _Set_AccelKeys() _Set_PlayersDealerFlash_Random() _Set_Cards_Random() ;~ _Set_TotalPotChips_Random() _Set_Avatare() _Set_Layout() _Update_Labels_Selection() _Set_Frame() _Set_LayoutCardsFrame() GUIRegisterMsg($WM_PAINT, "_Redraw_GUI") EndFunc ;==> _CreateSet_GUI Func _Set_AccelKeys() ; #Region Accelerator-Erstellung Local $Arr_AccelKeys[31][2]=[ _ ['{SPACE}' , $Lbl_Switch_Table ], _ ['{UP}' , $Lbl_CardsUp ], _ ['{DOWN}' , $Lbl_CardsDown ], _ ['{LEFT}' , $Lbl_LayoutUp ], _ ['{RIGHT}' , $Lbl_LayoutDown ], _ ['{PGUP}' , $Lbl_CardBacksUp ], _ ['{PGDN}' , $Lbl_CardBacksDown], _ ['{HOME}' , $Lbl_FrameUp ], _ ['{END}' , $Lbl_FrameDown ], _ ['{INS}' , $Lbl_ArrowsUp ], _ ['{DEL}' , $Lbl_ArrowsDown ], _ ['{NUMPAD1}' , $Lbl_FrameDown ], _ ['{NUMPAD2}' , $Lbl_CardsDown ], _ ['{NUMPAD3}' , $Lbl_CardBacksDown], _ ['{NUMPAD4}' , $Lbl_LayoutUp ], _ ['{NUMPAD5}' , $Lbl_Switch_Table ], _ ['{NUMPAD6}' , $Lbl_LayoutDown ], _ ['{NUMPAD7}' , $Lbl_FrameUp ], _ ['{NUMPAD8}' , $Lbl_CardsUp ], _ ['{NUMPAD9}' , $Lbl_CardBacksUp ], _ ['{NUMPAD0}' , $Lbl_ArrowsUp ], _ ['{NUMPADDOT}' , $Lbl_ArrowsDown ], _ ['{ENTER}' , $Lbl_Install ], _ ['u' , $Lbl_Update ], _ ['h' , $Lbl_Help ], _ ['{F1}' , $Lbl_Help ], _ ['{F2}' , $Lbl_About ], _ ['{F4}' , $Lbl_Donate ], _ ['{F5}' , $Lbl_Update ], _ ['d' , $Lbl_Donate ], _ ["!q" , $Lbl_Close ] _ ] GUISetAccelerators($Arr_AccelKeys,$hWnd_SC) EndFunc ;==> _Set_AccelKeys Func _exitMain() _Save_INI() _CollectGarbage() _GDIPlus_Shutdown() Exit EndFunc ;==> _exitMain Func _Minimize() GUISetState(@SW_MINIMIZE, $hWnd_SC) EndFunc ;==> _Minimize Func _Redraw_GUI() ;~ _WinAPI_RedrawWindow ($hWnd_SC, $SC_tagRECT, 0, $RDW_UPDATENOW) _WinAPI_RedrawWindow ($hWnd_SC, 0, 0, $RDW_UPDATENOW) ;~ ConsoleWrite(@lf&"normaler Redraw...") _GDIPlus_GraphicsDrawImageRect ($hGraphic, $hBmp_Buffer_LCF, 0, 0, $SC_Width, $SC_Height) ; zeichnet Layout, Cards und Frame ;~ _WinAPI_RedrawWindow($hWnd_SC, 0, 0, $RDW_VALIDATE) Return $GUI_RUNDEFMSG EndFunc ;==> _Redraw_GUI Func _Set_LayoutCardsFrame() _GDIPlus_ImageDispose($hBmp_Buffer_LCF) $hBmp_Buffer_LCF = _GDIPlus_BitmapCreateFromGraphics($SC_Width, $SC_Height, $hGraphic) Local $hGraphic_Buffer= _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer_LCF) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hBmp_Buffer_Layout, 0, 0, $SC_Width, $SC_Height) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hBmp_Buffer_Cards, 0, 0, $SC_Width, $SC_Height) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hBmp_Buffer_Frame, 0, 0, $SC_Width, $SC_Height) ;~ ConsoleWrite(@LF&"$Str_SelectedStatus="&$Str_SelectedStatus) If $Str_SelectedStatus=True Then _Update_Labels_Selection() _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hBmp_Buffer_Labels, 0, 0, $SC_Width, $SC_Height) Else ;~ local $var = WinGetPos($hWnd_SC) ;~ local $color = PixelGetColor($var[0]+$SC_Width/2-50-1,$var[1]+$SC_Height-1*12-$SC_Frame_Thickness-1) ;~ ConsoleWrite(@lf&"X: " & $var[0]+$SC_Width/2-50-2 & " Y: " & $var[1]+$SC_Height-1*12-$SC_Frame_Thickness-2) ;~ local $color = PixelGetColor($SC_Width/2-50-1,$SC_Height-1*12-$SC_Frame_Thickness-1) ;~ ConsoleWrite(@lf&"X: " & $SC_Width/2-50-2 & " Y: " & $SC_Height-1*12-$SC_Frame_Thickness-2) ;~ ConsoleWrite(@lf&"color: " & "0x"&StringMid(Hex($color),3)) ;~ $hBrush = _GDIPlus_BrushCreateSolid ("0xFF"&StringMid(Hex($color),3)) ;~ $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) ;~ _GDIPlus_GraphicsFillRect ($hGraphic_Buffer, $SC_Width/2-50, $SC_Height-1*12-$SC_Frame_Thickness, 101, 12, $hBrush) $hBrush = _GDIPlus_BrushCreateSolid (0xFFCCCCCC) $hFont = _GDIPlus_FontCreate ($hFamily, 10, 0, 2) $tLayout = _GDIPlus_RectFCreate ($SC_Width/2-50, $SC_Height-1*16-$SC_Frame_Thickness, 101, 12) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Press 'F1' for Help", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name EndIf ;~ ConsoleWrite(@lf&"LCF neu gesetzt...") _GDIPlus_GraphicsDispose($hGraphic_Buffer) _Redraw_GUI() EndFunc ;==> _Set_LayoutCardsFrame Func _Set_Frame() _GDIPlus_ImageDispose($hBmp_Buffer_Frame) $hBmp_Buffer_Frame = _GDIPlus_BitmapCreateFromGraphics($SC_Width, $SC_Height, $hGraphic) Local $hGraphic_Buffer= _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer_Frame) ;btn_stack.png _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Title, 0, 0, $hImg_Title_Width-1, $SC_Titlebar_Height, 0, 0, $SC_Width, $SC_Titlebar_Height); Titelzeile _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Logo, 3, 6-$Str_SelectedTableBool*2) ; Logo $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) $hFont = _GDIPlus_FontCreate ($hFamily, 11, 0,2) if $Str_SelectedTable=$Str_Modern Then _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Footer, 0, 0, $SC_Footer_Width, $SC_Footer_Height, 0, $SC_Height-$SC_Footer_Height_Init, $SC_Width, $SC_Footer_Height_Init) ; Fensterbutton Resizer _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_TitleTint, 0, 0, $SC_Tint_Width , $SC_Tint_Height, $SC_Width-$SC_Tint_Width-3, $SC_Frame_Thickness, $SC_Tint_Width, $SC_Tint_Height) ; Titeltint rechts (modern) _GDIPlus_GraphicsDrawLine ($hGraphic_Buffer, 3, $SC_Height-$SC_Footer_Height_Init, $SC_Width-3, $SC_Height-$SC_Footer_Height_Init) ; schwarzer Strich über Footer _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Menu, 0, 0,$SC_Menu_Width, $SC_Menu_Height, $SC_Width-242, 9, $SC_Menu_Width, $SC_Menu_Height) ; MenuPfeil _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Divider, $SC_Width-193, 7) ; Teilstrich _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Divider, $SC_Width-153, 7) ; Teilstrich _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Divider, $SC_Width- 65, 7) ; Teilstrich ;~ _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Divider, $SC_Width- 65, 7) ; Teilstrich $tLayout = _GDIPlus_RectFCreate ( $SC_Width-166, $SC_Height-20, 100, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Table Options", $hFont, $tLayout, $hFormat, $hBrush) ;~ _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Divider, $SC_Width- 73, $SC_Height-22); Teilstrich ;~ $tLayout = _GDIPlus_RectFCreate ( $SC_Width- 59, $SC_Height-20, 40, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Lobby", $hFont, $tLayout, $hFormat, $hBrush) _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Footer1, 0, 0, $SC_Foot_Dim, $SC_Foot_Dim, 0*($SC_Foot_Dim+2)+2 , $SC_Height-$SC_Foot_Dim-4, $SC_Foot_Dim, $SC_Foot_Dim) ; Footerbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Footer2, 0, 0, $SC_Foot_Dim, $SC_Foot_Dim, 1*($SC_Foot_Dim+2)+2 , $SC_Height-$SC_Foot_Dim-4, $SC_Foot_Dim, $SC_Foot_Dim) ; Footerbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Footer3, 0, 0, $SC_Foot_Dim, $SC_Foot_Dim, 2*($SC_Foot_Dim+2)+2 , $SC_Height-$SC_Foot_Dim-4, $SC_Foot_Dim, $SC_Foot_Dim) ; Footerbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Footer4, 0, 0, $SC_Foot_Dim, $SC_Foot_Dim, 3*($SC_Foot_Dim+2)+2 , $SC_Height-$SC_Foot_Dim-4, $SC_Foot_Dim, $SC_Foot_Dim) ; Footerbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Footer5, 0, 0, $SC_Foot_Dim, $SC_Foot_Dim, 4*($SC_Foot_Dim+2)+2 , $SC_Height-$SC_Foot_Dim-4, $SC_Foot_Dim, $SC_Foot_Dim) ; Footerbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Footer6, 0, 0, $SC_Foot_Dim, $SC_Foot_Dim, 5*($SC_Foot_Dim+2)+2 , $SC_Height-$SC_Foot_Dim-4, $SC_Foot_Dim, $SC_Foot_Dim) ; Footerbutton ;~ _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Resizer, $SC_Width-3-$SC_Resizer_Dim, $SC_Height-3-$SC_Resizer_Dim) ; Fensterbutton Resizer _GDIPlus_GraphicsDrawLine ($hGraphic_Buffer, 0, $SC_Height-3, $SC_Width, $SC_Height-3, 0) ; schwarzer Strich über Footer EndIf $tLayout = _GDIPlus_RectFCreate ( 23+$Str_SelectedTableBool*79, 8, 450, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Str_SC_Title_Msg, $hFont, $tLayout, $hFormat, $hBrush) ;~ ;~ _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Multi, 0, 0, $SC_Def_Dim, $SC_Def_Dim, $SC_Width-196+$Str_SelectedTableBool*12, 8, $SC_Def_Dim, $SC_Def_Dim) ; Fensterbutton ;~ if $Str_SelectedTableBool=1 Then _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Menu, 0, 0, $SC_Menu_Width, $SC_Menu_Height, $SC_Width-213+$Str_SelectedTableBool*12, 9, $SC_Menu_Width, $SC_Menu_Height) ; MenuPfeil ;~ ConsoleWrite(@lf&"Befehl war: " & "($hGraphic_Buffer, $hImg_Menu, "&$SC_Menu_Width&", 0, "&$SC_Menu_Width&", "&$SC_Menu_Height&", "&$SC_Width-216&", 9, "&$SC_Menu_Width&", "&$SC_Menu_Height&")") ;~ _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Default, 3*$SC_Def_Dim, 0, $SC_Def_Dim, $SC_Def_Dim, $SC_Width-155+$Str_SelectedTableBool*9, 8, $SC_Def_Dim, $SC_Def_Dim) ; Fensterbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Cascade, 3*$SC_Def_Dim, 0, $SC_Def_Dim, $SC_Def_Dim, $SC_Width-135+$Str_SelectedTableBool*9, 8, $SC_Def_Dim, $SC_Def_Dim) ; Fensterbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Tile, 3*$SC_Def_Dim, 0, $SC_Def_Dim, $SC_Def_Dim, $SC_Width-115+$Str_SelectedTableBool*9, 8, $SC_Def_Dim, $SC_Def_Dim) ; Fensterbutton _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Stack, 0*$SC_Def_Dim, 0, $SC_Def_Dim, $SC_Def_Dim, $SC_Width- 95+$Str_SelectedTableBool*9, 8, $SC_Def_Dim, $SC_Def_Dim) ; Fensterbutton ;~ _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Btn, 6*$SC_Btn_Dim, 0, $SC_Btn_Dim, $SC_Btn_Dim, $SC_Width- 64, 6, $SC_Btn_Dim, $SC_Btn_Dim) ; Fensterbutton Min _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Btn, 12*$SC_Btn_Dim, 0, $SC_Btn_Dim, $SC_Btn_Dim, $SC_Width- 44, 6, $SC_Btn_Dim, $SC_Btn_Dim) ; Fensterbutton Max _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Btn, 0, 0, $SC_Btn_Dim, $SC_Btn_Dim, $SC_Width- 24, 6, $SC_Btn_Dim, $SC_Btn_Dim) ; Fensterbutton Close ;~ ;Frame zeichnen (gelöst über DrawImage, da die Übergabe von PixelSearch zu DrawLine nicht funktioniert hat! Außerdem kann so das Frame-Zechnen im Redraw stattfinden) _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Frame, 0,0,1,1, 0, $SC_Height-$SC_Frame_Thickness, $SC_Width, $SC_Frame_Thickness) _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Frame, 0,0,1,1, 0, $SC_Titlebar_Height, $SC_Frame_Thickness, $SC_Height-$SC_Titlebar_Height) _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Frame, 0,0,1,1, $SC_Width-$SC_Frame_Thickness, $SC_Titlebar_Height, $SC_Width, $SC_Height-$SC_Titlebar_Height) _GDIPlus_GraphicsDispose($hGraphic_Buffer) ;~ ConsoleWrite(@lf&"Frame ist im Buffer...") EndFunc ;==> _Redraw_TitleFrameFooter Func _Set_TitleStatus($msg=$Str_SkinChangerTitle) Global $Str_SC_Title_Msg = $msg _Set_Frame() _Set_LayoutCardsFrame() EndFunc ;==> _Set_TitleStatus Func _Set_PlayersDealerFlash_Random() Global $on_num = Random(2,10,1) ;wie viele Spieler sind in der Hand? Global $Arr_Player[10][3] = [[0,0,""],[1,0,""],[2,0,""],[3,0,""],[4,0,""],[5,0,""],[6,0,""],[7,0,""],[8,0,""],[9,0,""]]; erstmal sind alle Spieler nicht in der Hand Global $num, $DealterBtn_Seat, $Flash_Seat Global $Arr_Players_off Global $Arr_Lbl_HoleCard[20] _Ctrl_UnRegisterByIndex($Arr_Ctrls_Scroll, $i_Index_CardBacks) for $i=0 to $on_num-1 ; Welche Spieler sind in der Hand? $num = Random(0,UBound($Arr_Player)-1,1) While $Arr_Player[$num][1]=1 $num = Random(0,UBound($Arr_Player)-1,1) WEnd $Arr_Player[$num][1] = 1 ;Spieler ist in der Hand ;Hier werden die durchsichtigen Lables für das Scroll-Feature erstellt, nur für Spieler, die in der Hand sind if $Str_SelectedTableBool=0 Then ;classic Layout $Arr_Lbl_HoleCard[2*$i] = GUICtrlCreateLabel('', $SC_ClassicCard_Pos[$num][0], $SC_ClassicCard_Pos[$num][1], $SC_ClassicModern_Dim [2][0], $SC_ClassicModern_Dim [2][1]) GUICtrlSetState ( -1, $GUI_HIDE ) $Arr_Lbl_HoleCard[2*$i+1] = GUICtrlCreateLabel('', $SC_ClassicCard_Pos[$num][0]+4, $SC_ClassicCard_Pos[$num][1]+2, $SC_ClassicModern_Dim [2][0], $SC_ClassicModern_Dim [2][1]) GUICtrlSetState ( -1, $GUI_HIDE ) Else $Arr_Lbl_HoleCard[2*$i] = GUICtrlCreateLabel('', $SC_Avatar_Pos[$num][2]+63, $SC_Avatar_Pos[$num][3]+5, $SC_ClassicModern_Dim [2][2], $SC_ClassicModern_Dim [2][3]) GUICtrlSetState ( -1, $GUI_HIDE ) $Arr_Lbl_HoleCard[2*$i+1] = GUICtrlCreateLabel('', $SC_Avatar_Pos[$num][2]+71, $SC_Avatar_Pos[$num][3]+5, $SC_ClassicModern_Dim [2][2], $SC_ClassicModern_Dim [2][3]) GUICtrlSetState ( -1, $GUI_HIDE ) EndIf ;~ msgbox(0,"Ctrl to Register","CtrL: "&$Arr_Lbl_HoleCard[2*$i]&@lf&"PosX: "&$SC_ClassicCard_Pos[$num][0]&@lf&"PoxY: " &$SC_ClassicCard_Pos[$num][1] ) _Ctrl_Register($Arr_Ctrls_Scroll, $Arr_Lbl_HoleCard[2*$i], $i_Index_CardBacks) _Ctrl_Register($Arr_Ctrls_Scroll, $Arr_Lbl_HoleCard[2*$i+1], $i_Index_CardBacks) Next $DealterBtn_Seat = Random(0,UBound($Arr_Player)-1,1) ;Position des DealerBtn $Flash_Seat = $DealterBtn_Seat+1 If $Flash_Seat = UBound($Arr_Player) Then $Flash_Seat=0 While $Arr_Player[$Flash_Seat][1]=0 ;den nächsten Spieler finden für das Flashlight $Flash_Seat = $Flash_Seat+1 If $Flash_Seat = UBound($Arr_Player) Then $Flash_Seat=0 WEnd _Ctrl_UnRegisterByIndex($Arr_Ctrls_Scroll, $i_Index_Arrow) Global $Lbl_Flash if $Str_SelectedTableBool=0 Then local $extraDim = 5 $Lbl_Flash = GUICtrlCreateLabel('', $SC_Flash_Pos[$Flash_Seat][0]-$extraDim, $SC_Flash_Pos[$Flash_Seat][1]-$extraDim, $Arr_hImg[$iID_Arrows+$Flash_Seat][1]+2*$extraDim, $Arr_hImg[$iID_Arrows+$Flash_Seat][2]+2*$extraDim) GUICtrlSetState ( -1, $GUI_HIDE ) Else $Lbl_Flash = GUICtrlCreateLabel('', $SC_Flash_Pos[$Flash_Seat][2], $SC_Flash_Pos[$Flash_Seat][3], $SC_Flash_Pos[$Flash_Seat][4], $SC_Flash_Pos[$Flash_Seat][5]) GUICtrlSetState ( -1, $GUI_HIDE ) Endif _Ctrl_Register($Arr_Ctrls_Scroll, $Lbl_Flash, $i_Index_Arrow) for $i=0 to Ubound($SC_Avatar_Pos)- 1 local $Player_pot = Round(Random(0,9.99),2) local $Player_pot_Str = StringReplace($Player_pot,".",",") if @extended and StringLen($Player_pot_Str)<4 Then $Player_pot_Str = $Player_pot_Str&"0" ;Wenn zuvor was ersetzt wurde (enthält Komma) und Länge kleiner 4 dann "0" anhängen $Player_pot_Str = $Player_pot_Str&" $" $Arr_Player[$i][2] = $Player_pot_Str next EndFunc ;==> _Set_PlayersDealerFlash_Random Func _Set_TotalPotChips_Random() Global $Total_pot = Round(Random(0,9.99),2) Global $Total_pot_Str = StringReplace($Total_pot,".",",") if @extended and StringLen($Total_pot_Str)<4 Then $Total_pot_Str = $Total_pot_Str&"0" ;Wenn zuvor was ersetzt wurde (enthält Komma) und Länge kleiner 4 dann "0" anhängen $Total_pot_Str = $Total_pot_Str&" $" ;Chipsdarstellung: Berechnung der kleinsten Chipfolge, dann Darstellung Global $Total_pot_sub = $Total_pot Local $stacks=0 For $i=0 to UBound($hImg_Chips)-1 $hImg_Chips[$i][2] = Int($Total_pot_sub/$hImg_Chips[$i][1]) $Total_pot_sub = Round($Total_pot_sub-$hImg_Chips[$i][2]*$hImg_Chips[$i][1],2) ;~ msgbox(0,"","Int("&$Total_pot_sub/$hImg_Chips[$i][1]&")"&@LF& $hImg_Chips[$i][2] &" * " & $hImg_Chips[$i][1] & @LF & "Restpot: "&$Total_pot_sub) if $hImg_Chips[$i][2]>0 Then $stacks=$stacks+1 ;~ $i=$i+1 Next Global $chipsX = ($SC_Width/2)-($stacks*$SC_Chips_Width/2) _GDIPlus_ImageDispose($hBmp_Buffer_Chips) $hBmp_Buffer_Chips = _GDIPlus_BitmapCreateFromGraphics($SC_Width, $SC_Height, $hGraphic) Local $hGraphic_Buffer= _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer_Chips) local $k local $Chips_Space=$SC_ClassicModern_Dim [4][$Str_SelectedTableBool*2] Local $Chips_Start=$SC_ClassicModern_Dim [4][$Str_SelectedTableBool*2+1]- $SC_Chips_Height ;Parametrierte Unterlinie minus Chiphöhe for $i=0 to UBound($hImg_Chips)-1 if $hImg_Chips[$i][2]>0 Then for $j=0 to $hImg_Chips[$i][2]-1 _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_Chips[$i][0], $chipsX+$k*$SC_Chips_Width, $Chips_Start-$j*$Chips_Space) Next $k=$k+1 EndIf next $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) if $Str_SelectedTable=$Str_Modern Then $hFont = _GDIPlus_FontCreate ($hFamily, 10, 1, 2) $tLayout = _GDIPlus_RectFCreate ( 381, 296, 40, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Total_pot_Str, $hFont, $tLayout, $hFormat, $hBrush) $hBrush = _GDIPlus_BrushCreateSolid (0xBBFFFFFF) $hFont = _GDIPlus_FontCreate ($hFamily, 9, 1, 2) $tLayout = _GDIPlus_RectFCreate ( 374, 110, 60, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Total pot", $hFont, $tLayout, $hFormat, $hBrush) $tLayout = _GDIPlus_RectFCreate ( 384, 122, 40, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Total_pot_Str, $hFont, $tLayout, $hFormat, $hBrush) Else $hFont = _GDIPlus_FontCreate ($hFamily, 10, 1, 2) $tLayout = _GDIPlus_RectFCreate ( 385, 309, 60, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Total_pot_Str, $hFont, $tLayout, $hFormat, $hBrush) $hFont = _GDIPlus_FontCreate ($hFamily, 13, 1, 2) $tLayout = _GDIPlus_RectFCreate ( 340, 162, 140, 20) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Total pot: "&$Total_pot_Str, $hFont, $tLayout, $hFormat, $hBrush) EndIf _GDIPlus_GraphicsDispose($hGraphic_Buffer) EndFunc ;==> _Set_TotalPotChips_Random Func _Set_Layout() _GDIPlus_ImageDispose($hBmp_Buffer_Layout) $hBmp_Buffer_Layout = _GDIPlus_BitmapCreateFromGraphics($SC_Width, $SC_Height, $hGraphic) Local $hGraphic_Buffer= _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer_Layout) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hImg_Layout, $SC_Frame_Thickness, $SC_Titlebar_Height, $SC_Layout_Width, $SC_Layout_Height) if $Str_SelectedTable=$Str_Modern Then _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_MinBG, 3, 429) ; IconHintergrund _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Icon1, 0, 0, $SC_Icon_Dim-1, $SC_Icon_Dim, 10, 0*($SC_Icon_Dim+10)+440 , $SC_Icon_Dim-1, $SC_Icon_Dim) ; FooterIcon _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Icon2, 0, 0, $SC_Icon_Dim-1, $SC_Icon_Dim, 10, 1*($SC_Icon_Dim+10)+440 , $SC_Icon_Dim-1, $SC_Icon_Dim) ; FooterIcon _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Icon3, 0, 0, $SC_Icon_Dim-1, $SC_Icon_Dim, 10, 2*($SC_Icon_Dim+10)+440 , $SC_Icon_Dim-1, $SC_Icon_Dim) ; FooterIcon _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Icon4, 0, 0, $SC_Icon_Dim-1, $SC_Icon_Dim, 10, 3*($SC_Icon_Dim+10)+440 , $SC_Icon_Dim-1, $SC_Icon_Dim) ; FooterIcon EndIf _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_OpenTable, 0, 0, $SC_OpenTable_Width, $SC_OpenTable_Height, $SC_Width/2-$SC_OpenTable_Width/2, $SC_Titlebar_Height, $SC_OpenTable_Width, $SC_OpenTable_Height) ; OpenTable_Button $tLayout = _GDIPlus_RectFCreate ( 373, $SC_Titlebar_Height+3) $hBrush = _GDIPlus_BrushCreateSolid (0xFF000000) $hFont = _GDIPlus_FontCreate ($hFamily, 10, 0,2) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Open Table", $hFont, $tLayout, $hFormat, $hBrush) ;Hier are the results of the other drawing functions ;================== _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hBmp_Buffer_Avatare, 0, 0, $SC_Width, $SC_Height) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hBmp_Buffer_Chips, 0, 0, $SC_Width, $SC_Height) _GDIPlus_GraphicsDispose($hGraphic_Buffer) ;~ ConsoleWrite(@lf&"Layout ist im Buffer...") EndFunc ;==> _Set_Layout Func _Set_Avatare() _GDIPlus_ImageDispose($hBmp_Buffer_Avatare) $hBmp_Buffer_Avatare = _GDIPlus_BitmapCreateFromGraphics($SC_Width, $SC_Height, $hGraphic) Local $hGraphic_Buffer= _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer_Avatare) $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) _GDIPlus_PenSetColor ($hPen, 0xFFFFC700) _GDIPlus_PenSetWidth($hPen, 1) for $i=0 to Ubound($SC_Avatar_Pos)- 1 ; Spieler-Avatare, DealerBtn und Flashlight zeichnen if $Str_SelectedTableBool=0 Then ;classic Layout if $i = $Flash_Seat Then _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $Arr_hImg_Flash[$i], $SC_Flash_Pos[$i][0], $SC_Flash_Pos[$i][1]) $hBrush = _GDIPlus_BrushCreateSolid (0x55000000) _GDIPlus_GraphicsFillRect ($hGraphic_Buffer, $SC_Avatar_Pos[$i][0], $SC_Avatar_Pos[$i][1], 100, 34, $hBrush) _GDIPlus_GraphicsDrawRect ($hGraphic_Buffer, $SC_Avatar_Pos[$i][0], $SC_Avatar_Pos[$i][1], 100, 34, $hPen) If $Arr_Player[$i][1]=1 then ;Spieler ist in der Hand _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hImg_HoleCards, $SC_ClassicCard_Pos[$i][0], $SC_ClassicCard_Pos[$i][1], $SC_ClassicModern_Dim [2][0], $SC_ClassicModern_Dim [2][1]) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hImg_HoleCards, $SC_ClassicCard_Pos[$i][0]+4, $SC_ClassicCard_Pos[$i][1]+2, $SC_ClassicModern_Dim [2][0], $SC_ClassicModern_Dim [2][1]) EndIf $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) $hFont = _GDIPlus_FontCreate ($hFamily, 12, 1, 2) $tLayout = _GDIPlus_RectFCreate ( $SC_Avatar_Pos[$i][0]+20, $SC_Avatar_Pos[$i][1]+3, 85, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Player "&$i+1, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFC700) $tLayout = _GDIPlus_RectFCreate ( $SC_Avatar_Pos[$i][0]+28, $SC_Avatar_Pos[$i][1]+19, 75, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Arr_Player[$i][2], $hFont, $tLayout, $hFormat, $hBrush) ;Players Money Else ;modern Layout if $i = $Flash_Seat Then _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $Arr_hImg_Flash[$i], $SC_Flash_Pos[$i][2], $SC_Flash_Pos[$i][3], $SC_Flash_Pos[$i][4], $SC_Flash_Pos[$i][5]) If $Arr_Player[$i][1]=1 then ;Spieler ist in der Hand _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hImg_Avatar_on, $SC_Avatar_Pos[$i][2], $SC_Avatar_Pos[$i][3], $SC_Avatar_on_Width, $SC_Avatar_on_Height) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hImg_HoleCards, $SC_Avatar_Pos[$i][2]+63, $SC_Avatar_Pos[$i][3]+5, $SC_ClassicModern_Dim [2][2], $SC_ClassicModern_Dim [2][3]) _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hImg_HoleCards, $SC_Avatar_Pos[$i][2]+71, $SC_Avatar_Pos[$i][3]+5, $SC_ClassicModern_Dim [2][2], $SC_ClassicModern_Dim [2][3]) Else _GDIPlus_GraphicsDrawImageRect ($hGraphic_Buffer, $hImg_Avatar_off, $SC_Avatar_Pos[$i][2], $SC_Avatar_Pos[$i][3], $SC_Avatar_off_Width, $SC_Avatar_off_Height) EndIf $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) $hFont = _GDIPlus_FontCreate ($hFamily, 10, 0, 2) $tLayout = _GDIPlus_RectFCreate ( $SC_Avatar_Pos[$i][2]+30, $SC_Avatar_Pos[$i][3]+58, 85, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Player "&$i+1, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $hFont = _GDIPlus_FontCreate ($hFamily, 10, 1, 2) $tLayout = _GDIPlus_RectFCreate ( $SC_Avatar_Pos[$i][2]+35, $SC_Avatar_Pos[$i][3]+71, 75, 18) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Arr_Player[$i][2], $hFont, $tLayout, $hFormat, $hBrush) ;Players Money EndIf If $i = $DealterBtn_Seat Then _GDIPlus_GraphicsDrawImage ($hGraphic_Buffer, $hImg_DealerBtn, $SC_Dealer_Pos[$i][$Str_SelectedTableBool*2], $SC_Dealer_Pos[$i][$Str_SelectedTableBool*2+1]);, $SC_Avatar_Pos[$i][4], $SC_Avatar_Pos[$i][5]) ;~ ConsoleWrite(@lf&"$DealterBtn_Seat: "&$DealterBtn_Seat) ;~ ConsoleWrite(@lf&"$PosX: "&$SC_Dealer_Pos[$i][$Str_SelectedTableBool*2]&", PosY: "&$SC_Dealer_Pos[$i][$Str_SelectedTableBool*2+1]) EndIf next _GDIPlus_GraphicsDispose($hGraphic_Buffer) ;~ ConsoleWrite(@lf&"Avatare sind im Buffer...") EndFunc ;==> _Set_Avatare_Random Func _Update_Labels_Selection() _GDIPlus_ImageDispose($hBmp_Buffer_Labels) $hBmp_Buffer_Labels = _GDIPlus_BitmapCreateFromGraphics($SC_Width, $SC_Height, $hGraphic) Local $hGraphic_Buffer= _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer_Labels) ;~ ;~ ConsoleWrite (@lf&"Updating Labels...") $hBrush = _GDIPlus_BrushCreateSolid (0xFF000000) ;~ _GDIPlus_PenSetColor ($hPen, 0xFFFFC700) ;~ _GDIPlus_PenSetWidth($hPen, 1) local $Column0_Width = 65 Local $Column1_Width = 250 Local $Column2_Width = 140 Local $Column3_Width = 160 Local $Column4_Width = 90 Local $Column5_Width = $SC_Width-2*$SC_Frame_Thickness-($Column0_Width+$Column1_Width+$Column2_Width+$Column3_Width+$Column4_Width) Local $Line_Height = 15 Local $Label_Y_init = ($Str_SelectedTableBool-1)*$SC_Frame_Thickness Local $distX ;~ $hBrush = _GDIPlus_BrushCreateSolid (0xFFAAAAAA) $hBrush = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) _GDIPlus_GraphicsFillRect ($hGraphic_Buffer, $SC_Frame_Thickness, $SC_Height-$SC_Footer_Height_Init-8*$Line_Height+$Label_Y_init, $SC_Width-2*$SC_Frame_Thickness, 8*$Line_Height, $hBrush) ;~ _GDIPlus_PenSetColor ($hPen, 0xFFFFC700) ;~ _GDIPlus_GraphicsDrawLine ($hGraphic_Buffer, $SC_Frame_Thickness, $SC_Height-$SC_Footer_Height_Init-6*15+$Label_Y_init, $SC_Width-2*$SC_Frame_Thickness, $SC_Height-$SC_Footer_Height_Init-6*15+$Label_Y_init, $hPen) $hBrush = _GDIPlus_BrushCreateSolid (0xFF000000) $hFont = _GDIPlus_FontCreate ($hFamily, 11, 1, 2) $tLayout = _GDIPlus_RectFCreate ($SC_Frame_Thickness+$Column0_Width, $SC_Height-$SC_Footer_Height_Init-8*$Line_Height+$Label_Y_init, $Column1_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Skin", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($SC_Frame_Thickness+$Column0_Width+$Column1_Width, $SC_Height-$SC_Footer_Height_Init-8*$Line_Height+$Label_Y_init, +$Column2_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Up/Down Primary", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($SC_Frame_Thickness+$Column0_Width+$Column1_Width+$Column2_Width, $SC_Height-$SC_Footer_Height_Init-8*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Up/Down Secondary", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($SC_Frame_Thickness+$Column0_Width+$Column1_Width+$Column2_Width+$Column3_Width, $SC_Height-$SC_Footer_Height_Init-8*$Line_Height+$Label_Y_init, $Column4_Width+$Column5_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Other Shortcuts", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $distX = $SC_Frame_Thickness $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-7*$Line_Height+$Label_Y_init, $Column0_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Table", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-6*$Line_Height+$Label_Y_init, $Column0_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Layout", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-5*$Line_Height+$Label_Y_init, $Column0_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Cards", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-4*$Line_Height+$Label_Y_init, $Column0_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Backs", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-3*$Line_Height+$Label_Y_init, $Column0_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Arrows", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-2*$Line_Height+$Label_Y_init, $Column0_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Frame", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $hFont = _GDIPlus_FontCreate ($hFamily, 11, 0, 2) $distX = $SC_Frame_Thickness+$Column0_Width $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-7*$Line_Height+$Label_Y_init, $Column1_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Str_SelectedTable, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-6*$Line_Height+$Label_Y_init, $Column1_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Str_SelectedLayout, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-5*$Line_Height+$Label_Y_init, $Column1_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Str_SelectedCards, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-4*$Line_Height+$Label_Y_init, $Column1_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Str_SelectedCardBacks, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-3*$Line_Height+$Label_Y_init, $Column1_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Str_SelectedArrows, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-2*$Line_Height+$Label_Y_init, $Column1_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, $Str_SelectedFrame, $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $distX = $SC_Frame_Thickness+$Column0_Width+$Column1_Width $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-7*$Line_Height+$Label_Y_init, $Column2_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Space", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-6*$Line_Height+$Label_Y_init, $Column2_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Left/Right", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-5*$Line_Height+$Label_Y_init, $Column2_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Up/Down", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-4*$Line_Height+$Label_Y_init, $Column2_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "PageUp/PageDown", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-3*$Line_Height+$Label_Y_init, $Column2_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Insert/Delete", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-2*$Line_Height+$Label_Y_init, $Column2_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Home/End", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $distX = $SC_Frame_Thickness+$Column0_Width+$Column1_Width+$Column2_Width $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-7*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Num5", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-6*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Num4/Num6", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-5*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Num8/Num2", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-4*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Num9/Num3", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-3*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Num0/NumDot", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-2*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Num7/Num1", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $distX = $SC_Frame_Thickness+$Column0_Width+$Column1_Width+$Column2_Width+$Column3_Width $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-7*$Line_Height+$Label_Y_init, $Column4_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Install Skin", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-6*$Line_Height+$Label_Y_init, $Column4_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Exit Program", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-5*$Line_Height+$Label_Y_init, $Column4_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Scroll Skin", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-4*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "This Help", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-3*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "About", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-2*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Donate!", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-1*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Check Updates", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $distX = $SC_Frame_Thickness+$Column0_Width+$Column1_Width+$Column2_Width+$Column3_Width+$Column4_Width $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-7*$Line_Height+$Label_Y_init, $Column5_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Enter", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-6*$Line_Height+$Label_Y_init, $Column5_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Escape", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-5*$Line_Height+$Label_Y_init, $Column5_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "Mouse Wheel", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-4*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "F1", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-3*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "F2", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-2*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "F4", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name $tLayout = _GDIPlus_RectFCreate ($distX, $SC_Height-$SC_Footer_Height_Init-1*$Line_Height+$Label_Y_init, $Column3_Width, $Line_Height) _GDIPlus_GraphicsDrawStringEx ($hGraphic_Buffer, "F5", $hFont, $tLayout, $hFormat, $hBrush) ; Players Name _GDIPlus_GraphicsDispose($hGraphic_Buffer) EndFunc Func _SwapShortCuts() ;~ ConsoleWrite(@lf&"_SwapShortCuts()") _SwapBoolean($Str_SelectedStatus) _Set_LayoutCardsFrame() EndFunc Func _Set_Cards() _GDIPlus_ImageDispose($hBmp_Buffer_Cards) $hBmp_Buffer_Cards = _GDIPlus_BitmapCreateFromGraphics($SC_Width, $SC_Height, $hGraphic) Local $hGraphic_Buffer= _GDIPlus_ImageGetGraphicsContext($hBmp_Buffer_Cards) ;~ $SC_ClassicModern_Dim ;~ ConsoleWrite(@lf&$SC_ClassicModern_Dim [3][$Str_SelectedTableBool*2]) local $StartX = $SC_Width/2-2.5*$SC_ClassicModern_Dim [3][$Str_SelectedTableBool*2]-2*2-2*$Str_SelectedTableBool*5 for $i=0 to 4 _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Cards, $CardNr[$i]*$SC_Cards_Width, 0, $SC_Cards_Width, $SC_Cards_Height, $StartX+$i*($SC_ClassicModern_Dim [3][$Str_SelectedTableBool*2]+$Str_SelectedTableBool*5+2), 187-$Str_SelectedTableBool*5, $SC_Cards_Width, $SC_Cards_Height) ; Board-Cards next ;~ ConsoleWrite(@lf&"Pos: "&$SC_ClassicCard_Pos[$i][0]&", "&$SC_ClassicCard_Pos[$i][1]+100&", "&$SC_ClassicModern_Dim [2][0]&", "&$SC_ClassicModern_Dim [2][1]) if $Str_SelectedTableBool=0 Then ;classic Layout _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Cards, $CardNr[5]*$SC_Cards_Width, 0, $SC_Cards_Width, $SC_Cards_Height, $SC_Width/2-($SC_Cards_Width)/2-18/2,50, $SC_Cards_Width, $SC_Cards_Height ) _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Cards, $CardNr[6]*$SC_Cards_Width, 0, $SC_Cards_Width, $SC_Cards_Height, $SC_Width/2-($SC_Cards_Width)/2+18/2,53, $SC_Cards_Width, $SC_Cards_Height ) Else _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Cards, $CardNr[5]*$SC_Cards_Width, 0, $SC_Cards_Width, 53, $SC_Width/2-($SC_Cards_Width)/2-19/2,60, $SC_Cards_Width, 53 ) _GDIPlus_GraphicsDrawImageRectRect ($hGraphic_Buffer, $hImg_Cards, $CardNr[6]*$SC_Cards_Width, 0, $SC_Cards_Width, 53, $SC_Width/2-($SC_Cards_Width)/2+19/2,60, $SC_Cards_Width, 53 ) _GDIPlus_GraphicsDrawLine ($hGraphic_Buffer, $SC_Width/2-($SC_Cards_Width)/2-19/2, 60+53, $SC_Width/2+($SC_Cards_Width)/2+19/2-1, 60+53, 0) EndIf _GDIPlus_GraphicsDispose($hGraphic_Buffer) EndFunc ;==> _Set_Cards Func _Set_Cards_Random() ;Gemeinschaftskarten Local $n = 52 Local $unique=True Global $CardNr[7] $CardNr[0] = Random(0, $n - 1, 1) for $i=0 to 5 Do $CardNr[$i+1] = Random(0, $n - 1, 1) $unique=True For $j=0 to $i if $CardNr[$j] = $CardNr[$i+1] Then $unique=False Next Until $unique next ;~ for $i=0 to 6 ;~ $CardNr[$i]=$i ;~ Next ;Hier werden die durchsichtigen Lables für das Scroll-Feature erstellt Global $Arr_Lbl_Card[7] _Ctrl_UnRegisterByIndex($Arr_Ctrls_Scroll, $i_Index_Cards) local $StartX = $SC_Width/2-2.5*$SC_ClassicModern_Dim [3][$Str_SelectedTableBool*2]-2*2 for $i=0 to 4 $Arr_Lbl_Card[$i] = GUICtrlCreateLabel('', $StartX+$i*($SC_ClassicModern_Dim [3][$Str_SelectedTableBool*2]+$Str_SelectedTableBool*5+2), 187, $SC_Cards_Width, $SC_Cards_Height) ; Board-Cards GUICtrlSetState ( -1, $GUI_HIDE ) _Ctrl_Register($Arr_Ctrls_Scroll, $Arr_Lbl_Card[$i] , $i_Index_Cards) next if $Str_SelectedTableBool=0 Then ;classic Layout $Arr_Lbl_Card[5] = GUICtrlCreateLabel('', $SC_Width/2-($SC_Cards_Width)/2-18/2,50, $SC_Cards_Width, $SC_Cards_Height ) GUICtrlSetState ( -1, $GUI_HIDE ) $Arr_Lbl_Card[6] = GUICtrlCreateLabel('', $SC_Width/2-($SC_Cards_Width)/2+18/2,53, $SC_Cards_Width, $SC_Cards_Height ) GUICtrlSetState ( -1, $GUI_HIDE ) Else $Arr_Lbl_Card[5] = GUICtrlCreateLabel('', $SC_Width/2-($SC_Cards_Width)/2-19/2,60, $SC_Cards_Width, 53 ) GUICtrlSetState ( -1, $GUI_HIDE ) $Arr_Lbl_Card[6] = GUICtrlCreateLabel('', $SC_Width/2-($SC_Cards_Width)/2+19/2,60, $SC_Cards_Width, 53 ) GUICtrlSetState ( -1, $GUI_HIDE ) EndIf _Ctrl_Register($Arr_Ctrls_Scroll, $Arr_Lbl_Card[5] , $i_Index_Cards) _Ctrl_Register($Arr_Ctrls_Scroll, $Arr_Lbl_Card[6] , $i_Index_Cards) _Set_Cards() EndFunc ;==> _Set_Cards_Random Func _Update() $Update_msg="" _Set_TitleStatus("Checking for Updates...") ;~ ConsoleWrite(@lf&"Jetzt update") _UpdateSkins() _UpdateSkinChanger() _Set_TitleStatus() if not $Update_msg="" Then msgbox(0,"Upate Summary",$Update_msg) EndFunc Func _UpdateSkinIni() local $FSO = ObjCreate('Scripting.FileSystemObject') if IsObj($FSO) Then ;~ ConsoleWrite(@lf&"$FSO created") Else msgbox(0,"Object creation error!","The creation of the object 'FSO' failed!") EndIf Local $iniContent[1][2] Local $index Local $SearchFolderObject=$FSO.GetFolder($Str_SkinFolder_abs) local $i ReDim $Arr_UniqueFolders[1] _ShowTempSubFolders($SearchFolderObject,$Str_SkinFolder_abs) ;~ _ArrayDisplay($Arr_UniqueFolders, "$Arr_UniqueFolders") if FileExists($Str_SkinFolder_abs & $Str_SkinIni) Then $iniContent = IniReadSection($Str_SkinFolder_abs & $Str_SkinIni, "structure") for $num=0 to UBound($Arr_UniqueFolders)-1 $index = _ArraySearch($iniContent, $Arr_UniqueFolders[$num]) if ($index=-1 and @error=6) Then ReDim $iniContent[UBound($iniContent)+1][2] $iniContent[UBound($iniContent)-1][0]=$Arr_UniqueFolders[$num] $iniContent[UBound($iniContent)-1][1]=1 ;Versionsnummer des jeweiligen Ordners; soll später manuell bei Änderung angepasst werden EndIf Next IniWriteSection($Str_SkinFolder_abs & $Str_SkinIni,"structure",$iniContent,1) Else if UBound($Arr_UniqueFolders)-1 > 0 Then for $num=0 to UBound($Arr_UniqueFolders)-1 ReDim $iniContent[UBound($iniContent)+1][2] $iniContent[UBound($iniContent)-1][0]=$Arr_UniqueFolders[$num] $iniContent[UBound($iniContent)-1][1]=1 ;Versionsnummer des jeweiligen Ordners; soll später manuell bei Änderung angepasst werden Next Else $iniContent[0][0]="" $iniContent[0][1]="" EndIf IniWriteSection($Str_SkinFolder_abs & $Str_SkinIni,"structure",$iniContent,1) ;~ _ArrayDisplay($iniContent, "$iniContent") EndIf EndFunc ;==> _UpdateSkinIni Func _UpdateSkins() ;~ ConsoleWrite(@lf&"updating Skins...") _UpdateSkinIni() local $FSO = ObjCreate('Scripting.FileSystemObject') if IsObj($FSO) Then ;~ ConsoleWrite(@lf&"$FSO created") Else msgbox(0,"Object creation error!","The creation of the object 'FSO' failed!") EndIf local $TempDirObject=$FSO.GetFolder(@TempDir) local $iniContent1[1][1],$iniContent2[1][1] local $newFolders[1][2] Local $Int_Bytes local $Int_TotalBytes Local $Int_CurrentBytes Local $Str_NewFolder local $Str_ServerZipFile_rel local $Str_ServerZipFile_abs Local $Str_LocalZipFile_rel local $Str_SearchSubFolder Local $Str_RemoveDir Local $num Local $index Local $ans local $error local $buffer = $Str_SkinFolder_rel ;~ $Str_SkinFolder_rel=$Str_SkinFolder_rel&"Test\" DirCreate(@TempDir & "\" & $Str_UpdateDir) ;~ ConsoleWrite(@LF & $Str_ServerAdress & StringReplace($Str_SkinFolder_rel,"\","/") & $Str_SkinIni) ;~ ConsoleWrite(@TempDir & "\" & $Str_UpdateDir & $Str_SkinIni & @LF) InetGet($Str_ServerAdress & StringReplace($Str_SkinFolder_rel,"\","/") & $Str_SkinIni, @TempDir & "\" & $Str_UpdateDir & $Str_SkinIni, 1, 1) While @InetGetActive ;~ TrayTip("Downloading Skins information", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(100) Wend $iniContent1 = IniReadSection(@TempDir & "\" & $Str_UpdateDir & $Str_SkinIni, "structure") ;~ ConsoleWrite(@LF & @TempDir & "\" & $Str_UpdateDir & $Str_SkinIni) ;~ if not FileExists($Str_SkinFolder_abs & $Str_SkinIni) Then CreateSkinIni() ;~ ConsoleWrite(@lf&"$Str_SkinFolder_abs = "&$Str_SkinFolder_abs) $iniContent2 = IniReadSection($Str_SkinFolder_abs & $Str_SkinIni, "structure") if UBound($iniContent2)>0 Then ;~ _ArrayDisplay($iniContent1, "$iniContent1") ;~ _ArrayDisplay($iniContent2, "$iniContent2") For $num=1 to $iniContent1[0][0] $index = _ArraySearch($iniContent2, $iniContent1[$num][0]) If ($index=-1 and @error=6) or ($iniContent1[$num][1] > $iniContent2[$index][1]) Then ;Ordner nicht gefunden auf Client-Computer oder neuere Version vorhanden ReDim $newFolders[UBound($newFolders)+1][2] $newFolders[UBound($newFolders)-1][0]=$iniContent1[$num][0] $newFolders[UBound($newFolders)-1][1]=$iniContent1[$num][1] EndIf Next Else $newFolders=$iniContent1 EndIf if UBound($newFolders)>1 Then $ans = msgbox(4,"","There are " & Ubound($newFolders)-1 & " new or changed skin folders! Update them now?") if $ans=6 Then ;~ _Set_TitleStatus("Receiving File info") For $num=1 to UBound($newFolders)-1 $Str_ServerZipFile_rel = StringReplace($newFolders[$num][0],"\","/") & ".zip" $Str_ServerZipFile_abs = $Str_ServerAdress & StringReplace($Str_SkinFolder_rel,"\","/") & $Str_ServerZipFile_rel $Int_TotalBytes += InetGetSize($Str_ServerZipFile_abs) ;~ ConsoleWrite(@lf&"Datei "&$Str_ServerZipFile_abs & "(" & InetGetSize($Str_ServerZipFile_abs) &" bytes)") _Set_TitleStatus("Receiving File info ["& $num & "/" & (UBound($newFolders)-1) & "]") ;~ TrayTip("Receiving File info ["& $num & "/" & (UBound($newFolders)-1) & "]" & @TAB & "Total: " & Round(($num/(UBound($newFolders)-1) )*100) & "%", $Str_ServerZipFile_rel, 10, 16) next ;~ _ArrayDisplay($newFolders) For $num=1 to UBound($newFolders)-1 ;~ ConsoleWrite(@lf&$Str_LocalZipFile_rel) $Str_NewFolder = StringLeft($newFolders[$num][0],StringInStr($newFolders[$num][0],"\",0,-1)) ;~ $Str_NewFolder = StringMid($Str_NewFolder,2) $Str_ServerZipFile_rel = StringReplace($newFolders[$num][0],"\","/") & ".zip" $Str_ServerZipFile_abs = $Str_ServerAdress & StringReplace($Str_SkinFolder_rel,"\","/") & $Str_ServerZipFile_rel $Str_LocalZipFile_rel = $newFolders[$num][0] & ".zip" DirCreate(@TempDir & "\" & $Str_UpdateDir & $Str_NewFolder) $Int_Bytes = InetGetSize($Str_ServerZipFile_abs) ;~ ConsoleWrite(" Now ...") InetGet($Str_ServerZipFile_abs, @TempDir & "\" &$Str_UpdateDir & $Str_LocalZipFile_rel, 1, 1) While @InetGetActive ;~ TrayTip("Downloading File ["& $num & "/" & (UBound($newFolders))-1 & "]" & @TAB & "Total: " & Round((($Int_CurrentBytes + @InetGetBytesRead)/$Int_TotalBytes)*100) & "%", $Str_LocalZipFile_rel & " " & Round((@InetGetBytesRead/$Int_Bytes)*100) & "%" , 10, 16) _Set_TitleStatus("Downloading... (Total: " & Round((($Int_CurrentBytes + @InetGetBytesRead)/$Int_TotalBytes)*100) & "%) " & $Str_LocalZipFile_rel & " " & Round((@InetGetBytesRead/$Int_Bytes)*100) & "% ") ;~ GUICtrlSetData($Label_Status, "Downloading File ["& $num & "/" & (UBound($newFolders))-1 & "]" & " Total: " & Round((($Int_CurrentBytes + @InetGetBytesRead)/$Int_TotalBytes)*100) & "% - " & $Str_LocalZipFile_rel & " " & Round((@InetGetBytesRead/$Int_Bytes)*100) & "% ") Sleep(50) Wend ;~ Sleep(100) ;~ ConsoleWrite(" complete!") $Int_CurrentBytes += $Int_Bytes Next ;~ _ArrayDisplay($newFolders, "$newFolders") ;~ ChangeArrows(True) ;~ ChangeLayout(True) ;~ ChangeCards(True) ;~ ChangeCardBacks(True) For $num=1 to UBound($newFolders)-1 $Str_NewFolder = StringLeft($newFolders[$num][0],StringInStr($newFolders[$num][0],"\",0,-1)) ;~ $Str_NewFolder = StringMid($Str_NewFolder,2) $Str_LocalZipFile_rel = $newFolders[$num][0] & ".zip" ;~ msgbox(0,"",$Str_SkinFolder_abs & $newFolders[$num][0]) DirRemove($Str_SkinFolder_abs & $newFolders[$num][0]&"\",1) ;~ msgbox (0,"","DirRemove fertig") ;~ Sleep(2000) if not FileExists($Str_SkinFolder_abs & $newFolders[$num][0]) Then ;~ TrayTip("Unzipping File "& $num & "/" & UBound($newFolders)-1 , $Str_LocalZipFile_rel, 10, 16) _Set_TitleStatus($Str_StatusSpacer & "Unzipping File "& $num & "/" & UBound($newFolders)-1 & " "& $Str_LocalZipFile_rel) ;~ GUICtrlSetData($Label_Status, "Unzipping File "& $num & "/" & UBound($newFolders)-1 & " " & $Str_LocalZipFile_rel & " ") ;~ msgbox(0,"",@TempDir & "\" & $Str_UpdateDir & $Str_LocalZipFile_rel & @LF & $Str_SkinFolder_abs & $Str_NewFolder) ConsoleWrite("_Zip_UnzipAll("& @TempDir & "\" & $Str_UpdateDir & $Str_LocalZipFile_rel &", "&$Str_SkinFolder_abs & $Str_NewFolder & ")"& @LF) $ans=_Zip_UnzipAll(@TempDir & "\" & $Str_UpdateDir & $Str_LocalZipFile_rel, $Str_SkinFolder_abs & $Str_NewFolder) if @error<>0 Then ;unzip fehlgeschlagen und Ordner vorher schon gelöscht $error = $error & @error IniDelete($Str_SkinFolder_abs & $Str_SkinIni, "structure",$newFolders[$num][0]) Else IniWrite($Str_SkinFolder_abs & $Str_SkinIni, "structure",$newFolders[$num][0],$newFolders[$num][1]) EndIf Sleep(100) Else ;~ msgbox (0,"Ordner existiert noch!",$Str_SkinFolder_abs & $newFolders[$num][0]) $error = $error & "9" EndIf Next if StringLen($error)<>0 then If StringInStr($error,"3") <> 0 Then $error = $error & @LF & "The handling for zip files (.zip) is probably not set to Windows default! Try unzipping " & @LF & "from " & @TempDir & "\" & $Str_UpdateDir & @LF & " to " & $Str_SkinFolder_abs & " manually." Msgbox(0,"Error", "There was an error while unzipping!" & @LF & "Error code: " & $error) Else ReDim $Arr_UniqueFolders[1] _ShowTempSubFolders($TempDirObject,@TempDir) ;~ _ArrayDisplay($Arr_UniqueFolders, "$Arr_UniqueFolders") For $num=1 to UBound($newFolders)-1 $Str_SearchSubFolder = StringMid($newFolders[$num][0],StringInStr($newFolders[$num][0],"\",0,-1)+1) $index= _ArrayFindAll($Arr_UniqueFolders,$Str_SearchSubFolder,0,0,0,1) Local $Str_RemoveDir for $i=0 to UBound($index)-1 $Str_RemoveDir = StringLeft($Arr_UniqueFolders[$index[$i]],StringInStr($Arr_UniqueFolders[$index[$i]],"\",0,-1)-1) DirRemove(@TempDir & $Str_RemoveDir,1) Next ;~ _ArrayDisplay($index, "$index") Next EndIf ; Aufräumen im Temp-Ordner: SUchen nach Ordnern mit den Namen der heruntergeladenen Dateien ;~ ChangeArrows() ;~ ChangeLayout() ;~ ChangeCards() ;~ ChangeCardBacks() _Set_TitleStatus() ;~ GUICtrlSetData($Label_Status, $Str_StatusDefault) $Update_msg = $Update_msg &@lf&Ubound($newFolders)-1 &"skins updated." EndIf Else $Update_msg = $Update_msg &@lf&"There are NO new or changed skin folders!" ;~ msgbox(0,"","There are NO new or changed skin folders!") EndIf DirRemove(@TempDir & "\" & $Str_UpdateDir,1) ;~ _ArrayDisplay($Folders, "$Folders") TrayTip("clears any tray tip", "", 0) $Str_SkinFolder_rel=$buffer _UpdateSkinIni() EndFunc ;==> _UpdateSkins Func _UpdateSkinChanger() ;MsgBox(0,"", "Datei: " & $Str_ServerAdress & $Str_ServerVersionFile & @LF & "Ziel: " & $Str_PPDir_abs & $Str_HdVersionFile) ;$h_HdVersionFile = FileOpen($Str_PPDir_abs & "\SkinChangerSettings.txt", 0) InetGet($Str_ServerAdress & $Str_ServerVersionFile, $Str_HdVersionFile, 1, 0) Local $h_HdVersionFile $h_HdVersionFile = FileOpen($Str_HdVersionFile, 0) ; Check if file opened for reading OK If $h_HdVersionFile = -1 Then MsgBox(0, "Error", "Unable to open VersionServerFile." & @LF & "Check for Update failed!") Exit EndIf ; Read in lines of text until the EOF is reached ;$x = 0 While 1 Local $Str_Line $Str_Line = FileReadLine($h_HdVersionFile) If @error = -1 Then FileClose($h_HdVersionFile) FileDelete($Str_HdVersionFile) ExitLoop EndIf _ArrayAdd($Arr_VersionFileLines, $Str_Line) ;_ArrayDisplay ($Arr_VersionFileLines) WEnd Local $Str_NewSkinChangerVersion Local $Str_ServerSkinChangerFile Local $Str_ServerSkinChangerUpdaterFile Local $Str_HdSkinChangerUpdaterFile ;Local $Str_HdSkinChangerFile $Str_NewSkinChangerVersion = $Arr_VersionFileLines[1] $Str_ServerSkinChangerFile = StringTrimLeft($Arr_VersionFileLines[2], 1) $Str_ServerSkinChangerUpdaterFile = StringTrimLeft($Arr_VersionFileLines[3], 1) $Str_HdSkinChangerUpdaterFile = ".\SkinChangerUpdate.exe" ;$Str_HdSkinChangerFile = ".\SkinChanger.exe" ;MsgBox(0, "New Version available","Current version is: " & $Str_CurrentSkinChangerVersion & @LF & "New version is: " & $Arr_VersionFileLines[1]) Local $MsgID If $Str_CurrentSkinChangerVersion < $Str_NewSkinChangerVersion Then $MsgID = MsgBox(4, "New Version available", "Current version is: " & $Str_CurrentSkinChangerVersion & @LF & "New version is: " & $Arr_VersionFileLines[1] & @LF & @LF & "Would You like to download the update?" & @LF & "Note: The update process will close SkinChanger and restart it when finished.") If $MsgID = 6 Then ;Yes-Button clicked ;$UpdateCancel = "false" Local $Str_CurrentUpdaterVersion $Str_CurrentUpdaterVersion = IniRead($Str_IniFile, "UpdaterVersion", "Uver_current", 0) ;Updater hat sich in die Ini eingetragen, als er gestartet wurde das letzte mal... Local $Str_NewUpdaterVersion $Str_NewUpdaterVersion = $Arr_VersionFileLines[4] If FileExists($Str_HdSkinChangerUpdaterFile) And $Str_CurrentUpdaterVersion >= $Str_NewUpdaterVersion Then ;wenn aktuellester Updater vorhanden Run($Str_HdSkinChangerUpdaterFile) _exitMain() Else ;sonst Updater herunterladen ;Lade Updater herunter FileDelete($Str_HdSkinChangerUpdaterFile) ;alten Updater löschen ;MsgBox(0, "Download Server Files","Server File: " & $Str_ServerAdress & $Str_ServerSkinChangerUpdaterFile & @LF & @LF & "Ziel: " & $Str_HdSkinChangerUpdaterFile) Local $Int_TotalBytes $Int_TotalBytes = InetGetSize($Str_ServerAdress & $Str_ServerSkinChangerFile) InetGet($Str_ServerAdress & $Str_ServerSkinChangerUpdaterFile, $Str_HdSkinChangerUpdaterFile, 1, 1) While @InetGetActive TrayTip("Downloading update program", Round((@InetGetBytesRead/$Int_TotalBytes)*100)&"%" , 5, 16) Sleep(250) WEnd TrayTip("clears any tray tip", "", 0) TrayTip("", "starting update program...", 5, 16) Run($Str_HdSkinChangerUpdaterFile) TrayTip("clears any tray tip", "", 0) EndIf Else $Update_msg = $Update_msg & @lf&"SkinChanger Update canceled" EndIf Else $Update_msg = $Update_msg & @lf&"No SkinChanger Update available" ;~ $MsgID = MsgBox(0, "No new Version available", "You have the latest version!") EndIf EndFunc ;==> _UpdateSkinChanger Func _ChkPGDir(ByRef $Str_PGDir_abs, ByRef $Str_PPDir_abs) ;weist ein neues PartyGaming-Verzeichnis zu Local $MsgID $MsgID = 1 Local $h_Error $MsgID = MsgBox(4, "", "The PartyPoker folder was not found in " & $Str_PPDir_abs & "!. Do You want to change the default?" & @LF & @LF & "Press Yes to select the PartyGaming folder." & @LF & "Press No if you want to exit the program.") If $MsgID = 6 Then $Str_PGDir_abs = "" While $Str_PGDir_abs = "" $Str_PGDir_abs = FileSelectFolder("Select the PartyGaming folder...", "") If $Str_PGDir_abs = "" Then $MsgID = MsgBox(4, "", "No Folder selected! Retry?" & @LF & @LF & "Press Yes to select the PartyGaming folder again." & @LF & "Press No if you want to exit the program.") If $MsgID = 7 Then Exit ElseIf FileExists($Str_PGDir_abs) Then $h_Error = IniWrite($Str_IniFile, "paths", "PGDir", $Str_PGDir_abs) _UpdatePaths() ExitLoop Else $MsgID = MsgBox(4, "", "No Folder selected! Retry?" & @LF & @LF & "Press Yes to select the PartyGaming folder again." & @LF & "Press No if you want to exit the program.") If $MsgID = 7 Then Exit EndIf WEnd Else Exit EndIf EndFunc ;==> _ChkPGDir Func _ChkSkinsDir(ByRef $Str_SkinsDir_abs) Local $MsgID $MsgID = 1 Local $h_Error local $msg= @LF & @LF & "Press Yes to select the Skins folder." & @LF & "Press No if you want to the default Skins folder at " & @WorkingDir & "\ ." & @LF & "Press Cancel to exit the program, NOW." & @LF & @LF & "Skins update will start automatically, after selection." $MsgID = MsgBox(3, "","The Skins folder was not found in " & $Str_SkinsDir_abs & "! Do You want to select the folder manually?" & $msg) If $MsgID = 6 Then ;Yes $Str_SkinsDir_abs="" $Str_SkinsDir_abs = FileSelectFolder("Select the Skins folder...", "") If $Str_SkinsDir_abs = "" Then $MsgID = MsgBox(4, "", "No Folder selected! Retry?" & @LF & @LF & "Press Yes to select the Skins folder again." & @LF & "Press No if you want to exit the program, NOW.") If $MsgID = 7 Then Exit ElseIf FileExists($Str_SkinsDir_abs) Then $h_Error = IniWrite($Str_IniFile, "paths", "SkinsDir", $Str_SkinsDir_abs) _UpdatePaths() Else $MsgID = MsgBox(4, "", "No Folder selected! Retry?" & @LF & @LF & "Press Yes to select the Skins folder again." & @LF & "Press No if you want to exit the program, NOW.") If $MsgID = 7 Then Exit EndIf ElseIf $MsgID = 7 Then ;No $Str_SkinsDir_abs = @WorkingDir & "\" & StringLeft($Str_SkinFolder_rel,StringLen($Str_SkinFolder_rel)-1) $h_Error = IniWrite($Str_IniFile, "paths", "SkinsDir", $Str_SkinsDir_abs) If FileExists($Str_SkinsDir_abs) Then _UpdatePaths() Else DirCreate($Str_SkinsDir_abs) _UpdatePaths() _UpdateSkins() EndIf Else Exit EndIf EndFunc ;==> _ChkSkinsDir Func _SetVars() Local $chk $chk = 0 Local $h_Error While $chk = 0 If FileExists($Str_PPDir_abs) Then ;wenn PP-Verzeichnis gefunden If not FileExists($Str_ImgLangDir_abs) Then ;wenn Standard langImg-Verzeichnis nicht existiert, dann wird andere SprachVersion angenommen if $Str_ImgLangDir_rel = $Str_ImgLangDir_rel_us Then $Str_ImgLangDir_rel = $Str_ImgLangDir_rel_de else $Str_ImgLangDir_rel = $Str_ImgLangDir_rel_us EndIf EndIf If FileExists($Str_ImgBckpDir_abs)=0 Or FileExists($Str_ImgBckpLangDir_abs)=0 Then _BackupImages() ;alle Bilder sichern, wenn Fehler beim Kopieren oder Verz. nicht existent, dann Fehlermeldung für Benutzer ;Msgbox(0,"",GUICtrlRead($Radio_Table_classic)) $chk = 1 Else ;PP-Verzeichnis nicht gefunden _ChkPGDir($Str_PGDir_abs, $Str_PPDir_abs) EndIf WEnd $chk = 0 While $chk = 0 ;~ msgbox(0,"",$Str_SkinsDir_abs) If FileExists($Str_SkinsDir_abs) Then $chk = 1 ElseIf FileExists($Str_PPDir_abs & $Str_SkinsDir_rel) Then ; es wird nach dem SKins-Ordner im PP-Verzeichnis geschaut $Str_SkinsDir_abs=$Str_PPDir_abs & $Str_SkinsDir_rel $h_Error = IniWrite($Str_IniFile, "paths", "SkinsDir", $Str_SkinsDir_abs) _UpdatePaths() $chk = 1 Else _ChkSkinsDir($Str_SkinsDir_abs) EndIf WEnd Local $LayoutsDirTemp, $ArrowsDirTemp, $CardBacksDirTemp if $Str_StandardTable=$Str_Classic Then $LayoutsDirTemp = $Str_LayoutsClassicDir_abs $ArrowsDirTemp = $Str_ArrowsClassicDir_abs $CardBacksDirTemp = $Str_CardBacksClassicDir_abs Else $LayoutsDirTemp = $Str_LayoutsModernDir_abs $ArrowsDirTemp = $Str_ArrowsModernDir_abs $CardBacksDirTemp = $Str_CardBacksModernDir_abs EndIf ;~ ;~ ConsoleWrite(@lf&"$ArrowsDirTemp: "&$ArrowsDirTemp&@lf) _FillArrayFileSearch($Arr_Layouts, $LayoutsDirTemp, "*.*") ;befüllt das Array mit den Ordnernamen _FillArrayFileSearch($Arr_Cards, $Str_CardsDir_abs, "*.*") ;befüllt das Array mit den Ordnernamen ;~ _ArrayDisplay($Arr_Cards) _FillArrayFileSearch($Arr_1pixSeats, $Str_1pixSeatsDir_abs, "*.*") ;befüllt das Array mit den Ordnernamen _FillArrayFileSearch($Arr_Arrows, $ArrowsDirTemp, "*.*") ;befüllt das Array mit den Ordnernamen _FillArrayFileSearch($Arr_CardBacks, $CardBacksDirTemp, "*.*") ;befüllt das Array mit den Ordnernamen _FillArrayFileSearch($Arr_Frames, $Str_FramesDir_abs, "*.*") ;befüllt das Array mit den Ordnernamen ;~ ConsoleWrite(@lf&"Anzahl der Arrows: "& UBound($Arr_Arrows) & " gefunden in: "&$ArrowsDirTemp) EndFunc ;==> _SetVars Func _Switch_Table() if $Str_SelectedTable = $Str_Classic Then $Str_SelectedTable = $Str_Modern $Str_StandardTable = $Str_SelectedTable $Str_SelectedTableBool = 1 Else $Str_SelectedTable = $Str_Classic $Str_StandardTable = $Str_SelectedTable $Str_SelectedTableBool = 0 EndIf ;Bei Ändern des Tables GUI schließen und neue öffnen! GUIRegisterMsg($WM_PAINT, "") GUISetOnEvent($GUI_EVENT_CLOSE, "") GUIDelete($hWnd_SC) ;~ _GDIPlus_Startup() ;~ _Init() ;~ _Load_INI() _CreateSet_GUI() ;~ _Redraw_GUI() ;~ ConsoleWrite(@lf&"Wechsele Table zu: "&$Str_SelectedTable) $Str_Author_Layout = IniRead($Str_LayoutsDir_abs & "\" & $Str_SelectedTable & "\" & $Str_SelectedLayout & "\" & $Str_IniFile_Info_Layout, "info", "author", "n.n.") ;ausgewählter Table wird auf GUI vermerkt ;~ GUICtrlSetData($Label_Tables, $Str_Table&$Str_SelectedTable) EndFunc ;==> _Switch_Table ;~ Func _MouseWheel_Events($iMode) ;~ Switch $iMode ;~ Case 1 ;~ ToolTip("Change Skin down") ;~ Case 2 ;~ ToolTip("Change Skin up") ;~ EndSwitch ;~ EndFunc ;==> _MouseWheel_Events Func _ChangeCards();$none=False) ;~ if $none=False Then if $Str_SelectedCards="" THen $Str_SelectedCards=_GetRandom($Arr_Cards) $Str_StandardCards=$Str_SelectedCards _Set_SkinDirDefault() _Update_Cards_Variables() _Set_Cards() ;~ _Set_Cards_Random() ; falls auch die Karten neu gemischt werden sollen _Set_LayoutCardsFrame() ;neue Karten integrieren, vorher aber Inhalt neu aufbauen, damit Transparenz erhalten bleibt! ;~ GUICtrlSetData($Label_Cards,$Str_Cards&$Str_SelectedCards) ;if $Bool_SetGui=False Then ChangeLayout() EndFunc ;==> _ChangeCards Func _ChangeLayout() ;~ ConsoleWrite(@lf&"ChangeLayout rein: " & $Str_SelectedTable) if $Str_SelectedLayout="" THen $Str_SelectedLayout=_GetRandom($Arr_Layouts) $Str_StandardLayout=$Str_SelectedLayout _Set_SkinDirDefault() _Update_Layouts_Variables() if $Str_SelectedTable = $Str_Modern Then _Update_Layouts_modern_Variables() $Str_Author_Layout = IniRead($Str_LayoutsDir_abs & "\" & $Str_SelectedTable & "\" & $Str_SelectedLayout & "\" & $Str_IniFile_Info_Layout, "info", "author", "n.n.") _Set_Avatare() _Set_Layout() _Set_LayoutCardsFrame() ;~ GUICtrlSetImage($Pic_Layout, $Str_LayoutPic) ;~ GUICtrlSetData($Label_Layouts,$Str_Layout&$Str_SelectedLayout) EndFunc ;==> _ChangeLayout Func _ChangeFrame() ;~ ConsoleWrite(@lf&"ChangeLayout rein: " & $Str_SelectedTable) if $Str_SelectedFrame="" THen $Str_SelectedFrame=_GetRandom($Arr_Frames) $Str_StandardFrame=$Str_SelectedFrame _Set_SkinDirDefault() ;~ ConsoleWrite(@lf&"Frame wird geändert zu: "&$Str_SelectedFrame) _Update_Frames_Variables() _Set_Frame() _Set_LayoutCardsFrame() ;neue Karten integrieren, vorher aber Inhalt neu aufbauen, damit Transparenz erhalten bleibt! ;~ GUICtrlSetImage($Pic_Layout, $Str_LayoutPic) ;~ GUICtrlSetData($Label_Layouts,$Str_Layout&$Str_SelectedLayout) EndFunc ;==> _ChangeFrame Func _ChangeArrows() ;~ ConsoleWrite(@lf&"_ChangeArrows rein...") if $Str_SelectedArrows="" THen $Str_SelectedArrows=_GetRandom($Arr_Arrows) $Str_StandardArrows=$Str_SelectedArrows _Set_SkinDirDefault() ;~ ConsoleWrite(@lf&"Arrows werden geändert zu: "&$Str_SelectedArrows) _Update_Arrows_Variables() _Set_Avatare() _Set_Layout() _Set_LayoutCardsFrame() ;neue Karten integrieren, vorher aber Inhalt neu aufbauen, damit Transparenz erhalten bleibt! ;~ GUICtrlSetImage($Pic_Layout, $Str_LayoutPic) ;~ GUICtrlSetData($Label_Layouts,$Str_Layout&$Str_SelectedLayout) EndFunc ;==> _ChangeFrame Func _ChangeCardBacks() ;~ ConsoleWrite(@lf&"_ChangeArrows rein...") if $Str_SelectedCardBacks="" THen $Str_SelectedCardBacks=_GetRandom($Arr_CardBacks) $Str_StandardCardBacks=$Str_SelectedCardBacks _Set_SkinDirDefault() ;~ ConsoleWrite(@lf&"CardBacks werden geändert zu: "&$Str_SelectedCardBacks) _Update_CardBacks_Variables() _Set_Avatare() _Set_Layout() _Set_LayoutCardsFrame() ;neue Karten integrieren, vorher aber Inhalt neu aufbauen, damit Transparenz erhalten bleibt! ;~ GUICtrlSetImage($Pic_Layout, $Str_LayoutPic) ;~ GUICtrlSetData($Label_Layouts,$Str_Layout&$Str_SelectedLayout) EndFunc ;==> _ChangeFrame Func _CardsUp() if $Str_SelectedCards="" THen $Str_SelectedCards=_GetRandom($Arr_Cards,1) $Str_StandardCards=$Str_SelectedCards ;~ ConsoleWrite(@lf&" $Str_SelectedCards: "& $Str_SelectedCards) local $n = _ArraySearch($Arr_Cards,$Str_StandardCards) ;~ ConsoleWrite(@lf&" @error: "& @error) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=1 THen $n=UBound($Arr_Cards) ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=2 EndIf ;~ ConsoleWrite(@lf&" $n: "& $n) $Str_SelectedCards = $Arr_Cards[$n-1] _ChangeCards() EndFunc ;==> _CardsUp Func _CardsDown() if $Str_SelectedCards="" THen $Str_SelectedCards=_GetRandom($Arr_Cards,1) $Str_StandardCards=$Str_SelectedCards local $n = _ArraySearch($Arr_Cards,$Str_StandardCards) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=UBound($Arr_Cards)-1 THen $n=0 ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=0 EndIf $Str_SelectedCards = $Arr_Cards[$n+1] _ChangeCards() EndFunc ;==> _CardsDown Func _LayoutUp() if $Str_SelectedLayout="" THen $Str_SelectedLayout=_GetRandom($Arr_Layouts,1) $Str_StandardLayout=$Str_SelectedLayout ;~ ConsoleWrite(@lf&" $Str_SelectedLayout: "& $Str_SelectedLayout) local $n = _ArraySearch($Arr_Layouts,$Str_StandardLayout) ;~ ConsoleWrite(@lf&" @error: "& @error) ;~ $n=15 if $n=1 THen $n=UBound($Arr_Layouts) ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=2 EndIf ;~ ConsoleWrite(@lf&"$n="&$n) ;~ ConsoleWrite(@lf&"UBound($Arr_Layouts)="&UBound($Arr_Layouts)) $Str_SelectedLayout = $Arr_Layouts[$n-1] $Str_StandardLayout=$Str_SelectedLayout _ChangeLayout() EndFunc ;==> _LayoutUp Func _LayoutDown() if $Str_SelectedLayout="" THen $Str_SelectedLayout=_GetRandom($Arr_Layouts,1) $Str_StandardLayout=$Str_SelectedLayout local $n = _ArraySearch($Arr_Layouts,$Str_StandardLayout) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=UBound($Arr_Layouts)-1 THen $n=0 ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=0 EndIf $Str_SelectedLayout = $Arr_Layouts[$n+1] $Str_StandardLayout=$Str_SelectedLayout _ChangeLayout() EndFunc ;==> _LayoutDown Func _FrameUp() if $Str_SelectedFrame="" THen $Str_SelectedFrame=_GetRandom($Arr_Frames,1) $Str_StandardFrame=$Str_SelectedFrame ;~ ConsoleWrite(@lf&" $Str_SelectedFrame: "& $Str_SelectedFrame) local $n = _ArraySearch($Arr_Frames,$Str_StandardFrame) ;~ ConsoleWrite(@lf&" @error: "& @error) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=1 THen $n=UBound($Arr_Frames) ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=2 EndIf ;~ ConsoleWrite(@lf&" $n: "& $n) $Str_SelectedFrame = $Arr_Frames[$n-1] $Str_StandardFrame=$Str_SelectedFrame _ChangeFrame() EndFunc ;==> _FrameUp Func _FrameDown() if $Str_SelectedFrame="" THen $Str_SelectedFrame=_GetRandom($Arr_Frames,1) $Str_StandardFrame=$Str_SelectedFrame local $n = _ArraySearch($Arr_Frames,$Str_StandardFrame) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=UBound($Arr_Frames)-1 THen $n=0 ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=0 EndIf $Str_SelectedFrame = $Arr_Frames[$n+1] $Str_StandardFrame=$Str_SelectedFrame _ChangeFrame() EndFunc ;==> _FrameDown Func _ArrowsUp() if $Str_SelectedArrows="" THen $Str_SelectedArrows=_GetRandom($Arr_Arrows,1) $Str_StandardArrows=$Str_SelectedArrows ;~ ConsoleWrite(@lf&" $Str_SelectedArrows: "& $Str_SelectedArrows) local $n = _ArraySearch($Arr_Arrows,$Str_StandardArrows) ;~ ConsoleWrite(@lf&" @error: "& @error) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=1 THen $n=UBound($Arr_Arrows) ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=2 EndIf ;~ ConsoleWrite(@lf&" $n: "& $n) $Str_SelectedArrows = $Arr_Arrows[$n-1] $Str_StandardArrows=$Str_SelectedArrows _ChangeArrows() EndFunc ;==> _ArrowsUp Func _ArrowsDown() if $Str_SelectedArrows="" THen $Str_SelectedArrows=_GetRandom($Arr_Arrows,1) $Str_StandardArrows=$Str_SelectedArrows local $n = _ArraySearch($Arr_Arrows,$Str_StandardArrows) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=UBound($Arr_Arrows)-1 THen $n=0 ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=0 EndIf $Str_SelectedArrows = $Arr_Arrows[$n+1] $Str_StandardArrows=$Str_SelectedArrows _ChangeArrows() EndFunc ;==> _ArrowsDown Func _CardBacksUp() if $Str_SelectedCardBacks="" THen $Str_SelectedCardBacks=_GetRandom($Arr_CardBacks,1) $Str_StandardCardBacks=$Str_SelectedCardBacks ;~ ConsoleWrite(@lf&" $Str_SelectedCardBacks: "& $Str_SelectedCardBacks) local $n = _ArraySearch($Arr_CardBacks,$Str_StandardCardBacks) ;~ ConsoleWrite(@lf&" @error: "& @error) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=1 THen $n=UBound($Arr_CardBacks) ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=2 EndIf ;~ ConsoleWrite(@lf&" $n: "& $n) $Str_SelectedCardBacks = $Arr_CardBacks[$n-1] $Str_StandardCardBacks=$Str_SelectedCardBacks _ChangeCardBacks() EndFunc ;==> _CardBacksUp Func _CardBacksDown() if $Str_SelectedCardBacks="" THen $Str_SelectedCardBacks=_GetRandom($Arr_CardBacks,1) $Str_StandardCardBacks=$Str_SelectedCardBacks local $n = _ArraySearch($Arr_CardBacks,$Str_StandardCardBacks) ;msgbox (0,"Nummer des Kartendekcs",$n) if $n=UBound($Arr_CardBacks)-1 THen $n=0 ElseIf $n=-1 Then ;_ArraySearch brachte kein Ergebnis $n=0 EndIf $Str_SelectedCardBacks = $Arr_CardBacks[$n+1] $Str_StandardCardBacks=$Str_SelectedCardBacks _ChangeCardBacks() EndFunc ;==> _CardBacksDown Func _Install_Skin() ;~ GUICtrlSetData($Label_Status, $Str_StatusSpacer & "installing layout...") _Set_TitleStatus("Installing Skins...") ;~ Local $result,$installed_sth,$msg Local $LayoutsDirTemp Local $ImgDirTemp Local $ImgLangDirTemp Local $outbtn Local $Img_rel if $Str_SelectedTable=$Str_Classic then $LayoutsDirTemp = $Str_LayoutsClassicDir_abs & "\" & $Str_SelectedLayout $ImgDirTemp=$Str_ImgDir_abs & $Str_ImgClassic_rel $ImgLangDirTemp=$Str_ImgLangDir_abs & $Str_ImgClassic_rel $outbtn="\out.gif" $Img_rel=$Str_Classic ;FileCopy($Str_ImgBckpDir_abs & $Str_ImgClassic_rel & "\out.gif", $Str_ImgLangDir_abs & $Str_ImgClassic_rel, 1) ;FileCopy($Str_ImgBckpDir_abs & "\congratulations.gif", $Str_ImgLangDir_abs & "\", 1) Else $LayoutsDirTemp = $Str_LayoutsModernDir_abs & "\" & $Str_SelectedLayout $ImgDirTemp=$Str_ImgDir_abs & $Str_ImgModern_rel $ImgLangDirTemp=$Str_ImgLangDir_abs & $Str_ImgModern_rel $outbtn="\out_button.gif" $Img_rel=$Str_Modern ;FileCopy($Str_ImgBckpDir_abs & $Str_ImgModern_rel & "\out_button.png", $Str_ImgLangDir_abs & $Str_ImgModern_rel, 1) ;FileCopy($Str_ImgBckpDir_abs & "\congratulations.gif", $Str_ImgLangDir_abs & "\", 1) EndIf $installed_sth = False If $Str_SelectedLayout <> "" Then ;zunächst backup herstellen, damit bei Layouts mit wenigen dateien keine alten Layoutdateien bleiben ;~ msgbox(0,$Str_ImgBckpDir_abs,$Str_ImgBckpDir_abs) ;~ msgbox(0,$Str_ImgDir_abs,$Str_ImgDir_abs) $result = FileCopy($Str_ImgBckpDir_abs & "\*.*", $Str_ImgDir_abs & "\", 9) ConsoleWrite(@lf&"result copy back: "& $Str_ImgBckpDir_abs& " is: "&$result) $result = FileCopy($Str_ImgBckpLangDir_abs & "\*.*", $Str_ImgLangDir_abs & "\", 9) ConsoleWrite(@lf&"result copy langback: "& $Str_ImgBckpLangDir_abs& " is: "&$result) _FillArrayFileSearch($Arr_LayoutFiles, $LayoutsDirTemp, "*.*") ;befüllt das Array mit den Dateinamen ;msgbox(0,"",$LayoutsDirTemp & "\*.*" & @LF & $ImgDirTemp & "\") $result=FileCopy($LayoutsDirTemp & "\*.*", $ImgDirTemp & "\", 9) ConsoleWrite(@lf&"Copied "& $LayoutsDirTemp & "\*.*" & " to " & $ImgDirTemp & "\") if $result=0 then $msg=$msg& "Layout files were not copied correctly!" & @LF ;msgbox(0,"","fertig! Erfolg? "& $result) _ArraySort($Arr_LayoutFiles) ; sort the array to be able to do a binary search ;_ArrayDisplay( $Arr_LayoutFiles, "sorted" ) ; display sorted array Local $iKeyIndex $iKeyIndex = _ArrayBinarySearch($Arr_LayoutFiles, $outbtn) ; Lookup existing entry "out.gif" If Not @error Then FileCopy($LayoutsDirTemp & "\" & $Arr_LayoutFiles[$iKeyIndex], $ImgLangDirTemp & "\", 1) ConsoleWrite(@lf&"Copied "&$LayoutsDirTemp & "\" & $Arr_LayoutFiles[$iKeyIndex] & "to " & $ImgLangDirTemp & "\") EndIf ;$iKeyIndex = _ArrayBinarySearch($Arr_LayoutFiles, "congratulations.gif") ; Lookup existing entry "out.gif" ;If Not @error Then FileCopy($LayoutsDirTemp & "\" & $Arr_LayoutFiles[$iKeyIndex], $Str_ImgLangDir_abs & "\", 1) $installed_sth = True EndIf If $Str_SelectedCards <> "" Then $result=FileCopy($Str_CardsDir_abs & "\" & $Str_SelectedCards & "\*.*", $ImgDirTemp & "\", 1) ConsoleWrite(@lf&"Copied "& $Str_CardsDir_abs & "\" & $Str_SelectedCards & "\*.*"& " to " & $ImgDirTemp & "\") if $result=0 then $msg=$msg& "Card file was not copied correctly!" & @LF $installed_sth = True EndIf If $Str_SelectedTable <> "" Then $result = FileCopy($Str_1pixSeatsDir_abs & "\" & $Str_Selected1pixSeats & "\*.*", $ImgDirTemp & "\", 1) ConsoleWrite(@lf&"Copied "& $Str_1pixSeatsDir_abs & "\" & $Str_Selected1pixSeats & "\*.*"& " to " & $ImgDirTemp & "\") if $result=0 then $msg=$msg& "1pix files were not copied correctly!" & @LF ;msgbox(0,"","Copy : " & $Str_1pixSeatsDir_abs & "\" & $Str_Selected1pixSeats & "\*.*"& " to " & $ImgDirTemp & "\" & " Success: " & $result) $installed_sth = True EndIf If $Str_SelectedArrows <> "" Then $result=FileCopy($Str_ArrowsDir_abs & "\" & $Str_SelectedTable & "\" & $Str_SelectedArrows & "\*.*", $ImgDirTemp & "\", 1) ConsoleWrite(@lf&"Copied "&$Str_ArrowsDir_abs & "\" & $Str_SelectedTable & "\" & $Str_SelectedArrows & "\*.*" & " to " & $ImgDirTemp & "\") if $result=0 then $msg=$msg& "Arrow files were not copied correctly!" & @LF $installed_sth = True EndIf If $Str_SelectedCardBacks <> "" Then $result=FileCopy($Str_CardBacksDir_abs & "\" & $Img_rel & "\" & $Str_SelectedCardBacks & "\*.*", $ImgDirTemp & "\", 1) ConsoleWrite(@lf&"Copied "& $Str_CardBacksDir_abs & "\" & $Img_rel & "\" & $Str_SelectedCardBacks & "\*.*" & " to " & $ImgDirTemp & "\") if $result=0 then $msg=$msg& "Cardback files were not copied correctly!" & @LF $installed_sth = True EndIf If $Str_SelectedFrame <> "" Then $result=FileCopy($Str_FramesDir_abs & "\" & $Str_SelectedFrame & "\*.*", $ImgDirTemp & "\", 1) ConsoleWrite(@lf&"Copied "& $Str_FramesDir_abs & "\" & $Str_SelectedFrame & "\*.*" & " to " & $ImgDirTemp & "\") if $result=0 then $msg=$msg& "Frame files were not copied correctly!" & @LF $installed_sth = True EndIf If $installed_sth = True Then Local $PID $PID = ProcessExists("PartyGaming.exe") If $PID Then if StringLen($msg)>0 then $msg=$msg & @LF $msg=$msg & "The PartyPoker software is active. Changes to the layout only take effect when you restart PartyPoker." EndIf if StringLen($msg)>0 then MsgBox(4096, "SkinChanger Alert", $msg) EndIf ;~ GUICtrlSetData($Label_Status, $Str_StatusDefault) _Set_TitleStatus() ;~ EndFunc ;==>SetLayout Func _BackupImages() ;msgbox(0,"Str_ImgBckpDir_abs & Str_ImgBckpLangDir_abs",$Str_ImgBckpDir_abs & @LF & "Datei existiert: " & FileExists($Str_ImgBckpDir_abs) & @LF & @LF & $Str_ImgBckpLangDir_abs & @LF & "Datei existiert: " & FileExists($Str_ImgBckpLangDir_abs)) ;~ GUICtrlSetData($Label_Status, $Str_StatusSpacer & "backing up images...") _Set_TitleStatus("Backup of Partypoker images is created...") ;~ Local $success1,$success2 Local $answer=6 local $Flag=0 ;msgbox(0,"","making backup...") If FileExists($Str_ImgBckpDir_abs) And FileExists($Str_ImgBckpLangDir_abs) Then $answer=MsgBox(4, "Confirm Backup", "There is already a backup!" & @LF &"Do you want to overwrite the existing Backup?") If $answer = 6 then $Flag=1 Else MsgBox(0, "Backup canceled!", "The Creation of the backup of the PP images was canceled! You can restore images from the existing Backup!") Endif EndIf If $answer=6 Then $success1 = DirCopy($Str_ImgDir_abs, $Str_ImgBckpDir_abs,$Flag) $success2 = DirCopy($Str_ImgLangDir_abs, $Str_ImgBckpLangDir_abs,$Flag) If $success1=1 And $success2=1 Then MsgBox(0, "Backup successful!", "The Creation of the backup of the PP image folder has been successful! You can restore it at any time") Else MsgBox(0, "Backup failed!", "The Creation of the backup of the PP images failed! You can't restore images!" & @LF & "Backup of ImgDir: " & $success1 & @LF & "Backup of ImgLangDir: " & $success2) EndIf EndIf ;~ GUICtrlSetData($Label_Status, $Str_StatusDefault) _Set_TitleStatus() ;~ EndFunc ;==> _BackupImages Func _LoadFilesToImagesArray(ByRef $ArrImages, Const $ArrFiles, Const $iOffset=0, Const $TargetIndex=1, Const $StrDirDefault=$Str_ImgBckpDir_abs) ;$ArrFiles[i], $ArrImages[i][3], $iOffset, $StrDirDefault ; Lädt Dateien aus einem Array(Pfade) in ein Array(Image-Handles) ein ; Dabei wird zuerst am Zielort gesucht, sonst im Standardordner ;~ ConsoleWrite(@lf&"$StrDirDefault = "&$StrDirDefault) Local $StrDir, $iDir For $i=0 to UBound($ArrFiles)-1 ;~ ConsoleWrite(@lf&"_LoadFilesToImagesArray($iOffset="&$iOffset&", $i="&$i) ;~ ConsoleWrite(@lf&"$ArrFiles[$i][$TargetIndex] = "&$ArrFiles[$i][$TargetIndex]) $iDir=$ArrFiles[$i][0] ; Der Zielpfad der zu ladenden Datei 0-Layout, 1-Karten, 2-Kartenrücken, 3-Frames, 4-Arrows Select case $iDir=0 $StrDir = $Str_LayoutsDir_abs & "\" & $Str_SelectedTable & "\" & $Str_SelectedLayout case $iDir=1 $StrDir = $Str_CardsDir_abs & "\" & $Str_SelectedCards case $iDir=2 $StrDir = $Str_CardBacksDir_abs & "\" & $Str_SelectedTable & "\" & $Str_SelectedCardBacks case $iDir=3 $StrDir = $Str_FramesDir_abs & "\" & $Str_SelectedFrame case $iDir=4 $StrDir = $Str_ArrowsDir_abs & "\" & $Str_SelectedTable & "\" & $Str_SelectedArrows Case Else ConsoleWrite(@lf&"Error in _LoadFilesToImagesArray() - Select Case Else wurde ausgeführt") EndSelect _GDIPlus_ImageDispose($ArrImages[$iOffset+$i][0]) ;~ ConsoleWrite(@lf&"1. Try, loading: "&$StrDir&"\"&$ArrFiles[$i][$TargetIndex]) $ArrImages[$iOffset+$i][0] = _GDIPlus_ImageLoadFromFile ($StrDir&"\"&$ArrFiles[$i][$TargetIndex]) ;laden aus dem Skin-Ordner ;~ ConsoleWrite(@lf&"Loading from: ("&$StrDirDefault&"\"&$ArrFiles[$i][$TargetIndex]&")");Msgbox(0,"","folgende Datei konnte nicht geladen werden: "&$i&@lf&$StrDirDefault&"\"&$ArrFiles[$i][$TargetIndex]) ; wenn nicht im PP-Images-Ordner dann Fehler if @error Then ;~ ConsoleWrite(" --- Failure!") ;~ ConsoleWrite(@lf&"2. Try, loading: "&$StrDirDefault&"\"&$ArrFiles[$i][$TargetIndex]) $ArrImages[$iOffset+$i][0] = _GDIPlus_ImageLoadFromFile ($StrDirDefault&"\"&$ArrFiles[$i][$TargetIndex]) ;laden aus dem Skin-Ordner ; wenn nicht im Skin-Ordner, dann im PP-Images-Ordner schauen, je nachdem was gewählt wurde Else ;~ ConsoleWrite(" --- Success!") EndIf if @error Then ;~ ConsoleWrite(" --- Failure!") ;~ ConsoleWrite(@lf&"3. Try, loading: "&$Str_ImgBckpLangDir_abs&$ArrFiles[$i][$TargetIndex]) $ArrImages[$iOffset+$i][0] = _GDIPlus_ImageLoadFromFile ($Str_ImgBckpLangDir_abs&$ArrFiles[$i][$TargetIndex]) ;laden aus dem Skin-Ordner ; wenn nicht im Skin-Ordner, dann im PP-Images-Ordner schauen, je nachdem was gewählt wurde Else ;~ ConsoleWrite(" --- Success!") EndIf if @error Then ;~ ConsoleWrite(" --- Failure!") ;~ ConsoleWrite(@lf&"4. Try, loading: "&$Str_ImgDir_abs&"\"&$ArrFiles[$i][$TargetIndex]) $ArrImages[$iOffset+$i][0] = _GDIPlus_ImageLoadFromFile ($Str_ImgDir_abs&"\"&$ArrFiles[$i][$TargetIndex]) ;laden aus dem Skin-Ordner ; wenn nicht im Skin-Ordner, dann im PP-Images-Ordner schauen, je nachdem was gewählt wurde Else ;~ ConsoleWrite(" --- Success!") EndIf if @error Then ;~ ConsoleWrite(" --- Failure!") ;~ ConsoleWrite(@lf&"Loading completely failed! (Datei "&$iOffset+$i&": "&$ArrFiles[$i][$TargetIndex]&")");Msgbox(0,"","folgende Datei konnte nicht geladen werden: "&$i&@lf&$StrDirDefault&"\"&$ArrFiles[$i][$TargetIndex]) ; wenn nicht im PP-Images-Ordner dann Fehler Else ;~ ConsoleWrite(" --- Success!") $ArrImages[$iOffset+$i][1] = _GDIPlus_ImageGetWidth ($ArrImages[$iOffset+$i][0]) $ArrImages[$iOffset+$i][2] = _GDIPlus_ImageGetHeight ($ArrImages[$iOffset+$i][0]) EndIf Next If @error Then Return 0 Return 1 EndFunc ;==> _LoadFilesToImagesArray Func _Ctrl_Register(ByRef $CtrlArray, ByRef $Ctrl, Const $zIndex=0) local $n=0 ;~ _ArrayDisplay($CtrlArray) ;~ ConsoleWrite(@lf&"Anzahl bisher registrierter Ctrls: "&$n) if not $CtrlArray[0][0]=0 Then $n=UBound($CtrlArray) Redim $CtrlArray[$n+1][2] EndIf ;~ ConsoleWrite(@lf&"Anzahl neuer möglicher Ctrls: "&UBound($CtrlArray)) $CtrlArray[$n][0] = $Ctrl $CtrlArray[$n][1] = $zIndex ;~ ConsoleWrite(@lf&"folgendes Ctrl hinzugefügt: "&$Ctrl & "(Index: "&$zIndex&")") _ArraySort($CtrlArray,0,0,$n,1) EndFunc Func _Ctrl_UnRegister(ByRef $CtrlArray, ByRef $Ctrl) local $iIndex = _ArraySearch($CtrlArray, $Ctrl) If not @error Then GUICtrlDelete($Ctrl) local $n=UBound($CtrlArray)-1 ;~ ConsoleWrite(@lf&'"' & $Ctrl & '" found!') $CtrlArray[$iIndex][0]=$CtrlArray[$n][0] $CtrlArray[$iIndex][1]=$CtrlArray[$n][1] ReDim $CtrlArray[$n][2] _ArraySort($CtrlArray,0,0,$n,1) EndIf EndFunc Func _Ctrl_UnRegisterByIndex(ByRef $CtrlArray, $index) Local $n=UBound($CtrlArray)-1 local $iIndex = _ArraySearch($CtrlArray, $index, 0, $n, 0, 0, 1,1) While not @error GUICtrlDelete($CtrlArray[$iIndex][0]) $CtrlArray[$iIndex][0]=$CtrlArray[$n][0] $CtrlArray[$iIndex][1]=$CtrlArray[$n][1] ReDim $CtrlArray[$n][2] $n -= 1 $iIndex = _ArraySearch($CtrlArray, $index, 0, $n, 0, 0, 1,1) WEnd _ArraySort($CtrlArray,0,0,$n,1) EndFunc Func _Check_CtrlUnderMouse(ByRef $pos, ByRef $GUI, ByRef $CTRL) Local $CtrlPos = ControlGetPos($GUI, '', $CTRL) If ($pos[0] >= $CtrlPos[0] And $pos[0] <= $CtrlPos[0] + $CtrlPos[2]) And _ ($pos[1] >= $CtrlPos[1] And $pos[1] <= $CtrlPos[1] + $CtrlPos[3]) Then ;~ ConsoleWrite(@lf&"Ctrl found!") Return 1 Else ;~ ConsoleWrite(@lf&"Ctrl not found!") Return 0 EndIf EndFunc Func _Find_FirstCtrlUnderMouse (ByRef $CtrlArray, $FindIndex=0) local $CtrlFound[2]=[0,0], $MousePos=MouseGetPos() ;~ ConsoleWrite(@lf&"MousePosX: "&$MousePos[0]&" MousePosY: "&$MousePos[1]) ;~ ConsoleWrite(@lf&"UBound($Arr_Ctrls_Scroll)-1 = "&UBound($Arr_Ctrls_Scroll)-1) for $i = UBound($CtrlArray)-1 to 0 Step -1 ;wichtig ist, dass die Ctrls in aufsteigender Z-Richtung registiert sind, so wird nur das oberste weitergegeben ;~ ConsoleWrite(@lf&"Checking CTRL: "&$CtrlArray[$i][0]) if _Check_CtrlUnderMouse($MousePos, $hWnd_SC, $CtrlArray[$i][0])=1 Then ;~ ConsoleWrite(@lf&"Control found! ("&$CtrlArray[$i][0]&")") ;~ $CtrlFound[0]=$CtrlArray[$i][0] ;~ $CtrlFound[1]=$CtrlArray[$i][1] Return $CtrlArray[$i][$FindIndex] endif Next Return 0 EndFunc Func _WM_MOUSEWHEEL($hWnd, $iMsg, $wParam, $lParam) ;~ ConsoleWrite(@lf&"MouseScroll Event fired") ;~ local $FirstCtrlID=_Find_FirstCtrlUnderMouse ($Arr_Ctrls_Scroll,0) local $FirstIndex=_Find_FirstCtrlUnderMouse ($Arr_Ctrls_Scroll,1) if not $FirstIndex=0 Then Local $ScrollDirection=BitShift($wParam, 16) ; wenn >0 dann wurde nach oben gescrollt ;~ ConsoleWrite(@lf&"CtrlID: "&$FirstCtrlID) Switch $FirstIndex Case $i_Index_Layout If $ScrollDirection>0 then _LayoutUp() Else _LayoutDown() EndIf Case $i_Index_Frame If $ScrollDirection>0 then _FrameUp() Else _FrameDown() EndIf Case $i_Index_CardBacks If $ScrollDirection>0 then _CardbacksUp() Else _CardbacksDown() EndIf Case $i_Index_Arrow If $ScrollDirection>0 then _ArrowsUp() Else _ArrowsDown() EndIf Case $i_Index_Cards If $ScrollDirection>0 then _CardsUp() Else _CardsDown() EndIf Case Else EndSwitch EndIf ;~ _Ctrl_UnRegister($Arr_Ctrls_Scroll, $Lbl_Layout) ;~ if not $CtrlBuffer[0]=0 then ;~ ConsoleWrite(@lf&"Ctrl under Mouse: "&$CtrlBuffer[0]&" Index: "&$CtrlBuffer[1]) ;~ _Ctrl_UnRegister($Arr_Ctrls_Scroll, $CtrlBuffer[0]) ;~ EndIf ;~ If BitShift($wParam, 16) > 0 Then ; determine in what way the wheel is turning ;~ MsgBox(0,"", "nach oben") ;~ Else ;~ MsgBox(0,"", "nach unten") ;~ EndIf EndFunc Func _CollectGarbage() ;~ ConsoleWrite(@lf&"hier ist _CollectGarbage()") _GDIPlus_GraphicsDispose ($hGraphic) ;das $Arr_hImg erschlägt alle einzelnen Variablen der Bilder, da es ausreicht das Bild einmal zu löschen, da in den Variablen ja nur die Referenz zu ein und demselben Bild gespeichert wurde _GDIPlus_BrushDispose ($hBrush) _GDIPlus_StringFormatDispose ($hFormat) _GDIPlus_FontFamilyDispose ($hFamily) _GDIPlus_FontDispose ($hFont) _GDIPlus_PenDispose ($hPen) ;~ ConsoleWrite(@lf&"Anzahl zu löschender Bilder: "& UBound($Arr_hImg)) for $i=0 to UBound($Arr_hImg)-1 ;~ ConsoleWrite(@lf&"Nun wird Datei : " &$i& " gelöscht, dabei ist Wert[0] = " & $Arr_hImg[$i][0] & " und Wert[1] = " & $Arr_hImg[$i][1] ) _GDIPlus_BitmapDispose ($Arr_hImg[$i][0]) next _GDIPlus_BitmapDispose ($hBmp_Buffer_LCF) _GDIPlus_BitmapDispose ($hBmp_Buffer_Chips) _GDIPlus_BitmapDispose ($hBmp_Buffer_Layout) _GDIPlus_BitmapDispose ($hBmp_Buffer_Avatare) _GDIPlus_BitmapDispose ($hBmp_Buffer_Cards) EndFunc ;==> _CollectGarbage Func _CollectGarbage_modern() ConsoleWrite(@lf&"hier ist _CollectGarbage_modern()") ;hier müssen noch alle modern Images entsorgt werden! aber nur wenn deklariert _GDIPlus_ImageDispose ($hImg_Divider) _GDIPlus_ImageDispose ($hImg_MinBG) _GDIPlus_ImageDispose ($hImg_Icon1) _GDIPlus_ImageDispose ($hImg_Icon2) _GDIPlus_ImageDispose ($hImg_Icon3) _GDIPlus_ImageDispose ($hImg_Icon4) _GDIPlus_ImageDispose ($hImg_Footer1) _GDIPlus_ImageDispose ($hImg_Footer2) _GDIPlus_ImageDispose ($hImg_Footer3) _GDIPlus_ImageDispose ($hImg_Footer4) _GDIPlus_ImageDispose ($hImg_Footer5) _GDIPlus_ImageDispose ($hImg_Footer5) _GDIPlus_ImageDispose ($hImg_Footer6) _GDIPlus_ImageDispose ($hImg_Resizer) _GDIPlus_ImageDispose ($hImg_Avatar_on) _GDIPlus_ImageDispose ($hImg_Avatar_off) EndFunc ;==> _CollectGarbage_modern Func _MyFunc($hWnd, $Msg, $wParam, $lParam) ConsoleWrite(@lf&"_MyFunc() ausgelöst") EndFunc Func _Info() MsgBox(0, "Info", "Freeware" & @LF & @LF & "SkinChanger for PartyPoker" & @LF & "Author: " & $Str_Author & @LF & "Version: " & $Str_CurrentSkinChangerVersion & @LF & @LF & "You can send your feedback to jonathan.staxton@gmail.com!") EndFunc ;==>Info Func _Donate() ShellExecute($Str_ServerAdress);"http://download.erik-brenncke.de/SkinChanger/" dort liegt eine index.php als Sprachweiche EndFunc