Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def show_labels(prefix = u""):
- labels = [
- lbn
- for lbn in renpy.get_all_labels().get_rollback()
- if lbn.lower().startswith(prefix)
- ]
- labels.sort()
- xadjustment = ui.adjustment()
- yadjustment = ui.adjustment()
- while True:
- ui.frame()
- ui.vbox()
- layout.label(_(u"Labels which starts with " + prefix), None)
- ui.textbutton(_(u"Close"), clicked=ui.returns(False), size_group="labels")
- ui.side(['c', 'b', 'r'], spacing=5)
- vp = ui.viewport(xadjustment=xadjustment, yadjustment=yadjustment, mousewheel=True)
- ui.vbox()
- for lbn in labels:
- ui.button(clicked=ui.returns(lbn), size_group="labels", xminimum=1.0)
- ui.text(lbn, style="button_text", xalign=0.0)
- ui.close()
- ui.bar(adjustment=xadjustment, style='scrollbar')
- ui.bar(adjustment=yadjustment, style='vscrollbar')
- ui.close()
- ui.close()
- rv = ui.interact()
- if rv is False:
- return
- renpy.jump(rv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement