it works as it should (see screenshot). and it only affects the button not the background (the grey stuff). colour code for protoss buttons is (28%, 55%, 100%). i have choosen red and not zerg colour but any colour is possible. my trigger:
i have hooked UIContainer/ConsoleUIContainer/InventoryPanel/InventoryButtons/Button00/GameButtonBorderImage and it really works.
The Button00 inherits from a button, which inherits from a button, which inherits from GameButton which has a GameButtonBorderImage. (i start thinking OO is shit)
Setting it to Desaturated colour works exactly as it should. thx
btw do you know the colour code of protoss buttons?
basically i just want to change the colour for a item dynamically. is it possible? (without replacing the icon of the button with an imported icon with different colour)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
well, i guess you have to turn it off on the buttons and then hook them up (the command buttons) and set them manually, but you have to test it.
@herdal8: Go
which icons? you can hook up nearly everything
@abvdzh: Go
it works as it should (see screenshot). and it only affects the button not the background (the grey stuff). colour code for protoss buttons is (28%, 55%, 100%). i have choosen red and not zerg colour but any colour is possible. my trigger:
Parameter
player = 0 <int>
button = 0 <int>
colour = Color(0,0,0) <color>
local Variables
inventoryButtonImage = c_invalidDialogControlId <control>
inventoryButtonBorderImage = "" <string>
SetVariable(inventoryButtonBorderImage, (CombineStringsMult("UIContainer/ConsoleUIContainer/InventoryPanel/InventoryButtons/Button0", (IntToString(button)), "/GameButtonBorderImage")))
DialogControlHookupStandard(c_triggerControlTypeImage, inventoryButtonBorderImage)
SetVariable(inventoryButtonImage, (DialogControlLastCreated()))
SetDialogItemDesaturated(inventoryButtonImage, true, (PlayerGroupSingle(player)))
SetDialogItemDesaturationColor(inventoryButtonImage, colour, (PlayerGroupSingle(player)))
DialogControlDestroy(inventoryButtonImage)
important to destroy the hook or it will only work once.
should i necro all posts regarding this problem and linking to this?
@abvdzh: Go
i have hooked UIContainer/ConsoleUIContainer/InventoryPanel/InventoryButtons/Button00/GameButtonBorderImage and it really works.
The Button00 inherits from a button, which inherits from a button, which inherits from GameButton which has a GameButtonBorderImage. (i start thinking OO is shit) Setting it to Desaturated colour works exactly as it should. thx
btw do you know the colour code of protoss buttons?
@Apollys: Go
ok i tried that. what is does: it coloures everything that is white with the colour, the button itself stays blueish protoic.