Hey everyone! I have a question on how to do this. I'm trying to replicate the GUI of a video game, namely Danganronpa 2. Everything looks good in a screenshot, but I just have a small question with the polish.
Whenever the namebox (vertically on the left) is updated to a new name, I want it to move offscreen to the left and update, before returning to it's original position. Anyone have any advice for this? Looking for code specifically.
Thank you!
Move Namebox Offscreen Before Updating Name
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
I_Am_Boredom
- Newbie
- Posts: 7
- Joined: Thu Oct 29, 2020 6:29 pm
- Projects: Danganronpa Fangame (WIP)
- IRC Nick: I_Am_Boredom
- Contact:
Re: Move Namebox Offscreen Before Updating Name
Hi, I_Am_Boredom,
You can try something like this, although it is a perfect way to do it.
PS: xpos values should be changed (0-> -50) (200 -> 0) to move it offscreen and back to the left side.
You can try something like this, although it is a perfect way to do it.
Code: Select all
default namebox_text = "Check - 1"
screen tt(val):
if namebox_text != val:
default update = True
else:
default update = False
if update:
$ update = False
timer 1.0 action SetVariable('namebox_text', val)
frame:
text namebox_text
at tr
transform tr:
rotate 90
on show:
xpos 200
linear 1.0 xpos 0
linear 1.0 xpos 200
on replace:
xpos 200
linear 1.0 xpos 0
linear 1.0 xpos 200
label start:
'Line - 1'
show screen tt('Check - 2')
'Line - 2'
show screen tt('Check - 3')
Re: Move Namebox Offscreen Before Updating Name
This thread might help you so you don't have to show a screen on every name change! viewtopic.php?f=8&t=60059&p=534036#p534036
What I would do also is use a transform that starts with it offscreen that slides/fades in ^^
What I would do also is use a transform that starts with it offscreen that slides/fades in ^^
Who is online
Users browsing this forum: No registered users