Merge pull request 'Makes the skip button actually work, refactors the drawing screen, adds the ability to hide the Drawing UI, scales down the buttons on PC' (#5) from GManon/IWaniHugThatGator-Demo-Public:DrawNega into master
Reviewed-on: #5
This commit is contained in:
@ -21,6 +21,7 @@ init -10 python in draw_logic:
|
|||||||
ERASER_STATE = False
|
ERASER_STATE = False
|
||||||
PENCOLOR = "#0f0f0d"
|
PENCOLOR = "#0f0f0d"
|
||||||
PAPER = "#ede6e6"
|
PAPER = "#ede6e6"
|
||||||
|
SHOWING_UI = True
|
||||||
|
|
||||||
VERSION = (1, 1, 3)
|
VERSION = (1, 1, 3)
|
||||||
|
|
||||||
@ -370,7 +371,7 @@ init -10 python in draw_logic:
|
|||||||
if notify:
|
if notify:
|
||||||
rq |= ActionRequest.NOTIFY
|
rq |= ActionRequest.NOTIFY
|
||||||
|
|
||||||
renpy.persistent.drawn = 1
|
renpy.store.persistent.drawn = 1
|
||||||
self.__action_request = rq
|
self.__action_request = rq
|
||||||
renpy.redraw(self, .0)
|
renpy.redraw(self, .0)
|
||||||
|
|
||||||
@ -503,8 +504,9 @@ init 150 python in draw_logic:
|
|||||||
del(_circle)
|
del(_circle)
|
||||||
|
|
||||||
|
|
||||||
transform tf_draw_moveindown(p=0.0):
|
transform tf_draw_moveindown(p=0.0, scale=0.8):
|
||||||
subpixel True alpha 0.0
|
subpixel True alpha 0.0
|
||||||
|
zoom scale
|
||||||
pause p
|
pause p
|
||||||
ypos -50
|
ypos -50
|
||||||
parallel:
|
parallel:
|
||||||
@ -512,8 +514,19 @@ transform tf_draw_moveindown(p=0.0):
|
|||||||
parallel:
|
parallel:
|
||||||
linear 0.25 alpha 1
|
linear 0.25 alpha 1
|
||||||
|
|
||||||
transform tf_draw_moveinright(p=0.0):
|
transform tf_draw_moveoutup(p=0.0, scale=0.8):
|
||||||
|
subpixel True alpha 1
|
||||||
|
zoom scale
|
||||||
|
pause p
|
||||||
|
ypos 0
|
||||||
|
parallel:
|
||||||
|
easeout_back 0.5 ypos -50
|
||||||
|
parallel:
|
||||||
|
linear 0.5 alpha 0.0
|
||||||
|
|
||||||
|
transform tf_draw_moveinright(p=0.0, scale=0.8):
|
||||||
subpixel True alpha 0.0
|
subpixel True alpha 0.0
|
||||||
|
zoom scale
|
||||||
pause p
|
pause p
|
||||||
xpos -50
|
xpos -50
|
||||||
parallel:
|
parallel:
|
||||||
@ -521,11 +534,21 @@ transform tf_draw_moveinright(p=0.0):
|
|||||||
parallel:
|
parallel:
|
||||||
linear 0.25 alpha 1
|
linear 0.25 alpha 1
|
||||||
|
|
||||||
transform tf_draw_fadetext:
|
transform tf_draw_moveoutleft(p=0.0, scale=0.8):
|
||||||
|
subpixel True alpha 1.0
|
||||||
|
zoom scale
|
||||||
|
pause p
|
||||||
|
xpos 0
|
||||||
|
parallel:
|
||||||
|
easeout_back 0.5 xpos -50
|
||||||
|
parallel:
|
||||||
|
linear 0.5 alpha 0
|
||||||
|
|
||||||
|
transform tf_draw_fadetext(p=0):
|
||||||
xalign 0.5 yalign 0.1
|
xalign 0.5 yalign 0.1
|
||||||
alpha 0.0
|
alpha 0.0
|
||||||
|
|
||||||
pause 0.5
|
pause 0.5+p
|
||||||
linear 0.5 alpha 1.0
|
linear 0.5 alpha 1.0
|
||||||
pause 3
|
pause 3
|
||||||
linear 0.5 alpha 0.0
|
linear 0.5 alpha 0.0
|
||||||
@ -533,6 +556,8 @@ transform tf_draw_fadetext:
|
|||||||
screen _draw_screen(draw_object):
|
screen _draw_screen(draw_object):
|
||||||
modal True
|
modal True
|
||||||
|
|
||||||
|
key "h" action SetVariable("draw_logic.SHOWING_UI", not draw_logic.SHOWING_UI)
|
||||||
|
|
||||||
fixed:
|
fixed:
|
||||||
xfill True
|
xfill True
|
||||||
yfill True
|
yfill True
|
||||||
@ -546,27 +571,9 @@ screen _draw_screen(draw_object):
|
|||||||
ypos 10
|
ypos 10
|
||||||
xpos 10
|
xpos 10
|
||||||
spacing 15
|
spacing 15
|
||||||
imagebutton at tf_draw_moveindown(0.0):
|
|
||||||
idle "gui/button/drawing/drawbutton_idle.png"
|
|
||||||
hover "gui/button/drawing/drawbutton_idle.png"
|
|
||||||
selected_idle "gui/button/drawing/drawbutton_pressed.png"
|
|
||||||
selected_hover "gui/button/drawing/drawbutton_pressed.png"
|
|
||||||
activate_sound "audio/ui/snd_ui_click.wav"
|
|
||||||
action SetVariable("draw_logic.ERASER_STATE", False)
|
|
||||||
imagebutton at tf_draw_moveindown(0.2):
|
|
||||||
idle "gui/button/drawing/drawbutton_idle.png"
|
|
||||||
hover "gui/button/drawing/drawbutton_idle.png"
|
|
||||||
selected_idle "gui/button/drawing/drawbutton_pressed.png"
|
|
||||||
selected_hover "gui/button/drawing/drawbutton_pressed.png"
|
|
||||||
activate_sound "audio/ui/snd_ui_click.wav"
|
|
||||||
action SetVariable("draw_logic.ERASER_STATE", True)
|
|
||||||
|
|
||||||
hbox:
|
use draw_tool_button("gui/button/drawing/pencil.png",False,draw_logic.SHOWING_UI,0.0)
|
||||||
ypos 10
|
use draw_tool_button("gui/button/drawing/eraser.png",True,draw_logic.SHOWING_UI,0.2)
|
||||||
xpos 10
|
|
||||||
spacing 15
|
|
||||||
add "gui/button/drawing/pencil.png" at tf_draw_moveindown(0.0)
|
|
||||||
add "gui/button/drawing/eraser.png" at tf_draw_moveindown(0.2)
|
|
||||||
|
|
||||||
# frame:
|
# frame:
|
||||||
# style "tooltip_frame"
|
# style "tooltip_frame"
|
||||||
@ -574,21 +581,19 @@ screen _draw_screen(draw_object):
|
|||||||
vbox:
|
vbox:
|
||||||
yalign 1.0
|
yalign 1.0
|
||||||
xalign 0.0
|
xalign 0.0
|
||||||
if persistent.drawn == 1:
|
|
||||||
use draw_menu_buttons("gui/button/menubuttons/menu_button.png",
|
|
||||||
[
|
use draw_menu_buttons("gui/button/menubuttons/menu_button.png", draw_logic.SHOWING_UI,
|
||||||
[ _("Skip"), Function(draw_object.skip), 0.0],
|
[
|
||||||
[ _("Undo"), Function(draw_object.back), 0.1],
|
[ _("Skip"), Function(draw_object.skip), 0.0, persistent.drawn == 1],
|
||||||
[ _("Clear All"), Function(draw_object.clear_all), 0.2],
|
[ _("Undo"), Function(draw_object.back), 0.1, True],
|
||||||
[ _("Done"), Function(draw_object.save, False), 0.3]
|
[ _("Clear All"), Function(draw_object.clear_all), 0.2, True],
|
||||||
] )
|
[ _("Done"), Function(draw_object.save, False), 0.3, True]
|
||||||
else:
|
] )
|
||||||
use draw_menu_buttons("gui/button/menubuttons/menu_button.png",
|
|
||||||
[
|
if renpy.android:
|
||||||
[ _("Undo"), Function(draw_object.back), 0.0],
|
use draw_menu_button("gui/button/menubuttons/menu_button.png",_("Toggle UI"), SetVariable("draw_logic.SHOWING_UI", not draw_logic.SHOWING_UI), 0.4, True)
|
||||||
[ _("Clear All"), Function(draw_object.clear_all), 0.1],
|
|
||||||
[ _("Done"), Function(draw_object.save, False), 0.2] #Dissolve(1.0)
|
|
||||||
] )
|
|
||||||
|
|
||||||
#if draw_object.reference:
|
#if draw_object.reference:
|
||||||
# textbutton (_("Hide reference") if draw_object.reference_switcher else _("Show reference")):
|
# textbutton (_("Hide reference") if draw_object.reference_switcher else _("Show reference")):
|
||||||
@ -600,17 +605,56 @@ screen _draw_screen(draw_object):
|
|||||||
else:
|
else:
|
||||||
text _("Use left click to draw.") at tf_draw_fadetext:
|
text _("Use left click to draw.") at tf_draw_fadetext:
|
||||||
color "#000000"
|
color "#000000"
|
||||||
|
text _("Press 'H' to hide the drawing UI.") at tf_draw_fadetext(4):
|
||||||
|
color "#000000"
|
||||||
|
|
||||||
|
|
||||||
|
screen draw_tool_button(icon,is_eraser,showing, delay):
|
||||||
|
|
||||||
screen draw_menu_buttons(filename, label_functions):
|
if renpy.android:
|
||||||
|
$ scale = 1.0
|
||||||
|
else:
|
||||||
|
$ scale = 0.8
|
||||||
|
|
||||||
|
if showing:
|
||||||
|
$ animation = tf_draw_moveindown(delay,scale)
|
||||||
|
else:
|
||||||
|
$ animation = tf_draw_moveoutup(delay,scale)
|
||||||
|
|
||||||
|
# I can't believe there's not a less hacky way to stack images in renpy
|
||||||
|
vbox:
|
||||||
|
spacing -1000
|
||||||
|
imagebutton at animation:
|
||||||
|
sensitive showing
|
||||||
|
idle "gui/button/drawing/drawbutton_idle.png"
|
||||||
|
hover "gui/button/drawing/drawbutton_idle.png"
|
||||||
|
selected_idle "gui/button/drawing/drawbutton_pressed.png"
|
||||||
|
selected_hover "gui/button/drawing/drawbutton_pressed.png"
|
||||||
|
activate_sound "audio/ui/snd_ui_click.wav"
|
||||||
|
action SetVariable("draw_logic.ERASER_STATE", is_eraser)
|
||||||
|
add icon at animation
|
||||||
|
|
||||||
|
|
||||||
|
screen draw_menu_buttons(filename, showing, label_functions):
|
||||||
for l_f in label_functions:
|
for l_f in label_functions:
|
||||||
use draw_menu_button(filename, l_f[0], l_f[1], l_f[2])
|
if l_f[3]:
|
||||||
|
use draw_menu_button(filename, l_f[0], l_f[1], l_f[2], showing)
|
||||||
|
|
||||||
|
|
||||||
|
screen draw_menu_button(filename, label, function, delay, showing):
|
||||||
|
|
||||||
screen draw_menu_button(filename, label, function, delay):
|
if renpy.android:
|
||||||
button at tf_draw_moveinright(delay):
|
$ scale = 1.0
|
||||||
|
else:
|
||||||
|
$ scale = 0.8
|
||||||
|
|
||||||
|
if showing:
|
||||||
|
$ animation = tf_draw_moveinright(delay,scale)
|
||||||
|
else:
|
||||||
|
$ animation = tf_draw_moveoutleft(delay,scale)
|
||||||
|
|
||||||
|
button at animation:
|
||||||
|
sensitive showing
|
||||||
xmaximum 250
|
xmaximum 250
|
||||||
ymaximum 100
|
ymaximum 100
|
||||||
action function
|
action function
|
||||||
@ -622,6 +666,7 @@ screen draw_menu_button(filename, label, function, delay):
|
|||||||
add filename xalign 0.5 yalign 0.5 zoom 0.8 xanchor 0 xcenter 0.5 ycenter 0.5
|
add filename xalign 0.5 yalign 0.5 zoom 0.8 xanchor 0 xcenter 0.5 ycenter 0.5
|
||||||
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 30
|
text label xalign 0.5 yalign 0.5 xanchor 0.5 size 30
|
||||||
|
|
||||||
|
|
||||||
#change this for better bg, for some reason renpy cannot take a defined image here, only a file path wtf
|
#change this for better bg, for some reason renpy cannot take a defined image here, only a file path wtf
|
||||||
#style draw_menu_frame is default:
|
#style draw_menu_frame is default:
|
||||||
# background "gui/main_menu.png"
|
# background "gui/main_menu.png"
|
||||||
|
@ -34,3 +34,15 @@ translate es strings:
|
|||||||
old "Use left click to draw."
|
old "Use left click to draw."
|
||||||
new "Usa el click izquierdo para dibujar."
|
new "Usa el click izquierdo para dibujar."
|
||||||
|
|
||||||
|
# TODO: Translation updated at 2023-05-27 00:45
|
||||||
|
|
||||||
|
translate es strings:
|
||||||
|
|
||||||
|
# game/src/draw.rpy:595
|
||||||
|
old "Toggle UI"
|
||||||
|
new "Alternar IU"
|
||||||
|
|
||||||
|
# game/src/draw.rpy:608
|
||||||
|
old "Press 'H' to hide the drawing UI."
|
||||||
|
new "Pulse 'H' para ocultar la interfaz de dibujo."
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user