how do you hide UI buttons...?

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
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

how do you hide UI buttons...?

#1 Post by Snowflower » Fri Feb 04, 2011 8:23 pm

Hello,

it will be extremely helpful if anyone can tell me a way to hide the ui buttons for
a. the splashscreen
b. the CG scene.
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

User avatar
Black_Saber
Regular
Posts: 74
Joined: Wed Jul 14, 2010 4:56 am
Completed: cafe minigame
Projects: Beach Restaurant
Location: Indonesia
Contact:

Re: how do you hide UI buttons...?

#2 Post by Black_Saber » Sat Feb 05, 2011 12:32 am

just a guess, but looks like here is the answer for your question number 2 : http://lemmasoft.renai.us/forums/viewto ... f=8&t=8933

I'm not really know about splashscreen, but you can see this topic : http://lemmasoft.renai.us/forums/viewto ... f=8&t=8382
"*cackle*cackle*! In short, it's all about cleverly using the gaps between jobs to play. If it goes too far, it can turn to laziness. However, people only become mature when they learn to balance work with pleasure. Simply put, if all you care about is work all the time, you're not fully mature." - Gaap (Umineko no Naku Koro ni)

User avatar
MaiMai
Yandere
Posts: 1757
Joined: Sat Mar 21, 2009 6:04 pm
Completed: [Phase Shift]
Projects: [ None ]
Organization: Paper Stars
Tumblr: maiscribbles
Deviantart: maiscribble
Location: USA, Southern California
Contact:

Re: how do you hide UI buttons...?

#3 Post by MaiMai » Sat Feb 05, 2011 1:27 am

It's a default feature of Ren Py' to hide UI buttons for CG scenes by simply pressing 'H'
Image COMMISSIONS AVAILABLE (check Tumblr sidebar)

User avatar
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

Re: how do you hide UI buttons...?

#4 Post by Snowflower » Sat Feb 05, 2011 2:44 am

Black_Saber wrote:just a guess, but looks like here is the answer for your question number 2 : http://lemmasoft.renai.us/forums/viewto ... f=8&t=8933

I'm not really know about splashscreen, but you can see this topic : http://lemmasoft.renai.us/forums/viewto ... f=8&t=8382
Eh? I don't think your first link is relevant to my question... I'm not looking for the cg gallery button. I need to HIDE the skip, save, load, config buttons I made for the text window during CGs. It's not working.
The second link, I tried numerous times, trying to hide it, but it fails everytime.
even though I set is as false before splash, it shows up. False doesnt do anything for me.
MaiMai wrote:It's a default feature of Ren Py' to hide UI buttons for CG scenes by simply pressing 'H'
can you defaultly (?) hide it during CGs without clicking H? I've seen some games without the ui buttons during CGs automatically.
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

User avatar
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

Re: how do you hide UI buttons...?

#5 Post by Snowflower » Sat Feb 05, 2011 2:57 am

nevermind, I found a solution.
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

User avatar
Black_Saber
Regular
Posts: 74
Joined: Wed Jul 14, 2010 4:56 am
Completed: cafe minigame
Projects: Beach Restaurant
Location: Indonesia
Contact:

Re: how do you hide UI buttons...?

#6 Post by Black_Saber » Sat Feb 05, 2011 8:21 pm

[QUOTE=Snowflower]I need to HIDE the skip, save, load, config buttons I made for the text window during CGs. It's not working.[/QUOTE]

you didn't said that >.>
and I thought you're gonna hide some CG picture in a button :/
"*cackle*cackle*! In short, it's all about cleverly using the gaps between jobs to play. If it goes too far, it can turn to laziness. However, people only become mature when they learn to balance work with pleasure. Simply put, if all you care about is work all the time, you're not fully mature." - Gaap (Umineko no Naku Koro ni)

starry_ov
Newbie
Posts: 4
Joined: Sun Jan 09, 2011 2:17 am
Contact:

Re: how do you hide UI buttons...?

