Strange bug with layouts

For questions about using Classic.

Post » Fri Sep 25, 2009 12:19 pm

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
B
53
S
14
G
10
Posts: 282
Reputation: 7,578

Post » Fri Sep 25, 2009 5:04 pm

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.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Sat Sep 26, 2009 1:04 am

if it's a bug, hope it's on the bug tracker!
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Sat Sep 26, 2009 1:49 am

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.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Sep 26, 2009 8:08 am

Not a bug.
Probliem is with edit box object. When i choose to focus off the edit box mouse doesn't respond properly.
B
53
S
14
G
10
Posts: 282
Reputation: 7,578

Post » Sat Sep 26, 2009 2:14 pm

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!
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sat Sep 26, 2009 5:17 pm

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
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sun Sep 27, 2009 9:19 pm

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.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Mon Sep 28, 2009 10:57 am

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.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Fri Oct 02, 2009 11:50 am

[quote="Mipey":kmf86n5x]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.[/quote:kmf86n5x]

Is this possible to do? It would be awsome!
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests