I make all in 4 sections:
1)Code
2)My explanation
3)Similiar from Renpy Cookbock
4)What i used from Renpy documentation
Here is code
Code: Select all
screen crime_scene:
add "bg_crime.png"
imagebutton:
auto "left_%s.png"
focus_mask "left_mask.png"
mouse 'closer'
action [Hide("crime_scene"),Show("left")]
imagebutton:
xpos 280
ypos 330
auto "pers1_%s.png"
mouse "talk"
focus_mask "pers1_mask.png"
action [Hide("crime_scene"),Call("pers1")]
screen left:
imagebutton:
idle "black.png"
action [Show("crime_scene"), Hide("left")]
text "Here like in previos room, but i didnt maked it" xalign 0.5 yalign 0.5
label pers1:
scene bg_crime
show pers1
"What do you want? I am busy."
hide pers1
call screen crime_scene
Code: Select all
define config.mouse = {"default":[ ("gui/cursor.png", 1, 1) ],
"closer":[ ("gui/cursor_closer.png", 20, 20) ],
"seek":[ ("gui/cursor_seek.png", 20, 20) ],
"talk":[ ("gui/cursor_talk.png", 20, 15) ]}
auto is used for automatic select images, it replaced %s with "idle" or "hover" or other
focus_mask is used for defining clickable area - for more accurate, than just with imagebutton. String after docus_mask is name of image, in which non-transparent places are sensitive. It is really usefull, if you get 2 objects, that cross each other.
mouse is used for changing mouse pointer. String after mouse define which you use, and pointer you can use you define with config.mouse.
Here is other similiar methods or code i found in cookboock
viewtopic.php?f=51&t=20541#p265137 - here is used imagebuttons as object you can take, but it is old
viewtopic.php?f=51&t=22565#p284753 - here imagebuttons explained way more better, then i can do
viewtopic.php?f=51&t=17933#p234782 - here is mouse, but not like i used it
viewtopic.php?f=8&t=37403#p404987 - same situation
And here are Renpy Documentation, that i used for my screen:
https://www.renpy.org/doc/html/screens. ... magebutton - about imagebutton and auto
https://www.renpy.org/doc/html/screen_a ... l?#actions - about Show, Hide and other screen actions
https://www.renpy.org/doc/html/config.h ... nfig.mouse - about config.mouse
https://www.renpy.org/doc/html/style_pr ... properties - about mouse and more focus_mask