#7 Post by starry_ov » Sun Feb 06, 2011 6:56 pm

Snowflower wrote:nevermind, I found a solution.
can I ask you how you did it? I want the same for pauses in the game, I have this pause of like 5 sec and the buttons doesn't look that good floating in there XDDD (sorry for my english btw x__x)

User avatar
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

Re: how do you hide UI buttons...?

#8 Post by Snowflower » Sun Feb 06, 2011 11:02 pm

For the cgs?
May I ask what code you have for defining your buttons?
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

starry_ov
Newbie
Posts: 4
Joined: Sun Jan 09, 2011 2:17 am
Contact:

Re: how do you hide UI buttons...?

#9 Post by starry_ov » Mon Feb 07, 2011 4:17 pm

I'm using something like this:

Code: Select all

ui.hbox(xpos=0.96, ypos=0.75, xanchor='right', yanchor='bottom')
ui.textbutton("{size=-7}Hide{/size}", clicked=ccinc("_hide_windows"), xminimum=40)
ui.textbutton("{size=-7}Skip{/size}", clicked=toggle_skipping, xminimum=40)
ui.textbutton("{size=-7}Q.Save{/size}", clicked=renpy.curried_call_in_new_context('_quick_save'), xminimum=40)
ui.textbutton("{size=-7}Q.Load{/size}", clicked=ui.jumps("_quick_load"), xminimum=40)
ui.textbutton("{size=-7}Prefs{/size}", clicked=ccinc("_game_menu_preferences"), xminimum=40)
ui.close()
For now I'm "resolving" this issue with the Hide button for cgs, but still looks a little weird when I have a pause during 5 secs (for school bell's sound effect) :/

User avatar
Snowflower
Bishie Fangirl
Posts: 814
Joined: Sat Jan 01, 2011 11:24 pm
Completed: Idol Crush
Projects: Shugojin!, RockRobin (openmodewriter), your highness
Soundcloud: jenna-yeon
Location: Orange County, CA
Contact:

Re: how do you hide UI buttons...?

#10 Post by Snowflower » Mon Feb 07, 2011 8:55 pm

Code: Select all

    # Give us some space on the right side of the screen.
    style.window.right_padding = 100

    def toggle_skipping():
        config.skipping = not config.skipping

    show_button_game_menu = True

    def button_game_menu():
        
        if show_button_game_menu == True:

            # to save typing
            ccinc = renpy.curried_call_in_new_context

            ui.vbox(xpos=0.97, ypos=0.96, xanchor='right', yanchor='bottom')
            ui.textbutton("Skip", clicked=toggle_skipping, xminimum=75)
            ui.textbutton("Save", clicked=ccinc("_game_menu_save"), xminimum=75)
            ui.textbutton("Load", clicked=ccinc("_game_menu_load"), xminimum=75)
            ui.textbutton("Prefs", clicked=ccinc("_game_menu_preferences"), xminimum=75)
            ui.close()

    config.overlay_functions.append(button_game_menu)
That's my code and before each CG, i put in

Code: Select all

show_button_game_menu = False
Make sure the show_game... that part is exactly same for all of them.

That was my issue
Image
Completed: Idol Crush | WIP: your highness | Hiatus: Shugojin!| Follow Me on Twitter | Subscribe to YouTube
your highness @ 102k as of 2/13

User avatar
Aleema
Lemma-Class Veteran
Posts: 2677
Joined: Fri May 23, 2008 2:11 pm
Organization: happyB
Tumblr: happybackwards
Contact:

Re: how do you hide UI buttons...?

#11 Post by Aleema » Tue Feb 08, 2011 10:24 pm

Damn it, we need to edit the wiki but I CAN'T IT'S BROKEN.

To make your buttons only appear for the dialogue window, say:

Code: Select all

config.window_overlay_functions.append(button_game_menu)
INSTEAD OF:

Code: Select all

config.overlay_functions.append(button_game_menu)

Post Reply

Who is online

Users browsing this forum: No registered users