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?
 
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?
 
Pretty self explanatory I thought. When I get back from work maybe.
 
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.
 
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.
 
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.
 
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.
 
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;
}
 
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 The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      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