I've been dabbling in Ren'py again after a few years and the new UI is confusing me a bit, and I have no experience with Python at all so any help would be appreciated!
I have a custom colored text for a certain character and thought, in this case the grey text is the character's inner thoughts. I use what_color to set the text color when defining the character.
Code: Select all
define nt = Character("Nicol", image="nicol", what_color="#727C80")
Code: Select all
style say_thought:
color "#198293"
xpos gui.dialogue_xpos
xsize gui.dialogue_width
ypos gui.dialogue_ypos
line_spacing 5
Code: Select all
screen history():
tag menu
if main_menu:
add gui.main_menu_background
else:
add gui.game_menu_background
modal True
zorder 200
style_prefix "confirm"
add "gui/overlay/confirm.png"
## Avoid predicting this screen, as it can be very large.
predict False
frame:
style_prefix "history"
background "UI_history.png"
top_padding 380
right_padding 350
bottom_padding 150
vpgrid:
yinitial 1.0
cols 1
draggable True
mousewheel True
scrollbars "vertical"
vbox:
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.")
imagebutton:
xpos 0.825
ypos 0.695
idle "UI_button_back.png"
hover "UI_button_back_hover.png"
action Return()
## 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")
line_spacing 5
style history_label:
xfill True
style history_label_text:
xalign 0.5