Ui text?
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.
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.
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Ui text?
Whenever I make an ending gallery, the ui.text font follows the default font. Is there any way to change that?
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
-
- Regular
- Posts: 195
- Joined: Tue Dec 15, 2009 4:20 am
- Projects: The Duke's Daughter
- Location: Cape Town
- Contact:
Re: Ui text?
Could try this reference: Properties
Mental weather report: Cloudy with a possibility of brain storms.
Re: Ui text?
Code: Select all
ui.text("Hello World", style=style.galleryText)
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Re: Ui text?
How do I define this, exactly?Cironian wrote:Code: Select all
ui.text("Hello World", style=style.galleryText)
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
- Aleema
- Lemma-Class Veteran
- Posts: 2677
- Joined: Fri May 23, 2008 2:11 pm
- Organization: happyB
- Tumblr: happybackwards
- Contact:
Re: Ui text?
Code: Select all
style.galleryText.font = "myfont.tff" #For a style
ui.text("My Text", font="myfont.tff") #For that one line
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Re: Ui text?
Thanks! You're so great, Aleema!
Sorry for asking again, guys... This time is about combining ui.text and ui.image map.
(I'm a noob who have too many dreams)
I know how to make imagemaps, such as main menu imagemaps and game menu imagemaps, also the simple imagemap.
But how do I combine ui.text and imagemaps?
To explain it more easily, I have this image:
Something similar to that
The ui text will be at the title and explanation.
You know it'll save more space this way, as I will make LOTS of mission, and if I have to make different images for each mission sheet, meh.
Now then, which one should I edit from this simple imagemap code? Do I simply insert something like
and edit it?
Or should I make an entirely different coding?
Sorry for asking again, guys... This time is about combining ui.text and ui.image map.
(I'm a noob who have too many dreams)
I know how to make imagemaps, such as main menu imagemaps and game menu imagemaps, also the simple imagemap.
But how do I combine ui.text and imagemaps?
To explain it more easily, I have this image:
Something similar to that
The ui text will be at the title and explanation.
You know it'll save more space this way, as I will make LOTS of mission, and if I have to make different images for each mission sheet, meh.
Now then, which one should I edit from this simple imagemap code? Do I simply insert something like
Code: Select all
$ result = renpy.imagemap("ground.jpg", "hover.jpg", [
(8, 200, 86, 278, "swimming"),
(204, 50, 282, 128, "science"),
(452, 79, 530, 157, "art"),
(602, 316, 680, 394, "go home"),
], focus="imagemap")
Or should I make an entirely different coding?
- Aleema
- Lemma-Class Veteran
- Posts: 2677
- Joined: Fri May 23, 2008 2:11 pm
- Organization: happyB
- Tumblr: happybackwards
- Contact:
Re: Ui text?
You don't want an imagemap for this. The imagemap will cover up everything, so you wouldn't see the explanation. You need to build that from UI functions. Work with hbox, vbox, and one of the buttons (imagebutton/textbutton), and yeah, ui.text.
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
- Aleema
- Lemma-Class Veteran
- Posts: 2677
- Joined: Fri May 23, 2008 2:11 pm
- Organization: happyB
- Tumblr: happybackwards
- Contact:
Re: Ui text?
Ummm ... *goes to check* Oh, jeez. Looking from the CG gallery script in the cookbook, I'd have to say no.
There's a quick example on the top of the documentation for UI Functions: http://www.renpy.org/wiki/renpy/doc/ref ... _Functions
There's a quick example on the top of the documentation for UI Functions: http://www.renpy.org/wiki/renpy/doc/ref ... _Functions
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Re: Ui text?
Ah, I see.
It's similar to the ending gallery then, something like this, right?
It's similar to the ending gallery then, something like this, right?
Code: Select all
$ ui.textbutton("Return", clicked=ui.jumps("main_menu_again"), xalign=1.0)
$ ui.vbox(xalign=0.5,ypos=0.2)
if persistent.ending4:
$ ui.textbutton("1. Worst Ending 1 : Killed by the Hands of a Murderer")
elif not persistent.ending4:
$ ui.textbutton("1. ???")
- Aleema
- Lemma-Class Veteran
- Posts: 2677
- Joined: Fri May 23, 2008 2:11 pm
- Organization: happyB
- Tumblr: happybackwards
- Contact:
Re: Ui text?
Yeah, though you wouldn't need persistent data. Just regular variables will do.
- azureXtwilight
- Megane Procrastinator
- Posts: 4118
- Joined: Fri Mar 28, 2008 4:54 am
- Completed: Fantasia series (ROT and ROTA), Doppleganger: Dawn of The Inverted Soul, a2 (a due), Time Labyrinth
- Projects: At Regime's End
- Organization: Memento-Mori VNs, Team Sleepyhead
- Location: Yogyakarta, Indonesia.
- Contact:
Re: Ui text?
(For what it's worth, while I agree that an imagemap isn't the best course of action here, you can make imagemaps out of mostly-transparent PNGs and they won't cover anything other than the parts of the screen where they have opaque pixels.)Aleema wrote:The imagemap will cover up everything
Server error: user 'Jake' not found
Who is online
Users browsing this forum: Google [Bot]