Actually having everything in an array makes it easy to work with and also automate the check marks:Quote:
Yes ofc i've had check the id and it's the good one but the bot don't count the drop +1 on the froggy part of the GUI.
So much work, good luck ;)
Look, my code for 4 tabs is very light, unlike what GUI design software like Koda will produce:
Code:
Global $ColLabels[11] = ["Staff", "Wand", "Offhand", "Shield", "Spear", "Sword", "Axe", "Bow", "Hammer", "Daggers", "Scythe"]
Global $iSpacing = 8
Global $frmSelection = GUICreate("Mod Selection", 774, 660, 500, 112)
GUICtrlSetFont($frmSelection, 9, -1, 0, "Arial")
GUICtrlCreateTab(1, 0, 774, 660)
GUICtrlCreateTabItem("General Mods")
Global $grpEnergy = GUICtrlCreateGroup("", 0, 14, 774, 660)
For $j = 3 to 13
GUICtrlCreateLabel($ColLabels[$j-3], $X_GUI + 60+(50 * $j), 40 , $iSpacing*6, $iSpacing*2, $ES_CENTER)
For $i = 0 To 29
If $j = 3 then GUICtrlCreateLabel($array_weaponmods[$i][0], $X_GUI+$iSpacing*2, 60 + (16 * $i),200, $iSpacing*2)
$array_weaponmods[$i][$j-3] = GUICtrlCreateCheckbox("", $X_GUI + 72+(50 * $j), 60 + (16 * $i), $iSpacing*2, $iSpacing*2, $ES_CENTER)
If $array_weaponmods[$i][$j] = 0 then guictrlsetstate (-1, $GUI_CHECKED)
Next
Next
GUICtrlCreateTabItem("") ; end tabitem definition
GUICtrlCreateTabItem("Damage")
Global $grpEnergy = GUICtrlCreateGroup("", 0, 14, 774, 660)
For $j = 3 to 13
GUICtrlCreateLabel($ColLabels[$j-3], $X_GUI + 60+(50 * $j), 40 , $iSpacing*5, $iSpacing*2, $ES_CENTER)
For $i = 30 To 65
If $j = 3 then GUICtrlCreateLabel($array_weaponmods[$i][0], $X_GUI+$iSpacing*2, 60 + (16 * ($i - 30)),200, $iSpacing*2)
$array_weaponmods[$i][$j-3] = GUICtrlCreateCheckbox("", $X_GUI + 72+(50 * $j), 60 + (16 * ($i - 30)), $iSpacing*2, $iSpacing*2, $ES_CENTER)
If $array_weaponmods[$i][$j] = 0 then guictrlsetstate ($array_weaponmods[$i][$j], $GUI_CHECKED)
Next
Next
GUICtrlCreateTabItem("") ; end tabitem definition
GUICtrlCreateTabItem("Armor")
Global $grpEnergy = GUICtrlCreateGroup("", 0, 14, 774, 660)
For $j = 3 to 13
GUICtrlCreateLabel($ColLabels[$j-3], $X_GUI + 60+(50 * $j), 40 , $iSpacing*5, $iSpacing*2, $ES_CENTER)
For $i = 66 To 97
If $j = 3 then GUICtrlCreateLabel($array_weaponmods[$i][0], $X_GUI+$iSpacing*2, 60 + (16 * ($i - 66)),200, $iSpacing*2)
$array_weaponmods[$i][$j-3] = GUICtrlCreateCheckbox("", $X_GUI + 72+(50 * $j), 60 + (16 * ($i - 66)), $iSpacing*2, $iSpacing*2, $ES_CENTER)
If $array_weaponmods[$i][$j] = 0 then guictrlsetstate ($array_weaponmods[$i][$j], $GUI_CHECKED)
Next
Next
GUICtrlCreateTabItem("") ; end tabitem definition
GUICtrlCreateTabItem("Mastery")
Global $grpEnergy = GUICtrlCreateGroup("", 0, 14, 774, 660)
For $j = 3 to 13
GUICtrlCreateLabel($ColLabels[$j-3], $X_GUI + 60+(50 * $j), 40 , $iSpacing*5, $iSpacing*2, $ES_CENTER)
For $i = 98 To 123
If $j = 3 then GUICtrlCreateLabel($array_weaponmods[$i][0], $X_GUI+$iSpacing*2, 60 + (16 * ($i - 98)),200, $iSpacing*2)
$array_weaponmods[$i][$j-3] = GUICtrlCreateCheckbox("", $X_GUI + 72+(50 * $j), 60 + (16 * ($i - 98)), $iSpacing*2, $iSpacing*2, $ES_CENTER)
; If $array_weaponmods[$i][$j] = 0 then guictrlsetstate ($array_weaponmods[$i][$j], $GUI_CHECKED)
Next
Next
GUICtrlCreateTabItem("") ; end tabitem definition
GUICtrlCreateGroup("", -99, -99, 1, 1)
That's the great thing about arrays. If I used one variable for each mod then it would inflate my code (and GUI would be 300 rows!).
But now I need to find the best way of updating the array with check marks and also initially the check boxes based on the default array but I think MsgBox should do the trick.