Page 1 of 1

Platform specific build settings

Posted: Thu Nov 16, 2017 1:38 pm
by unsatiable
Is there any way of having different settings defined for different build platforms? For example if I wanted to increase button size only on my android build without manually changing variables between builds.

ex:

Code: Select all

if build_platform == "Android":
    define gui.button_height = 70
else:
    define gui.button_height = 36
Thanks for any help

Re: Platform specific build settings

Posted: Thu Nov 16, 2017 1:47 pm
by RicharDann
There are Platform detection functions to check what platform is currently being used.

Also you might want to look into Screen Variants.

Re: Platform specific build settings

Posted: Thu Nov 16, 2017 3:00 pm
by Imperf3kt
Yes you can do that but you might need to use it differently.

I haven't got enough time to give you an example, sorry.
The link above should help though.
A very quick idea would be the following:

if renpy.variant("pc"):
else:

I imagine you need to define both sizes and then select between the two via the styling property of each screen.