Making GUI modding easier

    Should a config file for the GUI elements be added? (so co-ordinates of the displays can be changed)


    • Total voters
      5
    Joined
    Sep 13, 2013
    Messages
    81
    Reaction score
    25
    At the moment modifications to the GUI are very limited, nothing can be moved around, and its very constrained as to what you can do without a fixed element, such as the speed display, being in the wrong place.
    It would be great if there was an editable config file which lists the co-ordinates and properties of the GUI elements so that they can be easily modified, moved or maybe even removed.
    This would allow for more modifications for the GUI such as allowing you to make a vertical toolbar or moving the radar map to the bottom, and would mean that anyone can alter the GUI just how they want, allowing people to make layouts that they prefer. Such as having a sidebar rather than a central menu containing the navigations/weapons management etc.
     
    • Like
    Reactions: NeonSturm
    Joined
    Jun 28, 2013
    Messages
    574
    Reaction score
    153
    Kupu is planning a GUI update; there is no ETA but it will be customizable. Until then this would be a good idea. Plus...
    Have I seen you before on the old forum? :3
     
    Joined
    Sep 13, 2013
    Messages
    81
    Reaction score
    25
    I was thinking more of a make your own from scratch type customisation, rather than move this panel here and resize this panel,but it sounds like a dramatic improvement from the current static GUI, sounds good.
    Also, yeah, I used to be on the old forums, but i took a break from starmade for a while just before the new site was made, lots of changes since then.
     

    NeonSturm

    StormMaker
    Joined
    Dec 31, 2013
    Messages
    5,110
    Reaction score
    617
    • Wired for Logic
    • Thinking Positive
    • Legacy Citizen 5
    Just give each row (16 pixels heigh) on a screen an binary-tree of elements that touch it.
    binaryTree[x/16] =
    mouse.y > pos between mid objects
    y > pos between 3/4 and 4/4 objects
    ...​
    y < pos between 3/4 and 4/4 objects
    ...​
    else y < mid-pos
    y > pos between 1/4 and 2/4 objects
    ...​
    y < pos between 1/4 and 2/4 objects
    ...​

    64 elements in a line (rare) would take 6 comparisions to get the element.
    256 elements in a line (very unlikely) take 8 comparisions to get the actual button you pressed.


    16 pixels is a bit more than one letter on my screen. You can expect 1-2 buttons in that area only.

    Then you only need drag+drop for buttons or button-groups.
    I have used similar in JavaScript before and can share some example code of how to render boxes into a cache if @kupu needs it.