[NaNoRenO 2016] New Gui

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

[NaNoRenO 2016] New Gui

#1 Post by PyTom »

So, after a month of sustained effort - interrupted only by an urgent Ren'Py release - I've finished what will become the new Ren'Py default gui.

A port of The Question to use the new GUI can be found here:

http://share.renpy.org/the_question_newgui-dists

This project had a number of goals:

1) To provide a modern - if generic - widescreen compatible default gui out of the box.
2) To make it easy for people to customize the default gui.
3) To make it easy for people to replace the default gui entirely.

over the course of the project, two more goals emerged:

4) To provide more functionality to gui builders.
5) To fix bugs and other issues encountered, and in general to make Ren'Py better.

This gui also uses the screen variant system to adapt to various computers, tablets, and phones.

A nice thing about this is that I'm able to change Ren'Py in ways that will make everyone's life easier. (I hope.) So whenever code looked too ugly, i fixed it.

This project isn't done yet. The eventual plan is to use code- and image-generation to allow this to become a family of guis, where creators can pick sizes, accent colors, and light or dark themes. I need to prove #2 by creating a second GUI based on this one - one that looks fairly different, due to changing fonts and images. And I'd like to have a guide to modifying this GUI, one in which the most common tasks are answered in some detail.

So, a lot of work to do, but a lot was done in the past month.

