I have condition for shadows for text in textbox based of if game is in fullscreen or not (it needed that check because shadow was a bit too small in full screen and letting renpy scale it was giving me not so good effect).
This is condition in screen:
Code: Select all
if preferences.fullscreen == True:
$ fullscreen_offset = 1
else:
$ fullscreen_offset = 0
And this is added to text:
Code: Select all
outlines [(0, (0, 0, 0, 50), absolute(1 + fullscreen_offset), absolute(1 + fullscreen_offset)), (0, (0, 0, 0, 100), absolute(2 + fullscreen_offset), absolute(1 + fullscreen_offset)), (0, (0, 0, 0, 50), absolute(2 + fullscreen_offset), absolute(2 + fullscreen_offset))]
However I realised that I have used this effect in few more screens then just textbox and would like to use it there too but constantly repeating it is inefficient. Can I somehow make this condition check global and call this outlines as a single statement similar how you add style to text (text "some text" style 'blurred_text')?