Text appearing behind buttons

  • Hello together.

    Currently I'm doing a calendar with construct 3. Therefore I have a number of buttons (the date cells) and want the date number to be in the top left corner of the button.

    I do not use normal button text, because each button (date cell) will have several numbers and text all over this cell (date number, text, etc).

    But whatever I do with Z ordering the text object it always keeps behind the buttons. Is there a behaviour like the buttons are always on top of all other objects no matter what, or am I doing something wrong?

    On start of layout I create the buttons with a nested loop. I tried several Z order things with the text.

    But the text keeps being behind the buttons. I deleted a cell, so you can see where the text is.

    What can I do to have the text above anything else?

  • Ah yes, never had this problem before personally but basically the buttons are created on top of the game screen. They don't really have a designated "layer" but are always on top of anything else. (see https://www.construct.net/en/make-games/manuals/construct-3/plugin-reference/button)

    Says "they are not truly "in the game" (since they float above)" if you see what its saying.

    If you want buttons on your dates, you might need to change the buttons out with regular sprites and use "on mouse clicked" or "on touch"

    Hope it helps!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh thank you very much. That makes sense. I fixed it now by using sprites.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)