Advertisement
Ultra_HR

Style preferences in Ren'Py

Jul 28th, 2015
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. -- The style preferences set up in options.rpy:
  2.  
  3. renpy.register_style_preference("size", "14", style.say_dialogue, "size", 14)
  4. renpy.register_style_preference("size", "18", style.say_dialogue, "size", 18)
  5. renpy.register_style_preference("size", "22", style.say_dialogue, "size", 22)
  6. renpy.register_style_preference("font", "abeezee", style.default, "font", "fonts/abeezee.otf")
  7. renpy.register_style_preference("font", "opendyslexia", style.default, "font", "fonts/opendyslexia.otf")
  8. renpy.register_style_preference("labeltextpos", "abeezee", style.say_label, "ypos", -9)
  9. renpy.register_style_preference("labeltextpos", "opendyslexia", style.say_label, "ypos", -15)
  10. renpy.register_style_preference("labelpos", "abeezee", style.say_who_window, "ypos", 132)
  11. renpy.register_style_preference("labelpos", "opendyslexia", style.say_who_window, "ypos", 152)
  12. renpy.register_style_preference("antialiasing", "off", style.default, "antialias", False)
  13. renpy.register_style_preference("antialiasing", "on", style.default, "antialias", True)
  14.  
  15. -- This is in screens.rpy:
  16.  
  17. ##############################################################################
  18. # Preferences
  19. #
  20. # Screen that allows the user to change the preferences.
  21. # http://www.renpy.org/doc/html/screen_special.html#prefereces
  22.  
  23. screen preferences():
  24.  
  25. tag menu
  26. add "ui/settingsbase.png"
  27. use navigation
  28. # Window/fullscreen
  29. imagebutton auto "ui/window_%s.png" xpos 78 ypos 133 focus_mask None action Preference("display", "window")
  30. imagebutton auto "ui/fullscreen_%s.png" xpos 188 ypos 133 focus_mask None action Preference("display", "fullscreen")
  31. # Font style and anti-alias toggle
  32. imagebutton auto "ui/abeezee_%s.png" xpos 320 ypos 135 focus_mask None action [StylePreference("font", "abeezee"), StylePreference("labeltextpos", "abeezee"), StylePreference("labelpos", "abeezee")]
  33. imagebutton auto "ui/other_%s.png" xpos 392 ypos 135 focus_mask None action [StylePreference("font", "opendyslexia"), StylePreference("labeltextpos", "opendyslexia"), StylePreference("labelpos", "opendyslexia")]
  34. imagebutton auto "ui/on_%s.png" xpos 406 ypos 161 focus_mask None action StylePreference("antialiasing", "on")
  35. imagebutton auto "ui/off_%s.png" xpos 425 ypos 160 focus_mask None action StylePreference("antialiasing", "off")
  36. # Transitions on/off
  37. imagebutton auto "ui/showall_%s.png" xpos 521 ypos 133 focus_mask None action Preference("transitions", "all")
  38. imagebutton auto "ui/shownone_%s.png" xpos 631 ypos 133 focus_mask None action Preference("transitions", "none")
  39.  
  40. # Skip all/seen
  41. imagebutton auto "ui/allmessages_%s.png" xpos 52 ypos 221 focus_mask None action Preference("skip", "all")
  42. imagebutton auto "ui/seenmessages_%s.png" xpos 188 ypos 221 focus_mask None action Preference("skip", "seen")
  43.  
  44. # Font size
  45. imagebutton auto "ui/14_%s.png" xpos 344 ypos 221 focus_mask None action StylePreference ("size", "14")
  46. imagebutton auto "ui/18_%s.png" xpos 380 ypos 221 focus_mask None action StylePreference ("size", "18")
  47. imagebutton auto "ui/22_%s.png" xpos 416 ypos 221 focus_mask None action StylePreference ("size", "22")
  48.  
  49. # After choices
  50. imagebutton auto "ui/stopskipping_%s.png" xpos 500 ypos 221 focus_mask None action Preference("after choices", "stop")
  51. imagebutton auto "ui/keepskipping_%s.png" xpos 643 ypos 221 focus_mask None action Preference("after choices", "skip")
  52.  
  53. # Sliders
  54. frame xpos 96 ypos 298:
  55. style_group "pref"
  56. has vbox
  57. bar value Preference("auto-forward time")
  58.  
  59. frame xpos 456 ypos 298:
  60. style_group "pref"
  61. has vbox
  62. bar value Preference("music volume")
  63.  
  64. frame xpos 96 ypos 355:
  65. style_group "pref"
  66. has vbox
  67. bar value Preference("text speed")
  68.  
  69. frame xpos 456 ypos 355:
  70. style_group "pref"
  71. has vbox
  72. bar value Preference("sound volume")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement