[SOLVED]How do I resize sliderbar using css?

Get help using Construct 2

Post » Mon Jul 27, 2015 1:16 pm

Hello World,

How can I resize the sliderbar object using css? What properties do I have to use? I wanna make it bigger so it can be easier to use with touch.

Thank you.
Last edited by VIKINGS on Tue Jul 28, 2015 5:23 pm, edited 1 time in total.
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 27, 2015 6:43 pm

After a few Google searches I believe this is your best bet : http://www.hongkiat.com/blog/html5-range-slider-style/
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Mon Jul 27, 2015 7:39 pm

Ok, but how do I translate those things into C2 events and actions @Magistross ?
Using event on start of layout, action slider set css style I need to know what to enter there:
Image
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 27, 2015 8:46 pm

You won't be able to do it with the "Set CSS style" action since you will need to have some pseudo selectors and what not in your CSS. There's a trick to load a CSS file as a user posted recently, you will need to do something similar.
Noncentz705 wrote:Image

Give your progress bar an ID then build your CSS around it.
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Mon Jul 27, 2015 10:27 pm

The problem @Magistross is that the sliderbar object doesn't have any similar action to "set web font" like the text does. Any way to work around that?
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Jul 27, 2015 10:49 pm

Yep, you add a dummy text object like shown. It was aptly named "css_loader", since all it will do is load a css file using the "Set web font" hack. Loading the CSS file with the dummy text object will make the style definition contained in the file accessible to all the HTML controls in the page, including your progress bar. ;)
B
71
S
30
G
25
Posts: 984
Reputation: 19,503

Post » Tue Jul 28, 2015 1:43 pm

K, I tried a couple of times, I must be doing something wrong. Could you please make a capx @Magistross to show me how it's done?
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Tue Jul 28, 2015 2:10 pm

There is also the CssImport plugin that might help..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Jul 28, 2015 2:12 pm

Thank you, I already have that plugin @LittleStain . Although I don't really see what the big difference is between using that one or just importing the file from the projects tab....
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Tue Jul 28, 2015 2:50 pm

VIKINGS wrote:Thank you, I already have that plugin @LittleStain . Although I don't really see what the big difference is between using that one or just importing the file from the projects tab....


Biggest difference in my opinion is that you don't have to do anything..
Just adding it to my project made sure the css I needed to make my openstreetmap work worked..

So all you'd have to do is add an ID and reference it in your css file and it should work..
No further actions..

Adding an ID wasn't even nescessary.. :)
Last edited by LittleStain on Tue Jul 28, 2015 3:17 pm, edited 1 time in total.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: dop2000, KTML5 and 23 guests