Jump to content

Quick Text on Screens Q


Frigidman

Recommended Posts

Built a first screen, to see what it does and the power it has (for when I start coding it with the LUA). Saw the "Quick Text" option and decided to mess with it. Entered in some basic HTML to display a warning, and it seemed fine, took styles, and html, and seems like it can be very powerful.

 

However.

 

The moment I began to walk back from it, the text started jumping bigger in stages the further away I got. Any hints why this is happening? I didn't code in any @media reactive css or the like, it was basic static size and coloring styles.

 

( I cant copy/paste the exact code I used, because the game wipes the screen when I go back into Quick Text )... but here are some shots...

snip1.jpg

snip2.jpg

snip3.jpg

Link to comment
Share on other sites

And wouldn't you know it, as soon as I typed that up and submitted, and went back into the game... I found "Edit HTML Content" and saw hat it wrapped everything in a bootstrap div. With a "vw" font size.

 

So I changed my static font sizing to use the "vw" units instead of "px", and its behaving now =p

 

<div class="bootstrap" style="font-size:9vw; ">
<b style="color:#ffaa00;font-size:17vw;">DANGER</b><br>

DO NOT ENTER<br>
WITHOUT PRIVS<br>
YOU WILL DIE
</div>

 

snip4.jpg

Link to comment
Share on other sites

9 minutes ago, CptLoRes said:

You solution is a good workaround, but there is an underlying problem with the HTML rendered changing depending on view distance that  can be problematic when you are working with variables inserted into SVG etc.

Right, I can see lots of issues with having to resort to reactive percents and vw/vh values instead of what I call "known quantity" values (like working with px and pt). This odd behavior when I 'step away from a screen' is really a difficult one to deal with at times.

 

Granted my example above was SUPER SIMPLE in compares to what can be done with screens. I've already fought with getting SVG's to size and align right LOL... and getting further into LUA dynamical screen changing content, I am sure I will get frustrated every step of the way with things not behaving as I expected them too ;)

 

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...