Strange bug with layouts

This forum is currently in read-only mode.
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • I have strange bug when testing my level editor.

    I have 2 layouts: MapEditor and MainMenu.

    When MapEditor is first and MainMenu is second it works fine.

    But when i swap them and MainMenu is first and MapEditor is second. MapEditor doesn't work properly.

    To see what I mean do 2 things with cap file (link below):

    1. Just launch it.

    Select button (left side of the screen), and then place objects in the middle of the screen.

    After finishing press ESC.

    2. Now swap layouts in Construct and run game again. Press ENTER in MainMenu, and try to place objects like before.

    Cap file:

    http://tecbug.pl/menu_editor_problem.cap

  • I'm no Construct expert but I can't see anything wrong with your cap.

    What I did is removed your main menu layout and created a new one with nothing in it other than the event for a left mouse click to take you to the Map Editor Layout and it worked perfectly.

    It probably is a bug so I'd suggest deleting the old main menu and create it again and see if that works.

  • if it's a bug, hope it's on the bug tracker!

  • I believe.... The problem is that when you press enter somehow your edit box or boxes (I think b_save) are getting focus. I did some clicking around that area and then was able to place objects fine.

    So it is not a bug, you just need to make sure that you take the focus off of the editbox when you enter the layout.

  • Not a bug.

    Probliem is with edit box object. When i choose to focus off the edit box mouse doesn't respond properly.

  • Now that DOES sound like a bug. Just in the editbox object, "focus off" event. Sounds like it is not working properly. Please post a bug report w/ a simple .cap!

  • Ah, Windows controls (edit box and stuff) tend to steal the mouse focus. That is a known issue. Windows controls don't mix with DX9 runtime too well.

    Solution? Make your own edit box with events. :s

  • that is ugly.. or does someone have a good method of writing? The methods i've tired are:

    Making an event for each letter.

    or

    having an editbox allways on focus outside the screen, and have an event:

    Editbox.text <> "" (not nothing)

    -text: set text to editbox.text

    -text: set text to ""

    of course the second one doesn't solve your problem.

    I hope that i've been an idiot and missed something.

  • I think that key presses have a certain index number, like 64 and so on, alphabet and numbers have a certain range. On key pressed, read the index (not sure how to do that), type that letter out - without having to do an event per each letter.

  • I think that key presses have a certain index number, like 64 and so on, alphabet and numbers have a certain range. On key pressed, read the index (not sure how to do that), type that letter out - without having to do an event per each letter.

    Is this possible to do? It would be awsome!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm really new to all this, so I did not actually work with everything, but isn't SpriteFont an alternative? As a workaround of course, because you have to use bitmapped fonts.

    If this thought is totally nonsense, just forget about it.

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