Better way to re-align UI with one tap?

MoikMoik Member, PRO Posts: 257

So basically, at the moment I'm setting up my app so the interactive UI is along the right and the bottom, and the information parts are long the left and top so that you don't end up blocking the play area/useful information while making selections. But, that only works for right-handed people. So, I want to make a toggle for Left-handed people that flips the UI so that the buttons are along the left and bottom (and the bottom ones have their order 'reversed' since the more frequently used ones are closer to the relevant hand-side.

At the moment, my planned solution is to give every UI element two Attribute rules that changes their self.positions based on a text boolean, and then have a button that simply changes the text Boolean back and forth between the correct modes.

My problem is that deploying all those pairs of Change Attribute will take a "long time" (from my perspective/time budget) as there are about 30-ish UI elements to flip around, for 60 rules to place and edit. Given the symmetry of the UI, there are really only five X co-ordinates that matter, and 9 Y co-ordinates that matter. Basically the UI is mainly nine rows and four columns (when you judge by the axis points).

Is there something I can do with Tags or something similar? I'm not sure what I should be looking into that might help.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2015

    Just paste this into each actor (trigger it with whatever you like):

    Change self.X to (scene width - self.X )

  • MoikMoik Member, PRO Posts: 257

    Interesting! I'll give that a go.

  • MoikMoik Member, PRO Posts: 257

    @Socks I have it working off an attribute trigger (game.Hand = 0, game.Hand = 1).
    Things are starting in left-hand mode because I set the UI up in right-hand positions, and the trigger runs once on launch.
    Is there an easy way to prevent that first run?
    Or, will I need to reposition my UI into left-hand mode, so that first automatic trigger puts it into right? (Not a big deal to do, should be less than an hour work)

  • SocksSocks London, UK.Member Posts: 12,822
    edited January 2016

    //

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Set the attribute to the default. So if zero equals right make sure it's zero. If right is 1 set it to one right at the attribute. Or add a condition to the rule that changes the hand so it doesn't change unless selected. It best for this stuff to have a scene with a options menu.

Sign In or Register to comment.