Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. screen file_picker:
  2.  
  3. default screenshot_image = None
  4.  
  5. textbutton _("Auto"):
  6. xpos 380
  7. ypos 250
  8. action FilePage("auto")
  9. textbutton _("Quick"):
  10. xpos 380
  11. ypos 280
  12. action FilePage("quick")
  13. textbutton _("Normal"):
  14. xpos 380
  15. ypos 310
  16. action FilePage(1)
  17.  
  18. side "c b r":
  19.  
  20. area (10, 10, 320, 700)
  21.  
  22. viewport id "vp":
  23.  
  24. draggable True
  25. mousewheel True
  26.  
  27. vbox:
  28. spacing 10
  29. yminimum 2400
  30.  
  31. if renpy.get_screen("save"):
  32. for i in range(1, 16):
  33.  
  34. # Each file slot is a button.
  35. button:
  36. xmargin 8
  37. action FileAction(i)
  38. area (0, 0, 300, 150)
  39. style "customFilePicker_button"
  40.  
  41. unhovered SetScreenVariable("screenshot_image", None)
  42.  
  43. hovered SetScreenVariable("screenshot_image", FileScreenshot(i))
  44.  
  45. $ file_name = FileSlotName(i, 15)
  46. $ file_time = FileTime(i, empty=_("Empty Slot."))
  47. $ save_name = FileSaveName(i)
  48.  
  49. text "[file_name]. [file_time!t]\n[save_name!t]" xalign 0.5 yalign 0.5
  50.  
  51. if FileLoadable(i):
  52. textbutton _("Del"):
  53. action FileDelete(i)
  54. xalign 1.0
  55. yalign 1.0
  56.  
  57. elif renpy.get_screen("load"):
  58. for i in range(1, 16):
  59. if FileLoadable(i): # This condition makes sure that only filled slots are displayed
  60.  
  61. # Each file slot is a button.
  62. button:
  63. xmargin 8
  64. action FileAction(i)
  65. area (0, 0, 300, 150)
  66. style "customFilePicker_button"
  67.  
  68. unhovered SetScreenVariable("screenshot_image", None)
  69.  
  70. hovered SetScreenVariable("screenshot_image", FileScreenshot(i))
  71.  
  72. $ file_name = FileSlotName(i, 15)
  73. $ file_time = FileTime(i, empty=_("Empty Slot."))
  74. $ save_name = FileSaveName(i)
  75.  
  76. text "[file_name]. [file_time!t]\n[save_name!t]" xalign 0.5 yalign 0.5
  77.  
  78. if FileLoadable(i):
  79. textbutton _("Del"):
  80. action FileDelete(i)
  81. xalign 1.0
  82. yalign 1.0
  83.  
  84. else:
  85. null height 0
  86.  
  87. bar value XScrollValue("vp") style "customFilePicker_scrollbar"
  88. vbar value YScrollValue("vp") style "customFilePicker_vscrollbar"
  89.  
  90. if screenshot_image is not None:
  91. add screenshot_image xpos 900 ypos 25
  92.  
  93. init 1 python:
  94.  
  95. config.thumbnail_height = 180
  96. config.thumbnail_width = 320
  97.  
  98. #style.customFilePicker_button.background = "#00000000" #If you uncomment this line, the buttons will become transparent
  99. style.customFilePicker_vscrollbar.unscrollable = "hide"
  100. style.customFilePicker_scrollbar.unscrollable = "hide"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement