Page 1 of 1

Solved Thanks for the Help!

Posted: Thu Jun 16, 2011 3:14 pm
by Aijoran
I know it hasn't been very long, but I have another question! If you'll be so kind to answer, I saw this in the tutorial but I'm a complete Noob at coding and I was hoping if someone could give me an example of the code to help me understand. I tried to look in the tutorial game's script for it but I got lost in everything else.

I was wondering how to put a click indicator into the text area,

If I'm not being specific enough it's in the tutorial under the character object section the very last thing that is mentioned.

Hello, I'm completely new to this and I tried looking around but there's so much to look through that I got lost and my head spun. So I thought it may be easier to ask. I know this may be a really easy fix for those who have been around awhile so please indulge me.

I was wondering how you would make a menu veiwable in game. Like to have the save/load preferences there next to the text box? I know that you can right click but I would also like the buttons for people who don't know to right click. (I didn't in some of the first ren'py games I played and I felt the need to finish them in one sitting)

*edit*
Also If I may know... Is there a way to change the little Ren'py icon into something else? (the one with the girl in the hat)
old issue solved. :3

Re: How to make a menu vewable in game?

Posted: Thu Jun 16, 2011 3:47 pm
by manga_otaku
For a menu viewable in game with the save/load next to the textbox, do you mean something like this?
example.png
Because if it is, this is the code:

Code: Select all

init python:

    # 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:

            # to save typing
            ccinc = renpy.curried_call_in_new_context

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


    config.window_overlay_functions.append(button_game_menu)
Just copy and paste into the screens.rpy and adjust to your needs.

Re: How to make a menu vewable in game?

Posted: Thu Jun 16, 2011 4:03 pm
by Kimiko
Aijoran wrote:*edit*
Also If I may know... Is there a way to change the little Ren'py icon into something else? (the one with the girl in the hat)
Copy and paste this code into options.rpy under "##More customizations can go here.":

Code: Select all

config.window_icon = "yourgameicon.png"

Re: How to make a menu vewable in game?

Posted: Thu Jun 16, 2011 4:29 pm
by Aijoran
Thank you both of you!

and manga_otaku that's exactly what I meant. :3 as far as I know this is solved. I'll be sure to ask again if I run into any problems. ^.^

Re: How to make a menu vewable in game?

Posted: Thu Jun 16, 2011 5:05 pm
by manga_otaku
No problemo :) Always happy to help xD

Re: How to make a menu vewable in game?

Posted: Fri Jun 17, 2011 1:02 am
by Aijoran
I know it hasn't been very long, but I have another question! If you'll be so kind to answer, I saw this in the tutorial but I'm a complete Noob at coding and I was hoping if someone could give me an example of the code to help me understand. I tried to look in the tutorial game's script for it but I got lost in everything else.

I was wondering how to put a click indicator into the text area,

If I'm not being specific enough it's in the tutorial under the character object section the very last thing that is mentioned.

Re: How to make a click to continue icon

Posted: Fri Jun 17, 2011 1:52 am
by Gumaster
Something like this?
http://www.renpy.org/wiki/renpy/doc/ref ... /Character

Code: Select all

    $ ectc = Character('Eileen', color=(200, 255, 200, 255),
                       ctc = anim.Blink("arrow.png"))
(code from that page, the bit you're interested in is the ctc one.)
>You may want to use different indicators for ctc and ctc_pause
>You may use other animations, including ones you define yourself

Re: How to make a click to continue icon

Posted: Fri Jun 17, 2011 2:37 am
by Aijoran
I think that's what I'm looking for but I can't seem to get it to work. I keep getting all kinds of different errors as I change it around trying to make it work. :S
I'm unsure of how to implement this code to make it work.

Re: How to make a click to continue icon

Posted: Fri Jun 17, 2011 3:27 am
by Gumaster
in that case, could you post up the code you're using and what error you're getting?

Re: How to make a click to continue icon

Posted: Fri Jun 17, 2011 4:00 pm
by Aijoran
After having a night's sleep I ended up figuring out the problem. D:
Seems I wasn't defining the character to have the symbol after it. With a rested mind I fixed it up and it works. :3 Thank you for your patience.