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
57
S
19
G
4
Posts: 343
Reputation: 6,025

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
43
S
11
G
2
Posts: 1,175
Reputation: 6,744

Post » Wed Feb 18, 2015 1:41 am

You can make your own with events fairly easily...with custom/fitting graphics too.
Image
B
230
S
27
G
13
Posts: 1,782
Reputation: 18,165

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
29
S
10
G
5
Posts: 326
Reputation: 5,757


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
37
S
19
G
45
Posts: 909
Reputation: 27,322

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
57
S
19
G
4
Posts: 343
Reputation: 6,025


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 0 guests