Sliders get focused, help!

Discussion and feedback on Construct 2

Post » Tue Feb 17, 2015 1:18 pm

Alright, so in my game you control your character (or the camera) with keys.

But, in cheat mode or god mode (where you play the ecosim) you have some sliders controlling the weather.

As i change a slider, and then continue, for example, running (W key) the input doesnt work and the slider becomes focused, as in this screen:

Image


I was looking for an action for the slider "stop focusing" or something, which the Buttons have, but nothing...

Is there a way to prevent this? :roll:
B
61
S
21
G
4
Posts: 355
Reputation: 6,349

Post » Wed Feb 18, 2015 1:06 am

Not really sure why it doesn't have an unfocus. But a way to workaround it, which is not pretty, but works is to make a button offscreen, and in the "On slider changed" you add "Set focus button " and then "Unfocus button" ;)
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,828

Post » Wed Feb 18, 2015 1:41 am

You can make your own with events fairly easily...with custom/fitting graphics too.
Image
B
240
S
29
G
13
Posts: 1,787
Reputation: 18,635

Post » Wed Feb 18, 2015 10:02 am

Tokinsom wrote:You can make your own with events fairly easily...with custom/fitting graphics too.


Making your own is the way to go IMO. The built in one has problems as you describe here, and also never really fit with your game - they just don't look cool.

There are some good tutorials on the forums to help you out if you need - jus search sliders or something like that....
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
34
S
12
G
7
Posts: 356
Reputation: 7,144


Post » Wed Feb 18, 2015 5:27 pm

There's a plugin available that allows you to add css style sheets to the project- then you can style the slider however you want, as well as disabling the focused border thing..
B
41
S
19
G
65
Posts: 1,085
Reputation: 37,842

Post » Thu Feb 19, 2015 9:31 pm

nimos100 wrote:Not really sure why it doesn't have an unfocus. But a way to workaround it, which is not pretty, but works is to make a button offscreen, and in the "On slider changed" you add "Set focus button " and then "Unfocus button" ;)


It worked :D

Since i'm too lazy to work on my own sliders/buttons, i'll stick with this workaround, and in future i'll replace them with something better.
B
61
S
21
G
4
Posts: 355
Reputation: 6,349


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests