Window/Fullscreen mode buttons issue

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
sashaaero
Regular
Posts: 45
Joined: Mon Jul 13, 2015 6:08 pm
Projects: Everlasting Cold
Organization: OverDream Development
Github: sashaaero
Skype: sashaaero
Contact:

Window/Fullscreen mode buttons issue

#1 Post by sashaaero »

Hi everyone!
I have one trouble that 'window' button doesn't feel it's selected.
Here is example.
Image
Image

(There is no images errors, another buttons with preferences works okay)

And code is

Code: Select all

grid 2 1:
    label '{size=32}Display{/size}' xpos 30 yalign 0.5
    hbox:
        button:
            text 'Window' xalign 0.5 yalign 0.5
            action Preference('display', 'window') 
            xalign 0.5
            background Frame('images/gui/settings/left_slide_button_deselect.png', 0, 0)
            selected_background Frame('images/gui/settings/left_slide_button_select.png', 0, 0)
            xsize 200
            ysize 100
            xpadding 0
            xmargin 0
        button:
            text 'Fullscreen' xalign 0.5 yalign 0.5
            action Preference('display', 'fullscreen') 
            xalign 0.5
            background Frame('images/gui/settings/right_slide_button_deselect.png', 0, 0)
            selected_background Frame('images/gui/settings/right_slide_button_select.png', 0, 0)
            xsize 200
            ysize 100
            xpadding 0
            xmargin 0
What is the problem here?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Window/Fullscreen mode buttons issue

#2 Post by Donmai »

It may look strange, but this is normal Ren'Py behaviour. You can try changing

Code: Select all

action Preference('display', 'window')
to

Code: Select all

action Preference('display', 'any window')
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

User avatar
sashaaero
Regular
Posts: 45
Joined: Mon Jul 13, 2015 6:08 pm
Projects: Everlasting Cold
Organization: OverDream Development
Github: sashaaero
Skype: sashaaero
Contact:

Re: Window/Fullscreen mode buttons issue

#3 Post by sashaaero »

Thanks a lot!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], mold.FF, Red-Baby