Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(6 edits) (+3)

Hey kigyo! Fantastic plug-in. I'm running into an issue getting text to properly scale in the mock-up textbox. It only updates after leaving the options screen and coming back. Any clue where I might be going wrong here? This is the code for my testbox. Thank you so much in advance! :) I placed the block of code from 3A for the mockup in my preferences!


screen testbox():      
    if _preferences.text_cps != 0:         
        $ textcps = _preferences.text_cps     
    if _preferences.text_cps == 0:
        $ textcps = 500     
$ show_sample = len("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam condimentum sagittis mauris, eget vestibulum ex.")/(textcps+1.5) 
$ hide_sample = show_sample + 1.0 # formula for hide text delay      
frame:         
    background Transform(Frame("gui/textbox.png",xalign=0.5, yalign=1.0), alpha=persistent.dialogueBoxOpacity)         
    xysize(760,280)
    xalign 0.84 yalign 0.82
    timer show_sample repeat True action Show("mock_text", hide_after=hide_sample)
screen mock_text(hide_after=False):
    frame:
        background None
            xysize(760,280)
            xalign 0.84 yalign 0.72 
            style_prefix "texttest" 
            text "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam condimentum sagittis mauris, eget vestibulum ex." slow_cps True xalign 0.5          timer 5.0 action Hide("text_preview") repeat True
    if hide_after:         
        timer hide_after action Hide("mock_text")
(+1)

Hi Kristi, that's a great point, I completely forgot to mention that in the tutorial :O

I'll update it when I get the chance, but for now, add...

size persistent.text_size

...to the "Lorem ipsum" text element in your mock_text screen (for example directly after xalign 0.5).

Let me know if that works!

(+2)

i could kiss you. (platonically, of course)

This worked! Thank you so much! :)

(+1)

I'm glad, you're so welcome!