This feature is there to support the easy creation of image sets, so you can switch between them at runtime.
... and the overwrite is to assure, that this is reliable, even if you recapture the image.
It can be best used together with import of .sikuli, that each represent image sets for different situations.
So the variable/variable.png always represents the same visual item named with the variable name.
So in your code, there is no need to do things like that:
if not "10.11" in Settings.getOSVersion():
Menu = Menu.png
else:
Menu = Menu1011.png
at every place needed.
The intention is that you once at the beginning of script evaluate the environment and setup a suitable image path and then just use the images either by using the variable or the image name.
If you do not want to switch to image sets this way, then in your case you have to do it this way:
Somewhere at the beginning:
Menu = Menu.png
Menu1011 = Menu1011.png
... and later
if "10.11" in Settings.getOSVersion():
Menu = Menu1011
This feature is there to support the easy creation of image sets, so you can switch between them at runtime.
... and the overwrite is to assure, that this is reliable, even if you recapture the image.
It can be best used together with import of .sikuli, that each represent image sets for different situations.
So the variable/ variable. png always represents the same visual item named with the variable name.
So in your code, there is no need to do things like that:
if not "10.11" in Settings. getOSVersion( ):
Menu = Menu.png
else:
Menu = Menu1011.png
at every place needed.
The intention is that you once at the beginning of script evaluate the environment and setup a suitable image path and then just use the images either by using the variable or the image name.
If you do not want to switch to image sets this way, then in your case you have to do it this way:
Somewhere at the beginning:
Menu = Menu.png
Menu1011 = Menu1011.png
... and later getOSVersion( ):
if "10.11" in Settings.
Menu = Menu1011
... so I will not change this feature.