About Store Forum Documentation Contact



Post Reply 
[solved][bug] Multi selecting and toggle not working with list display RECTS
Author Message
Pherael Offline
Member

Post: #1
[solved][bug] Multi selecting and toggle not working with list display RECTS
Hi, can sombody tell me why code below dosn't working for me? Even when everything else is fine, multi selecting and toggle acting crazy.

Code:
class SelectTeam : GuiObjs
{
   List<Hero> list;  
  
   void resetList()
   {
      list.setData(player.AllHeroes);
   }
  
   void create()
   {
      
      load(UID(193999002, 1229987195, 4176681374, 4180491852));
      Gui +=T;  
      
      ListColumn lc[]=
            ListColumn(MEMBER(Hero, icon ), 0.21, "+"    ),
            ListColumn(MEMBER(Hero, name ), 0.52, "Name" ),
            ListColumn(MEMBER(Hero, level), 0.21, "Level"),
         };
      getRegion("heroRegion")+=list.create(lc, Elms(lc));  
      
      list.sel_mode =  LSM_TOGGLE; // <-this not working
      list.flag = LIST_MULTI_SEL; // <- and this not working too
      list.cur_mode = LCM_ALWAYS;    
      list.draw_mode = LDM_RECTS;
      
      resetList();        
   }    
}

SelectTeam selectTeam;

//EDIT
After hour and half testing random things, I found the issue apear when SimulateTouches(true) is call. Also when flag and modes are set before create().

Also, even when I find partial solution, when draw mode is LDM_RECTS toggle and multi selection still doesn't work.

All the issues can be reproduce in Tutorial.
(This post was last modified: 09-06-2013 10:12 AM by Pherael.)
09-02-2013 02:24 PM
Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #2
RE: [bug] Multi selecting and toggle not working with list display RECTS
Because I didn't find any info about this issue, I assume this is bug in engine.
Esenthel, can you repair LSM_TOGGLE and LIST_MULTI_SEL so this options would work with LDM_RECTS? This is not very urgent , but still important to me and it be good to know that you aware of the problem. It should be very easy for you, its only display issue, selection retsc are draw by field "cur" not by "sel".
09-04-2013 07:45 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: [bug] Multi selecting and toggle not working with list display RECTS
Thanks, I've reproduced the issue, I'll try to fix it asap
09-06-2013 07:15 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: [bug] Multi selecting and toggle not working with list display RECTS
Just finished adding this functionality, will be available in next release
09-06-2013 09:34 AM
Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #5
RE: [solved][bug] Multi selecting and toggle not working with list display RECTS
Nice! Thank you very much.
09-06-2013 10:14 AM
Find all posts by this user Quote this message in a reply
Post Reply