Is there a possibility to group some dialog items together and make them visible all at once via show dialog item for player?
Purpose: I use a loop to create dozens of thumbnails and label items in one of my dialogs. I'd like to make them visible all at once for a certain player when he clicks on a certain button. But I really don't want to assign variables to all of them... so instead of "for each integer i from 1 to 60 - show dialog item [i] for player X" I'd like to use something different .. if there is anything.
If they are all in the same dialog then simply show/hide the dialog for the triggering player. Dialog Items show by default so when you show the dialog it will show all of its children dialog items.
Create an Action with the parameter "Preset - On/Off Option". Then put all the dialogs you want to be shown/hidden at once in there. All you have to do now is call the Action (Void Function) with "On" or "Off" and the dialogs will be shown accordingly.
On another notice... 60 dialogs? o.O Are you making Windows 9 in SC2?
Isn't there anything that adds the last created dialog item to a group... such like a player group or a unit group, only for dialog items?
My loop is creating about 550 dialog items and honestly, I don't want to assign 550 variables to them... if you ask why there are so many dialog items: I'm using for each different unit type an explanation menu with description, name, thumbnail, mineral values and some more data on each of their upgrades...
19 unit types * 4 upgrades each = 76 upgrades * 6 dialog items (name, value, description, thumbnail and so on) = 456 items + the general items for each unit type = about 550 items...
I don't know how much is interactive in your case, but you only need to save 1 dialog per player and all interactive buttons per player.
Then you create 1 dialog per player and change the info onto the dialog with an integer that reflects its status. So every player has his own integer for the dialog information.
In multiplayer it might take up to 1 second to create a new dialog based on its complexity.
Problem is, most of the dialog items are buttons and labels that get data from the players status. It's very dynamic, and it's different for each player and changes all the time. I'm using one single dialog atm and splitting everything up by using different dialogs would mean even more work, it's hard to explain.
Seems like I have to go with the variables... apparently dialog item variables don't increase the script size at all.. I created about 5000 variables for testing purposes and the script size didn't increase ... odd.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Should be an easy question for you:
Is there a possibility to group some dialog items together and make them visible all at once via show dialog item for player?
Purpose: I use a loop to create dozens of thumbnails and label items in one of my dialogs. I'd like to make them visible all at once for a certain player when he clicks on a certain button. But I really don't want to assign variables to all of them... so instead of "for each integer i from 1 to 60 - show dialog item [i] for player X" I'd like to use something different .. if there is anything.
Any ideas?
If they are all in the same dialog then simply show/hide the dialog for the triggering player. Dialog Items show by default so when you show the dialog it will show all of its children dialog items.
@desiderius1: Go
I'd do that if I hadn't to distinguish between different items on the same dialog. I only want to show/hide some of the items, not all.
@Ranuglin: Go
Create an Action with the parameter "Preset - On/Off Option". Then put all the dialogs you want to be shown/hidden at once in there. All you have to do now is call the Action (Void Function) with "On" or "Off" and the dialogs will be shown accordingly.
On another notice... 60 dialogs? o.O Are you making Windows 9 in SC2?
There's a dialog item type called Panel, it's used to group other dialog items. Might want to try that out.
Create Dialog Item in Panel
@Kafoso: Go
60 dialog items, not dialogs :) Thanks for your help!
@Tolkfan: Go
Thank u too, I'm gonna check this out.
I tested it out but it doesn't help me very much.
Isn't there anything that adds the last created dialog item to a group... such like a player group or a unit group, only for dialog items? My loop is creating about 550 dialog items and honestly, I don't want to assign 550 variables to them... if you ask why there are so many dialog items: I'm using for each different unit type an explanation menu with description, name, thumbnail, mineral values and some more data on each of their upgrades...
19 unit types * 4 upgrades each = 76 upgrades * 6 dialog items (name, value, description, thumbnail and so on) = 456 items + the general items for each unit type = about 550 items...
I just don't wanna have 550 variables :(
I don't know how much is interactive in your case, but you only need to save 1 dialog per player and all interactive buttons per player.
Then you create 1 dialog per player and change the info onto the dialog with an integer that reflects its status. So every player has his own integer for the dialog information.
In multiplayer it might take up to 1 second to create a new dialog based on its complexity.
@Ahli634: Go
Problem is, most of the dialog items are buttons and labels that get data from the players status. It's very dynamic, and it's different for each player and changes all the time. I'm using one single dialog atm and splitting everything up by using different dialogs would mean even more work, it's hard to explain.
Seems like I have to go with the variables... apparently dialog item variables don't increase the script size at all.. I created about 5000 variables for testing purposes and the script size didn't increase ... odd.