Button Follows View

For questions about using Classic.

Post » Fri Feb 05, 2010 6:35 am

Why does my button follow me? And how can I keep it in place?

http://www.box.net/shared/7a17ssa6k2
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Fri Feb 05, 2010 6:47 am

Application controls are handled by Windows, so they don't work properly in instances like this. They're meant to be used with the application runtime.

You'll have to make your own button, or you could use my sprite button plugin to save some time.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Fri Feb 05, 2010 6:49 am

It's a Windows control object. It wants to be rendered to the screen in the same relative position that it was created in. You can't really do anything about that.

If you want buttons that behave properly you can always make your own button objects out of sprites. Or you can try out linkman's Sprite Button plugin:

viewtopic.php?f=2&t=4978


Edit:
Lol at simultaneous posts :P... the forum didn't even warn me that a new post had been made. Weird.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 05, 2010 8:23 am

that's because PHPBB sucks :P
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Feb 05, 2010 2:57 pm

So is that internal problem with Construct? It does not happen if I do that with say Visual C# or GameMaker.

Is there a work around for the Edit Box too? I really need to have one of those at the end of my game.
I guess I can switch to a new layout but there should be a way to do it since other languages can.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Fri Feb 05, 2010 6:25 pm

I don't know about Game Maker or what they're using for their buttons and input boxes, but I have a feeling that it's not the Windows control API which is what Construct is using. As in... it's Windows.

So yes, you may want to have a separate layout if you really can't be bothered to make your own button.

Also, why are you having the player enter his name at the end of each race? Shouldn't he be entering his name on the previous screen when he's picking his car? Then you can just use a simple text object to show the player's name, and it can sit anywhere on the screen you like.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 05, 2010 6:35 pm

I was only having him enter his name if he made a high score. It would be tiresome to enter you name every time you played and then not got a best time.
B
28
S
8
G
8
Posts: 530
Reputation: 7,154

Post » Fri Feb 05, 2010 7:11 pm

I see. But on a similar note, you could have the player enter his name on the first screen, and save the name he enters in an .ini. Then when the game runs again, it will put that name into the box for you so you don't have to enter it every time, or the player can change the name if he wishes.

Either way, when the player does get a high score it could automatically have his name associated with it. This would also keep the player from entering his name repeatedly if he keeps getting a high score on different tracks.

IMO it just makes more sense to me to input your name on the player select screen.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 05, 2010 7:16 pm

I think this is console (profile) versus arcade (each time) style =)
profiles suck for hotseat, some games (SSB) even have an arcade mode for this!
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Feb 05, 2010 7:16 pm

I made a custom editbox example a while ago(just now posted it in the uploads section) that you could check out:

Custom Edit Box Example
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests