Dialog: Add List Item

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Fail? the built in function takes the first list item and sets it in front, and then successively adds list items directly after the first.

EX:

Dialog - Add List Item "1"
Dialog - Add List Item "2"
Dialog - Add List Item "3"
Dialog - Add List Item "4"

will yield a list like this:

1
4
3
2

Now, before I write a new action definition to use instead of the default "Dialog - Add List Item" does anyone have any quick insight on this? Like... why it acts this way?
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
oh... think they will change this for release?

is that like ++i versus i++ basically? though why would the first list piece get stuck at the top?
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Pretty self explanatory I thought. When I get back from work maybe.
 

SerraAvenger

Cuz I can
Reaction score
234
Pretty self explanatory I thought. When I get back from work maybe.

If your code was self explanatory, you wouldn't have had to create a thread about it. In order to see what Sc2 does internally, I need to see the source code.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Why do I get the feeling of hostility? anyways...

like I said in my very first post...


Dialog - Add list item "string1" to TechTypesDropdown for (All players)
Dialog - Add list item "string2" to TechTypesDropdown for (All players)
Dialog - Add list item "string3" to TechTypesDropdown for (All players)

yields a list output as follows:


string1
string3
string2

anyways, i just saved all my strings in an array in the order i wanted and made a "generate list" action to generate them separately with the first one and then plugging them in backwards...so i'm over it. just thought i'd mention it since this is the sc2 mapping forum.
 

SerraAvenger

Cuz I can
Reaction score
234
Why do I get the feeling of hostility?
Probably because I don't like repeating myself. Also you didn't understand what compile output means. I thought you did, so your reply "Pretty self explanatory I thought" was to me what you might describe as hostility. Since it was obviously just a mere misunderstanding on your part, I hereby apologize for my inappropriate harshness.

like I said in my very first post...
Yeah, what you did in GUI was very self explanatory.
But when I'm asking for the "compile output", I don't want to see your input. I want to see whatever the trigger editor shows when you hit "Ctrl+F11". Best would be to show me the whole function, since stuff can be compiled very differently from what's visible in the GUI.

Your workaround might hotfix the issue, and it is the best workaround I've seen so far in the GUI community. It is very maintainable.
Still, the interesting thing is the source of that behaviour. With the next patch, you might have to rearrange your function.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Probably because I don't like repeating myself. Also you didn't understand what compile output means. I thought you did, so your reply "Pretty self explanatory I thought" was to me what you might describe as hostility. Since it was obviously just a mere misunderstanding on your part, I hereby apologize for my inappropriate harshness.

No worries. ok so i get what you mean now. I didn't know how to even bring up the compiled version of your script. Very useful... but Still going to take some work to go through and find the parts you need XD.

Your workaround might hotfix the issue, and it is the best workaround I've seen so far in the GUI community. It is very maintainable.
Still, the interesting thing is the source of that behaviour. With the next patch, you might have to rearrange your function.

These were kind of my thoughts, and I'll know why it stops working correctly if and when they fix this issue (but i guess it's not the worst thing in the world). I'm not really a programmer... but i've taken 101 and 110 comp science... so you get the idea of my programming skills... plus i'm really not practicing it very often. It's something I feel like I have a flare for but... I really don't call myself a programmer. I'm rusty on a lot of lingo but upon hitting cntrl +F11 i was like "OHHHHHHH" XD so at least I walk away with that knowledge. I'll try and find the place where it compiles that code.

does the compiler rip your triggers appart and put the raw "alike" parts together? kind of seems that it does. might be harder to find that way.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
This should be it:

Code:
bool gt_TechMenuCreateDialogItems_Func (bool testConds, bool runActions) {
    // Variable Declarations
    int lv_tempInt;

    // Variable Initialization
    lv_tempInt = 0;

    // Actions
    if (!runActions) {
        return true;
    }

    DialogControlCreate(gv_dialog3Tech, c_triggerControlTypePulldown);
    gv_techTypesDropdown = DialogControlLastCreated();
    DialogControlSetSize(gv_techTypesDropdown, PlayerGroupAll(), 200, 50);
    DialogControlSetPosition(gv_techTypesDropdown, PlayerGroupAll(), c_anchorTopLeft, 50, 70);
    DialogControlAddItem(gv_techTypesDropdown, PlayerGroupAll(), StringExternal("Param/Value/9274DB1E"));
    DialogControlAddItem(gv_techTypesDropdown, PlayerGroupAll(), StringExternal("Param/Value/EF94B667"));
    DialogControlAddItem(gv_techTypesDropdown, PlayerGroupAll(), StringExternal("Param/Value/1ADBF295"));
    DialogControlAddItem(gv_techTypesDropdown, PlayerGroupAll(), StringExternal("Param/Value/A10E3A39"));
    DialogControlAddItem(gv_techTypesDropdown, PlayerGroupAll(), StringExternal("Param/Value/47BB99C0"));
    DialogControlCreate(gv_dialog3Tech, c_triggerControlTypeListBox);
    gv_listBox = DialogControlLastCreated();
    DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 250, 350);
    DialogControlSetPosition(gv_listBox, PlayerGroupAll(), c_anchorTopLeft, 250, 75);
    gf_TechMenuSetTechItems();
    libNtve_gf_CreateDialogItemLabel(gv_dialog3Tech, 450, 200, c_anchorTopLeft, 515, 75, StringExternal("Param/Value/4972DCCC"), Color(22*100/255,128*100/255,0), true, 2.0);
    gv_infoBox = DialogControlLastCreated();
    return true;
}
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Adding list items adds to the end now in the latest version of the editor. (which is very spiffed up might I add)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top