On the topic of menus...

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.
Message
Author
PixelWrangler
Regular
Posts: 103
Joined: Wed Mar 16, 2005 11:00 pm
Location: Swimming in the sea of electronic dots
Contact:

#16 Post by PixelWrangler »

This brings up an interesting question...

Is it possible to have the name of the character speaking appear separate from the spoken text, with its own background/text style?

And can you vary the width of the separate name box, allowing for maximum flexibility in accomodating names of varied length?

If this is possible with the current version of Ren'Py ( 4.8 ), then please advise. If not, I humbly submit this as a feature suggestion for the next release. ^_^

P.W.
Life is hard.
Except in ren'ai games.
Then it's a whole lot softer.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#17 Post by PyTom »

This is possible, but not well supported, in 4.8. Basically, you have to define a custom Character object that displays the character's name in a second window, and composites everything together using a ui.vbox().

I'll add better support for this in the next release, probably as a new extra.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#18 Post by mikey »

This kind of is a menu question... here we go...

I'd like to reposistion the game menu choices (such as Return, Save, Load, Preferences) to the left rather than right

And on the right half of the menu screen I'd like to have all the actual options and save slots etc.

so as for preferences - to have them all in one "column" on the right side

and for save/load slots - to have only one save slot column on the right side

I guess that's a little complicated... :roll:
So something like this:

Code: Select all

SAVE/LOAD
----------------------------------
                          Save Slot 1
                          Save Slot 2
                          Save Slot 3
                          Save Slot 4
       Return             Save Slot 5
     Load game         Save Slot 6
     Save Game         Save Slot 7
     Preferences
          Main
-------------------------------------

PREFERENCES
----------------------------------
                           Enable/Disable
                                 Yes
                                 No
                            Enable/Disable
                                 Yes
                                 No
                            Enable/Disable
                                 Yes
                                 No
       Return            Enable/Disable
     Load game            Yes
     Save Game            No
     Preferences
          Main
-------------------------------------
Waaah, hope the idea came across.
Is something like that doable?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#19 Post by PyTom »

mikey wrote: I'd like to reposistion the game menu choices (such as Return, Save, Load, Preferences) to the left rather than right

And on the right half of the menu screen I'd like to have all the actual options and save slots etc.
Repositioning the game menu is easy, just mess with the position properties on gm_nav_window.

I need to think a bit on how one can re-layout the file picker and the preferences. If I can come up with a good solution to it, I'll add it in... in the current version of Ren'Py, there isn't really a good way to do this.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#20 Post by PyTom »

Just to update this, I've made a number of changes to Ren'Py that should make mikey's request possible. They will be released with 4.8.1 in a day or so.

Now to go play ToZ for a bit.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Megaman Z
Miko-Class Veteran
Posts: 829
Joined: Sun Feb 20, 2005 8:45 pm
Projects: NaNoRenO 2016, Ren'Py tutorial series
Location: USA
Contact:

#21 Post by Megaman Z »

PyTom wrote:...Now to go play ToZ for a bit.
*sigh* just don't go asking about one particular item mentioned in the readme just yet... wait until other people start playing it before ruining it... ok?
~Kitsune Zeta

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#22 Post by PyTom »

The following is the code that implements mikey's requests in 4.8.1. (Which will be released sometime tomorrow.) It assumes a 640 x 480 screen... some numbers may need to be tweaked for a bigger screen.

(The oddly-indented line should be one line.)

Code: Select all

init 1:
    
    $ config.screen_width = 640
    $ config.screen_height = 480

    # Font sizes.
    $ style.default.size = 20
    $ style.button_text.size = 20
    $ style.file_picker_text.size = 14

    # Change the size of the thumbnails in the file picker.
    $ library.thumbnail_width = 60
    $ library.thumbnail_height = 45

    # Relocate the gm_nav_window.
    $ style.gm_nav_window.xpos = 0.05
    $ style.gm_nav_window.xanchor = 'left'

    # Change preferences layout.
    $ library.preferences['prefs_right'] = library.preferences['prefs_left'] + library.preferences['prefs_right']
    $ del library.preferences['prefs_left']
    $ library.has_cps = False

    # Change file picker layout.
    $ library.file_page_cols = 1
    $ library.file_page_rows = 7
    $ style.file_picker_window.xmaximum = 400
    $ style.file_picker_window.xpos = 240
    $ style.file_picker_window.xanchor = 'left'
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#23 Post by mikey »

OMG, thanks!!!

I'll try it out right away. (you still remember I use 640 x 480? :oops: ) ^_^

No really, thanks for adding the possibility into Ren'Py. Good menus rule. :wink:

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#24 Post by PyTom »

mikey wrote:(you still remember I use 640 x 480? :oops: ) ^_^
Of course. I keep dossiers on many of the forum members. Now I just have to wait for google maps to add satellite photography of Bratislava. :mrgreen:
Good menus rule. :wink:


Well, I thought the old menus were fairly good as they were, but I'm sure that the design of your game is different than the ones that have come out so far. I guess flexibility is usually good.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#25 Post by mikey »

*runs to buy a GPS jammer* 8)

Anyway... the menu and repositionings all work, thanks!

Yeah, the game is a lot of work. Luckily I have all summer. The design, I guess it's no secret that it's simple, but I think a good engine will let you do complicated or simple if you need. Still, sometimes I feel like ruining your work when I disable all those nice features you put in. The truth is though, the spartan design really works, so I actually have no choice.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#26 Post by PyTom »

mikey wrote:Yeah, the game is a lot of work. Luckily I have all summer. The design, I guess it's no secret that it's simple, but I think a good engine will let you do complicated or simple if you need. Still, sometimes I feel like ruining your work when I disable all those nice features you put in. The truth is though, the spartan design really works, so I actually have no choice.
Realize that the ability to disable a feature is also a feature, so you're still using the feature set I provide.

In fact, one of the design goals of Ren'Py was to be able to replicate your current games games fairly completely, ignoring stuff like password entry for the moment.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#27 Post by mikey »

The passwords are actually a virtue made of necessity - similarly to the DVD play titles we couldn't create a save file. :roll: So tried to incorporate it into the design so that even the relatively uncomfortable thing of having to note down things would have a meaning (like messages or deception)

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], CephalonKet, decocloud