u/daniople

Befriend the Mekakushi Dan in our friendsim visual novel: Tomodachi Dan!
▲ 110 r/kagepro+1 crossposts

Befriend the Mekakushi Dan in our friendsim visual novel: Tomodachi Dan!

Befriend the Kagerou Project cast in our fanmade visual novel, Tomodachi Dan! Chapter 0: Ayano is now out and playable for FREE: https://daniople.itch.io/tomodachi-dan

u/daniople — 5 days ago
▲ 1 r/RenPy

How to change the viewports of certain game menu pages but not all of them

Hello! I'm not sure if this is possible, but would it be possible to change the viewport size of certain game menus (specifically Help and History) without messing with the others? Here is what my code currently looks like for both:

## History screen ##############################################################
##
## This is a screen that displays the dialogue history to the player. While
## there isn't anything special about this screen, it does have to access the
## dialogue history stored in _history_list.
##
## https://www.renpy.org/doc/html/history.html


screen history():


    tag menu


    ## Avoid predicting this screen, as it can be very large.
    predict False


    use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0, spacing=gui.history_spacing):


        style_prefix "history"


        for h in _history_list:


            window:


                ## This lays things out properly if history_height is None.
                has fixed:
                    yfit True


                if h.who:


                    label h.who:
                        style "history_name"
                        substitute False


                        ## Take the color of the who text from the Character, if
                        ## set.
                        if "color" in h.who_args:
                            text_color h.who_args["color"]


                $ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
                text what:
                    substitute False


        if not _history_list:
            label _("The dialogue history is empty.")



## This determines what tags are allowed to be displayed on the history screen.


define gui.history_allow_tags = { "alt", "noalt", "rt", "rb", "art" }



style history_window is empty


style history_name is gui_label
style history_name_text is gui_label_text
style history_text is gui_text


style history_label is gui_label
style history_label_text is gui_label_text


style history_window:
    xfill True
    ysize gui.history_height


style history_name:
    xpos gui.history_name_xpos
    xanchor gui.history_name_xalign
    ypos gui.history_name_ypos
    xsize gui.history_name_width


style history_name_text:
    min_width gui.history_name_width
    textalign gui.history_name_xalign


style history_text:
    xpos gui.history_text_xpos
    ypos gui.history_text_ypos
    xanchor gui.history_text_xalign
    xsize gui.history_text_width
    min_width gui.history_text_width
    textalign gui.history_text_xalign
    layout ("subtitle" if gui.history_text_xalign else "tex")


style history_label:
    xfill True


style history_label_text:
    xalign 0.5



## Help screen #################################################################
##
## A screen that gives information about key and mouse bindings. It uses other
## screens (keyboard_help, mouse_help, and gamepad_help) to display the actual
## help.


screen help():


    tag menu


    default device = "keyboard"


    use game_menu(_("Controls"), scroll="viewport"):


        style_prefix "help"


        vbox:
            spacing 23


            hbox:


                textbutton _("Keyboard") action SetScreenVariable("device", "keyboard")
                textbutton _("Mouse") action SetScreenVariable("device", "mouse")


                if GamepadExists():
                    textbutton _("Gamepad") action SetScreenVariable("device", "gamepad")


            if device == "keyboard":
                use keyboard_help
            elif device == "mouse":
                use mouse_help
            elif device == "gamepad":
                use gamepad_help


## a bunch of controls and stuff


style help_button is gui_button
style help_button_text is gui_button_text
style help_label is gui_label
style help_label_text is gui_label_text
style help_text is gui_text


style help_button:
    properties gui.button_properties("help_button")
    xmargin 12


style help_button_text:
    properties gui.text_properties("help_button")


style help_label:
    xsize 375
    right_padding 30


style help_label_text:
    size gui.text_size
    xalign 1.0
    textalign 1.0
reddit.com
u/daniople — 25 days ago
▲ 1 r/RenPy

How to left align game menu text buttons but not the main menu ones?

Hello! I've been trying to figure out how to left align my game menu buttons while keeping my main menu buttons centered. Whenever I edit the alignment in the code below however, it changes the alignment for both menu's buttons:

style navigation_button_text:
    properties gui.text_properties("navigation_button")
    xalign 0.5 #for center alignment

I've tried to use if main_menu: but that doesnt work in this instance... If anyone knows how to separate the alignment of these menu buttons I would be grateful.

reddit.com
u/daniople — 29 days ago
▲ 1 r/RenPy

how to create a toggle that expands text

BEFORE clicking the toggle

AFTER clicking the toggle

Hello! I'm creating a content warning page for my visual novel. There are different routes that the player can take, all of which contain their own respective warnings. To avoid spoiling the player, I've been trying to make a toggle that expands/reveals a list of warnings for each route... but I haven't really figure out how to do this.

Here is the code in screens.rpy that includes the text that i would like toggled.

screen tw(): ## content warning page


    tag menu


    ## This use statement includes the game_menu screen inside this one. The
    ## vbox child is then included inside the viewport inside the game_menu
    ## screen.
    use game_menu(_("Content Warnings"), scroll="viewport"):


        style_prefix "tw"


        vbox:


            ## gui.tw is usually set in options.rpy.
            if gui.tw:
                text "[gui.tw!t]\n"


            text _("> Ayano Route")
            text _("     - list1\n     - list 2\n     - list 3\n     - list 4")
reddit.com
u/daniople — 1 month ago
▲ 69 r/kagepro

one month left for kagepro meme zine submissions!

you can submit your memes here and you can check out the previous meme zines here!

u/daniople — 2 months ago