0
$\begingroup$

but I want to know how to change the order of Parent to slide 3 different menus from the left side to the right

Description: my menu does this currently when you press the History Mode button it makes the empty slide the left menu to the right and when you press the back button that is at the bottom of the right menu, it makes you return to the start menu by sliding the left menu to the right Note: each menu must be in a different layer

time I want to reconfigure the menu so that my inventory is the right menu, and from the left side slide 2 menus, slide 1 menu called Hystory, and 1 menu called Goals, these menus should slide each one with its left side button in the menu Inventory.

NOTE: both menus must comply with this condition, when you click on the hystory button you must slide the Inventory menu to the left to hide it and to the right to show it

try a form but the error that my design has is that it opens both menus on the right side, or does not open them according to the settings I've tried

If something is not understood about my question, I will venerate and tell myself before I am badly qualified and discouraged from participating in this community.

IMPORTANT: I ​​did this in logic bricks and I would like to first exhaust the possibilities of continuing to do it this way, until I learn python properly

Idea Menu

$\endgroup$
0
$\begingroup$

No need to use Python. This is more a question of organization.

I'm not sure if I understand your setup correctly. So I want to rephrase it a bit. That way it might help you to find out how to get what you want.

History menu

... when you press the History Mode button it makes the empty slide the left menu to the right

  • Initial the history menu is located left of the screen (collapsed position).
  • On a "show history" request - the history menu moves from collapsed position to the expand position at the left side of the screen showing as "left menu"

when you press the back button that is at the bottom of the right menu, it makes you return to the start menu by sliding the left menu to the right

  • On a "hide history" request - the history menu moves from expand position to collapsed position (where the request is coming from does not matter at that stage)

Implementation option:

  • play a "showing history menu" action in flipper mode

enter image description here

Now you can play the action by switching the property:

enter image description here

Hint: you see I do not relate on key press here. This allows me to map any event to a request (keyboard button, screen button, joystick button, or even programmatic created event). You will need that later.

Inventory menu

inventory is the right menu

This can use the same method to be presented:

  • Initial the inventory menu is located right of the screen (collapsed position).
  • On a "show inventory" request - the inventory menu moves from collapsed position to the expand position at the right side of the screen showing as "right menu"
  • On a "hide inventory" request - the inventory menu moves from expand position to collapsed position (where the request is coming from does not matter at that stage)

Implementation option:

  • play a "showing inventory menu" action in flipper mode The logic is all the same as of the history menu, just the requests (events) and the action are different.

Goals menu

The same again.

  • "show goals": move from collapsed position to expand position
  • "hide goals": move from expanded position to collapsed position

enter image description here

Consolidation

As you want both the history menu as well as the goals menu to use the same collapse and expand position you could use the same action. I suggest to rename it to "showing left menu" or similar.

According to that I suggest to rename the action of the inventory menu to "showing right menu".

This abstracts the specific menu positions from "history, inventory, goals" to "left and right" positions.

Exclusive menus

As you have two left menus (history and goals) right now, you have the wish to show only one of them at the time. This creates a dependency between the menus of the left menu.

So lets analyse this a little bit deeper. What different situations can we think of with left menu?

  1. left menu is collapsed
  2. left menu is expanded and shows history menu
  3. left menu is expanded and shows goals menu

(Note: the left menu never shows goals menu and history menu at the same time.)

Nested menus

Here I suggest to introduce a left menu.

The left menu can have three different states:

  • collapsed
  • history
  • goals

To switch between the different modes you need different requests:

  • "hide left menu"
  • "show history in left menu"
  • "show goals in left menu"

As the single menus already know how to expand and collapse you can trigger that:

  • on "hide left menu"
    • request "hide history menu"
    • request "hide goals menu"
  • on "show history in left menu"
    • request "show history menu"
    • request "hide goals menu"
  • on "show goals in left menu"
    • request "hide history menu"
    • request "show goals menu"

It would be helpful when you "request" by message rather than by keyboard sensor as there is no logic brick that presses keys.

Implementation suggestion

One object acts as left menu and deals with the left menu requests.

enter image description here

enter image description here

enter image description here

Just for completeness here is my implementation of a keyboard UI. I'm sure your will make use of your on screen buttons.

enter image description here

Remarks:

  • There are several other options to implement such a behavior. This is just one of them.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy