Alex wrote: ↑Sat May 18, 2019 6:39 pm
For buttons and hotspots one can set the mouse property -
https://www.renpy.org/doc/html/style_pr ... erty-mouse
This will change mouse pointer while it hovers over this button/hotspot. To make it work you need to specify all the neccessary pointers, like
Code: Select all
define config.mouse{"default" :("cursor-point.png", 0, 0), "hand":("cursor-hand.png", 0, 0), "thumb":("cursor-thumb.png", 0, 0)}
This throws a number of errors:
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 39: expected '=' not found.
define config.mouse{"default" :("cursor-point.png", 0, 0), "pinch":("cursor-hand.png", 0, 0), "ungrab":("cursor-thumb.png", 0, 0)}
^
Ren'Py Version: Ren'Py 7.1.3.1092
Mon May 20 02:12:13 2019
And if I change it to define config.mouse = ...(etc)... I get:
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00start.rpy", line 198, in script call
call _gl_test
File "renpy/common/00gltest.rpy", line 442, in script
$ __gl_test()
File "renpy/common/00gltest.rpy", line 442, in <module>
$ __gl_test()
File "renpy/common/00gltest.rpy", line 359, in _m1_00gltest__gl_test
_gl_performance_test()
File "renpy/common/00gltest.rpy", line 384, in _gl_performance_test
ui.interact(suppress_underlay=True, suppress_overlay=True)
ValueError: too many values to unpack
Finally, when it's correct, how do I invoke the change when using this way?
To run python function in a screen you should use Function action -
https://www.renpy.org/doc/html/screen_a ... l#Function
As for resizing images - it is better to make them apropriate size in a photoshop-like program, so there won't be an issue with hotspots.
(Not tested, but you could try to resize the whole imagemap with all the hotspots, not the individual images used for it)
I don't understand at all how I could use Function to achieve this. I'm going to try around things to see if I can figure it out, but it's far from clear.
----
Finally I figured out what I was doing wrong with hotspots. I thought it was (x, y, x2, y2) but it's (x, y, width, height).