Frigidman Posted September 23, 2020 Share Posted September 23, 2020 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... Link to comment Share on other sites More sharing options...
Frigidman Posted September 23, 2020 Author Share Posted September 23, 2020 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> CptLoRes 1 Link to comment Share on other sites More sharing options...
Bobylein Posted September 30, 2020 Share Posted September 30, 2020 Oh that's really helpful, thanks for sharing your solution to a Problem I didn't know I had, I thought it was some kind of FOV mechanic. Frigidman 1 Link to comment Share on other sites More sharing options...
CptLoRes Posted September 30, 2020 Share Posted September 30, 2020 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. Link to comment Share on other sites More sharing options...
Frigidman Posted September 30, 2020 Author Share Posted September 30, 2020 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 More sharing options...
AtroKahn Posted December 8, 2020 Share Posted December 8, 2020 Was this ever sorted? Link to comment Share on other sites More sharing options...
Mayumi Posted December 9, 2020 Share Posted December 9, 2020 9 hours ago, AtroKahn said: Was this ever sorted? Don't use static sizes like px, pixels change and aren't constant. Use relative units like vw/vh and %. In SVG's use a viewbox. Link to comment Share on other sites More sharing options...
Bobbie Posted December 9, 2020 Share Posted December 9, 2020 . Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now