Once again, thank you to Auro-Cyanide for the initial design. (But all the blame goes to me - I've had to adapt it for various reasons.)
Attachments
Desktop Main Menu
Desktop Main Menu
Desktop Preferences
Desktop Preferences
Desktop Load Screen
Desktop Load Screen
Desktop Say Screen
Desktop Say Screen
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: 16088
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:

Re: [NaNoRenO 2016] New Gui

#2 Post by PyTom »

Here are some shots from the small (phone) version.
Attachments
Phone Main Menu
Phone Main Menu
Phone Preferences
Phone Preferences
Phone Say Screen
Phone Say Screen
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: 16088
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:

Re: [NaNoRenO 2016] New Gui

#3 Post by PyTom »

And finally, here's what happens if I change the accent color and regenerate things.
Attachments
screenshot-2016-63.png
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
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: [NaNoRenO 2016] New Gui

#4 Post by xela »

- All styles/theme are reset for this, which is great cause "none-default values for 'top-parent' styles" really messed me up in older "themed" gui before I knew what's what in Ren'Py and started to move from default GUI to a custom one about an year into the development.
- Example of a check button.
- Really solid examples of atl.
- Clean and clear definition of styles with everything at one place.

===>>
It's a great improvement to the code at the very least. Does image generation mean that images will be generated for each project? Because having (easy) access to gui resources like in this example is awesome.
Like what we're doing? Support us at:
Image

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: [NaNoRenO 2016] New Gui

#5 Post by nyaatrap »

Excellent change. I have been using style list of gui components instead of default themes. Themes prevented customizing, but this way of definition makes customizing easier.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1958
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: [NaNoRenO 2016] New Gui

#6 Post by Donmai »

Code: Select all

# Sizes
#
# These will need to be changed if you change the size of the game. 
# Remember to click "Window" in preferences to ensure the window itself is resized.
Yay! Maybe that last line should be in big red letters. :lol:

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: [NaNoRenO 2016] New Gui

#7 Post by xavimat »

I like it!

EDIT:
It seems odd to me to translate strings with a single letter in it, as in lines 280, 284, 288 in gui.rpy:

Code: Select all

        label _("H")
        label _("S")
        label _("V")
EDIT2:

Code: Select all

style skip_triangle:
    # We have to use a font that has the BLACK RIGHT-POINTING SMALL TRIANGLE
    # glyph in it.
    font "DejaVuSans.ttf"
Is not this code implying that the font file should be included in the build?


ORIGINAL:
Solved: However, testing it, I pressed TAB to Skip text and this happened:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 62, in script
    menu:
Exception: Cannot compile ATL Transform at game/gui.rpy:256, as it's missing positional parameter cycle.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 62, in script
    menu:
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\ast.py", line 1451, in execute
    choice = renpy.exports.menu(choices, self.set)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\exports.py", line 834, in menu
    rv = renpy.store.menu(items)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\exports.py", line 1021, in display_menu
    rv = renpy.ui.interact(mouse='menu', type=type, roll_forward=roll_forward)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\ui.py", line 277, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 2428, in interact
    repeat, rv = self.interact_core(preloads=preloads, **kwargs)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 2696, in interact_core
    root_widget.visit_all(lambda i : i.per_interact())
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 396, in visit_all
    d.visit_all(callback)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 396, in visit_all
    d.visit_all(callback)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 396, in visit_all
    d.visit_all(callback)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\screen.py", line 394, in visit_all
    self.child.visit_all(callback)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 396, in visit_all
    d.visit_all(callback)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 396, in visit_all
    d.visit_all(callback)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 396, in visit_all
    d.visit_all(callback)
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\display\core.py", line 393, in visit_all
    for d in self.visit():
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\atl.py", line 520, in visit
    block = self.compile()
  File "C:\Users\f\Downloads\the_question_newgui-all\renpy\atl.py", line 426, in compile
    self.parameters.positional[0],
Exception: Cannot compile ATL Transform at game/gui.rpy:256, as it's missing positional parameter cycle.

Windows-Vista-6.0.6001-SP1
Ren'Py 6.99.11.1227
The Question 1.0
[/s]
Last edited by xavimat on Sun Apr 17, 2016 10:21 am, edited 3 times in total.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: [NaNoRenO 2016] New Gui

#8 Post by xela »

*This crash was fixed about a week ago.
Like what we're doing? Support us at:
Image

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: [NaNoRenO 2016] New Gui

#9 Post by xavimat »

xela wrote:*This crash was fixed about a week ago.
Thanks, xela. I didn't know.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

Re: [NaNoRenO 2016] New Gui

#10 Post by PyTom »

xavimat wrote:I like it!

EDIT:
It seems odd to me to translate strings with a single letter in it, as in lines 280, 284, 288 in gui.rpy:

Code: Select all

        label _("H")
        label _("S")
        label _("V")
This is probably true. I've already marked them as keyboard keys, but I may take them out entirely. I just worry that some language somewhere will have a convention that keyboard characters are indicated in a language-specific way. (Of course, the keys themselves are very English-specific.)
EDIT2:

Code: Select all

style skip_triangle:
    # We have to use a font that has the BLACK RIGHT-POINTING SMALL TRIANGLE
    # glyph in it.
    font "DejaVuSans.ttf"
Is not this code implying that the font file should be included in the build?
It is, but I want to make clear that we should use DejaVuSans for the shapes, even if the creator changes the gui font.
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
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: [NaNoRenO 2016] New Gui

#11 Post by xavimat »

PyTom wrote:
xavimat wrote:...translate strings with a single letter in it, as in lines 280, 284, 288 in gui.rpy:

Code: Select all

        label _("H")
        label _("S")
        label _("V")
This is probably true. I've already marked them as keyboard keys, but I may take them out entirely. I just worry that some language somewhere will have a convention that keyboard characters are indicated in a language-specific way. (Of course, the keys themselves are very English-specific.)
Maybe something like this:

Code: Select all

        label _("{#key}H")
        label _("{#key}S")
        label _("{#key}V")
PyTom wrote:

Code: Select all

style skip_triangle:
    # We have to use a font that has the BLACK RIGHT-POINTING SMALL TRIANGLE
    # glyph in it.
    font "DejaVuSans.ttf"
Is not this code implying that the font file should be included in the build?
It is, but I want to make clear that we should use DejaVuSans for the shapes, even if the creator changes the gui font.
Yes, of course, but I mean, maybe the font file DejaVuSans.ttf should be included in the templates themselves (similar to DroidSansFallback.ttf being included in the Chinese template).
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
PyTom
Ren'Py Creator
Posts: 16088
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:

Re: [NaNoRenO 2016] New Gui

#12 Post by PyTom »

DejaVuSans ships in common/, since Ren'Py uses it internally.

And I would up getting rid of the translations at all.
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
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: [NaNoRenO 2016] New Gui

#13 Post by xavimat »

PyTom wrote:DejaVuSans ships in common/, since Ren'Py uses it internally.
Oh, sorry, I didn't know... :(
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
raeru
Regular
Posts: 28
Joined: Fri Jun 17, 2016 7:45 am
IRC Nick: ryle
Deviantart: ryle-chan
Location: Philippines
Contact:

Re: [NaNoRenO 2016] New Gui

#14 Post by raeru »

This quite nice ;_; but I have to do my own GUI ;_;

Post Reply

Who is online

Users browsing this forum: No registered users