mirror of
https://github.com/Dasemu/faust-vn.git
synced 2026-11-27 07:46:29 +00:00
feat(ui): book-style Spanish menus from vnpipe; drop vendored tl
Regenerate vn/ with the vnpipe feat/menus templates, which now ship the Spanish UI translation and force the UI language, so the work no longer carries its own tl/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7de34856f1
commit
01c707ebc7
56 files changed
+1002
-1543
No files matched your search
@@ -4,12 +4,37 @@
|
||||
## Labels of the scenes the player has reached; updated when a scene starts.
|
||||
default persistent.vn_seen_scenes = set()
|
||||
|
||||
## The scene being played (a label of `vn_scenes`); saved with the game.
|
||||
default vn_current_scene = None
|
||||
|
||||
init python:
|
||||
def vn_mark_scene(label):
|
||||
store.vn_current_scene = label
|
||||
if label not in persistent.vn_seen_scenes:
|
||||
persistent.vn_seen_scenes.add(label)
|
||||
renpy.save_persistent()
|
||||
|
||||
## Save metadata shown by the file slots (screens.rpy): the scene title and the first
|
||||
## line of the text on screen. Text tags are dropped and markup is escaped.
|
||||
VN_EXCERPT_CHARS = 90
|
||||
|
||||
def vn_excerpt(what):
|
||||
line = renpy.filter_text_tags(what or "", allow=[]).strip().split("\n")[0].strip()
|
||||
if len(line) > VN_EXCERPT_CHARS:
|
||||
line = line[:VN_EXCERPT_CHARS].rsplit(" ", 1)[0] + "…"
|
||||
return line.replace("[", "[[").replace("{", "{{")
|
||||
|
||||
def vn_save_json(d):
|
||||
titles = dict((l, t) for l, t in vn_scenes)
|
||||
if store.vn_current_scene in titles:
|
||||
d["vn_scene"] = titles[store.vn_current_scene]
|
||||
if _history_list:
|
||||
last = _history_list[-1]
|
||||
d["vn_who"] = (last.who or "").replace("[", "[[").replace("{", "{{")
|
||||
d["vn_line"] = vn_excerpt(last.what)
|
||||
|
||||
config.save_json_callbacks.append(vn_save_json)
|
||||
|
||||
screen vn_scene_select():
|
||||
|
||||
tag menu
|
||||
@@ -33,6 +58,8 @@ style vn_scenes_button_text is gui_button_text
|
||||
style vn_scenes_button:
|
||||
properties gui.button_properties("navigation_button")
|
||||
xalign 0.0
|
||||
padding (26, 5, 20, 5)
|
||||
background Frame("gui/vn/nav_[prefix_]background.png", 6, 0)
|
||||
|
||||
style vn_scenes_button_text:
|
||||
properties gui.text_properties("navigation_button")
|
||||
|
||||
Reference in new issue
Block a user