Announcement

Collapse
No announcement yet.

uLCD-32PT-GFX, Seeking advice / ideas for GUI programming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • uLCD-32PT-GFX, Seeking advice / ideas for GUI programming

    Hello,

    I am attempting to create a GUI composed of several levels of menus - the top level is the "main menu." Apps (.4xe programs) are called when a button is touched on the main menu. The second level app may have its own "sub-menu" that calls even more apps or sub-menus (third level, etc). I hope you can visualize this. Pretty standard GUI.

    If you are curious I am making a little reference/assistant for the PC game League of Legends. One app will display information about the in game characters (stats, images, etc) and another app will use several timers to display countdowns to inform the user when monsters will spawn.

    Unfortunately there aren't many great examples included that do this (no nested menu or scrolling menu examples).

    The 'RUNDEMOS.4DG' program seemed like the best bet so I started there. I loaded the appropriate files (.4xe, .cgi, .dat) to my uSD card and the demos seem to behave as intended - I can launch one and then exit back to the main menu (or window as 4d calls it).

    But is it possible to launch another program (and return!!!) from the second level? This is not demonstrated in the RUNDEMOS. For example, I touch a button in a second level program that calls another .4xe - a third level program is launched. Then I want to be able to go back to the second level program, and from there be able to return to the top level (or main menu).

    I have attached the code I have so far - it is all based off of RUNDEMOS.4dg. My top level program is SCV02.4dg. The exit/main menu button in CHAMPS does not behave correctly - it puts the screen to sleep instead of going back to the top level program SCV02. I then have to wake up the screen (touch for 2 seconds or so) and it starts again from the beginning.

    In the champion app (CHAMPS) I have one champion coded and I can 'get there', but the behavior is very buggy. And I can't 'get back' to the previous menus like I want to.

    I get the "error 15, pc = 88, v1 = 0, v2 = 0" when I am navigating in the highest level.

    I may be running in to this issue - http://4d.websitetoolbox.com/post/Max-program-size-5584076 - or some other memory issues.

    I'm going to continue to work on this, but I hope you can give some advice/assistance! Maybe the solution is to just stick to two levels and make my menus have lots more buttons. But I would rather have it cleaner and organized.

    All code is attached~

    Code hierarchy:
    SCV02 is the top level or main menu.
    From there you can select Charts, Champs, HelpMenu
    From Charts you can view some images (I can't attach the .cgi or .dat here, sorry, but the pictures display just fine from the uSD card)
    From Champs you select Tristana (Trist)
    From Trist you can select Skills, Items, Masteries, and Tips - These are very buggy for some reason

    The back buttons don't work except for the HelpMenu.

    Sorry for the wall of text!

    edit - is the code attached? I can't see it now

    Why isn't the link working properly? http://4d.websitetoolbox.com/post/Max-program-size-5584076

  • #2


    Attaching code here in case it didn't go through
    Attached files CHAMPS.4dg (13.5 KB) CHARTS.4dg (13.8 KB) HELPMENU.4dg (1.5 KB) SCV02.4dg (14.1 KB) SPLASH.4dg (1.7 KB) TRIST.4dg (13 KB) TRSTITEM.4dg (2.3 KB) TRSTMAST.4dg (1.9 KB) TRSTSKIL.4dg (2.2 KB) TRSTTIPS.4dg (2.3 KB)

    Comment


    • #3


      Hey there, I posted some code a few days ago see here:

      http://4d.websitetoolbox.com/post/Max-program-size-5584076

      each of the children programs have a return value to the main loader program.. and you can pass parameters in as well.. This example shows only two children but I have 4 and there's no reason why it won't work with any number.

      Hope this is what you're looking for.

      Andy
      MicroLec Industries P/L
      www.intelligym.com.au

      Comment


      • #4


        Animalector wrote:
        Hey there, I posted some code a few days ago see here:

        http://4d.websitetoolbox.com/post/Max-program-size-5584076

        each of the children programs have a return value to the main loader program.. and you can pass parameters in as well.. This example shows only two children but I have 4 and there's no reason why it won't work with any number.

        Hope this is what you're looking for.

        Andy
        Awesome! Using the bootloader and turning all of my programs into functions is giving me much nicer results.

        Comment


        • #5


          Excellent news
          MicroLec Industries P/L
          www.intelligym.com.au

          Comment

          Working...
          X