1)Add a play sound button
Code: Select all
screen history():
tag menu
## Avoid predicting this screen as it can be very
## massive.
predict False
use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
style_prefix "history"
for h in _history_list:
windows:
## This will properly equalize if history_height is
## is set to None.
has fixed:
yfit True
if h.who:
############################################################################
if h.voice and h.voice.filename: ###Here, of course, it is better to put a graphic button, less hassle with setting its location
textbutton "Play" action Play("voice", h.voice.filename)
############################################################################
label h.who:
style "history_name"
substitute False
## Gets the color from the character's who parameter, if it
## installed.
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 _("History of dialogs is empty.")
Code: Select all
screenhistory():
tag menu
## Avoid predicting this screen as it can be very
## massive.
predict False
use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
style_prefix "history"
for h in _history_list:
windows:
## This will properly equalize if history_height is
## is set to None.
has fixed:
yfit True
if h.who:
if h.voice and h.voice.filename:
textbutton "Play" action Play("voice", h.voice.filename)
#############################################################################################
textbutton "ROLL BACK" action Confirm("Jump?", yes=RollbackToIdentifier(h.rollback_identifier), no=None, confirm_selected=False) xpos 0 ypos 30 ##########After pressing the button, you will roll back
############################################################################################
label h.who:
style "history_name"
substitute False
## Gets the color from the character's who parameter, if it
## installed.
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 _("History of dialogs is empty.")
Code: Select all
define config.hard_rollback_limit = 100
define config.rollback_length = 100
3) How to change the text on the history screen
Code: Select all
label start:
"Hi! I couldn't wait to see you again!"
$ _history_list[-1].what = "I hate you. Wish you were dead."
"If you check history now, you will notice that the last entry changed"
4) Add head
Code: Select all
screenhistory():
tag menu
## Avoid predicting this screen as it can be very
## massive.
predict False
use game_menu(_("History"), scroll=("vpgrid" if gui.history_height else "viewport"), yinitial=1.0):
style_prefix "history"
for h in _history_list:
windows:
## This will properly equalize if history_height is
## is set to None.
has fixed:
yfit True
#####################################################################
if h.who:
hbox:
if h.image_tag:
add "history" + h.image_tag
else:
null width 100
######################################################################
if h.voice and h.voice.filename:
textbutton "Play" action Play("voice", h.voice.filename)
textbutton "ROLL BACK" action RollbackToIdentifier(h.rollback_identifier) xpos 0 ypos 30
label h.who:
style "history_name"
substitute False
## Gets the color from the character's who parameter, if it
## installed.
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 _("History of dialogs is empty.")
Code: Select all
define character.yesod = Character("Yesod", image="yesod")
image yesod smiling = "_YesodSmiling.png"
image history yesod = "yesod-6.png"
label start:
show yesod smiling
yesod "Hello"
yesod ". . ."
". . ."
yesod "Test"
return
5) change text color
Code: Select all
$ what = renpy.filter_text_tags(h.what, allow=gui.history_allow_tags)
text what:
color "#FFD700" ###################color
substitute False
if not _history_list:
label _("History of dialogs is empty.")
viewtopic.php?t=40329
https://old.reddit.com/r/RenPy/comments ... ?context=3
7) Having unselected choices in History?
viewtopic.php?p=548775#p548775
disable history
Code: Select all
$ store._history = True ### history on
voice "voice/003.ogg"
nez "{w=0.5}How are you feeling?{w=1.0}{nw}"
$ store._history = False ### # history off
show mor02
nez "How do you feel?{fast}"
viewtopic.php?p=545688#p545688
10) Scrollbar thumb has a white border
viewtopic.php?p=534763#p534763
11) add images to history log [works with layeredimages]
viewtopic.php?p=534271#p534271
12) How to register a mouse call with a wheel
Code: Select all
screen my_keys:
key "mousedown_5" action ShowMenu("history")
key 'K_ESCAPE' action ShowMenu('preferences')
key 'mouseup_3' action ShowMenu('save')
label start:
show screen my_keys
"text"
Code: Select all
init python:
class MyAdjustment(renpy.display.behavior.Adjustment):
def change(self, value):
if value > self._range and self._value == self._range:
# *Return to the game screen*
return Return()
else:
# Otherwise, just do what the Adjustment normally does
return renpy.display.behavior.Adjustment.change(self, value)
Code: Select all
default adj = MyAdjustment(range = 100,changed =None,adjustable=True)
Code: Select all
yadjustment adj
viewtopic.php?f=8&t=50647
15)Changing dialogue history in rollback
viewtopic.php?p=542946#p542946
16) History search
https://devilspider.itch.io/history-search-tool
You may be interested in the following materials:
- viewtopic.php?f=51&t=65086 - little used history chips
- viewtopic.php?f=51&t=65258 - Little used features screen Load/Save
- viewtopic.php?t=65961 - Little used features screen Settings
- viewtopic.php?p=564110#p564110 - Little used features screen quick menu