Jump to content
Sign In to follow this  
docj101

New UI - Time for a change!

67 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

Those flags looks most promising:

winflag_moveable=yes
winflag_sizeable=no

There is only thing that bothers me (as I don't know how UI is structured here).

From what I see in code News window is just a mix of different elements with their own properties eg. text colour, background ( I guess whole UI is like that), but not all elements has moveable flag, but then when you move whole News window it moves whole window with all elements in it. Does any particular element works as parent one or just my logic is flawed?


 

7k24.png

「"I am immortal! Can you say the same?"」

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Looks like an LUA script to me.  Code is another ball of wax and looks something like:

 

#include <whatever>

 

void displayWindow( arg1, arg2, ...) {

yatata;

yatata;

return;

}

 

(C or C++}  Code does not just execute.  It has to be compiled.


Beware: Emancipated user.  No Windoze for me.
The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
If you always do what you've always done, you'll mostly get what you've always got.
JohnNewSig.gif
"We have met the enemy, and he is us" - Walt Kelly

Come join us at the Moose Factory

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Those flags looks most promising:

    winflag_moveable=yes
    winflag_sizeable=no

    There is only thing that bothers me (as I don't know how UI is structured here).

    From what I see in code News window is just a mix of different elements with their own properties eg. text colour, background ( I guess whole UI is like that), but not all elements has moveable flag, but then when you move whole News window it moves whole window with all elements in it. Does any particular element works as parent one or just my logic is flawed?

    Yep, the whole UI is like that.  The moveable flag isn't always present but can be added.  Certain flags are required and others are optional depending on the type of element.  Each separate element has it's own ID with a legacy tag.  There is a <legacy> tag denoting the parent at the root level and then their is children <legacy> tags underneath.  The children wouldn't need the flag if they inherit it from their parent.  Sometimes (usually) there is more then one parent in a UI file.  Below is the entire structure for the smallest UI file containing only one parent (the start new city panel for region view).

     

    <LEGACY>

    <CHILDREN>

       <LEGACY>

       <CHILDREN>

          <LEGACY>

          <CHILDREN>

             <LEGACY>

             <LEGACY>

          </CHILDREN>

       </CHILDREN>

       <LEGACY>

       <LEGACY>

       <LEGACY>

       <LEGACY>

    </CHILDREN>

     

     

    Something I am still trying to figure out is why the moveable flag doesn't make windows moveable.  The moveable flag is set to yes for the budget window, for example.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Looks like an LUA script to me.  Code is another ball of wax and looks something like:

     

    #include <whatever>

     

    void displayWindow( arg1, arg2, ...) {

    yatata;

    yatata;

    return;

    }

     

    (C or C++}  Code does not just execute.  It has to be compiled.

    In the case of these UI files they don't require # for comments they just begin with the tag.  The legacy tags also aren't started and terminated like typical, simply starts <LEGACY =cslid ..... and terminates with a >.

     

    As far as code or script goes.. I'm not a programmer so I don't know for sure how to define one or the other.  I can say that these files are different from LUA.  LUA files contain instructions (scripts) that say things like "when this equals that do this".  The UI files more or less act as a database that the .exe refers to when it needs to know where and how to place elements.  They only say "this equals that". The .exe says "hey UI file.... I want to put the -whatever- on screen (cslid=xyz); which PNG, and LTEXT files do I display and where, what color is the text, and other things?"  The UI file contains all of the information for text colors, resource locations, coordinates, etc for the cslids the .exe asks about.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Doc, I have a minor problem with your greyscale UI (1.0). Nothing big but I thought I'd let you know

     

    When I try to scroll down with the mouse pointer placed in the bottom left corner, the screen doesn't move. Could it be related to those walls of code just above our heads? I hope not...

     

    Otherwise it's all good... Will keep it until cherry blossom livery hits the STEX 8)

     

    Cheers

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    When I try to scroll down with the mouse pointer placed in the bottom left corner, the screen doesn't move. Could it be related to those walls of code just above our heads? I hope not...

    Good find.  I hadn't noticed that before, but you are right it won't scroll down for me if me my mouse is in the corner panels area.  I can still scroll left.  I must have done something that causes this because the default UI doesn't have this behavior.   I'll check into it, should be something fairly obvious.  I'm guessing I made the corner a pixel too tall, making it's transparent bottom drop off screen.  If that was the case you couldn't actually push the 'edge' because the edge is out of your range.  Some photo effects used resize the png if you don't stop it from happening.  I probably let that happen. 

     

    Thanks for the heads up!

     

    p.s. I have a bangin cheery blossom camo pattern already sitting in my toolbox waiting to get used. :thumb:

     

     

    edit: (couple minutes later)

     

    The corner is the right size.  I'm not sure why it does this.  I'll try to fix it, just gonna have to use right-click and drag to scroll diagonally in that direction for now.

     

    edit: (10:10pm EDT)

     

    OK, so I figured it out.  I had to add color to the transparent fill areas and make the fill invisible.  Now I can scroll down at the corner.  I'll wait a few days before I update version in case any other fixes come up.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Well, structured like that it looks more like XML, which is most certainly good.  All you need is the definition of the tags.

     

    For non-tech people XML ::= eXtended Markup Language.

     

    With a proper interpreter you can create almost anything using a data stream.


    Beware: Emancipated user.  No Windoze for me.
    The teacher opens the door but the student must enter himself. - Ancient Chinese Saying

    Every minute of hate in which one indulges oneself is sixty seconds of happiness lost.
    Music expresses that which cannot be put into words and that which cannot remain silent. -- Victor Hugo
    If you always do what you've always done, you'll mostly get what you've always got.
    JohnNewSig.gif
    "We have met the enemy, and he is us" - Walt Kelly

    Come join us at the Moose Factory

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections