How do I increase TextBox's font size ?

Get help using Construct 2

Post » Thu Jan 19, 2017 1:23 am

im making a text based horror game. but the text were the player writes is too small.
B
47
S
18
Posts: 37
Reputation: 3,684

Post » Thu Jan 19, 2017 2:00 am

erickson400 wrote:im making a text based horror game. but the text were the player writes is too small.


I'm not at my laptop but if i remember right: on start of layout - Textbox - set "ecm" (that ecm may be wrong, can't remember) to.....

Do a search in the manual for css or textbox or text box. The exact css styling is in there. Just needs a bit of trial and error.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Thu Jan 19, 2017 4:26 pm

elaborate more step by step pls
B
47
S
18
Posts: 37
Reputation: 3,684

Post » Thu Jan 19, 2017 4:31 pm

You're using a textbox that allows the player to type in the box?
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Thu Jan 19, 2017 5:00 pm

yes. i want to make the text bigger so they can see it better.
B
47
S
18
Posts: 37
Reputation: 3,684

Post » Thu Jan 19, 2017 5:13 pm

erickson400 wrote:yes. i want to make the text bigger so they can see it better.



On the layout that you have your textbox - Add these events/actions:

(event) System - Start of layout > (action) Textbox > set css style to (property name) "font-size" (value) "xx[i]em"[/i]

The xx is whatever size you want - i'd start small, maybe around 1.5.
The em is the postfix if you will.

Just keep editng the size (xx) till you find the right size, and you need to test it on different devices. It will be larger or smaller.


Also, click on the textbox object. In the properties window you will see "Auto font size" put this to no.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Thu Jan 19, 2017 5:18 pm

@jeffige ya beat me to it, we were both writing the same solution at the same time LOL

@erickson400 this is a great way to accomplish what you're looking to do.

good luck!
B
27
S
5
G
1
Posts: 33
Reputation: 1,447

Post » Thu Jan 19, 2017 8:14 pm

thanks a lot guy
B
47
S
18
Posts: 37
Reputation: 3,684


Return to How do I....?

Who is online

Users browsing this forum: Anna Nehves Br, divsyntax, volumetv and 16 guests