In the default code for the default navigation menu I've added this line :
Code: Select all
screen navigation():
vbox:
style_prefix "navigation"
BLABLABLA
textbutton _("Langage") action ShowMenu("langage") # Here, the added line.
Code: Select all
screen langage():
tag menu
if renpy.mobile:
$ cols = 2
else:
$ cols = 4
use game_menu(_("Langage"), scroll="viewport"):
imagemap:
ground "0-0_Langage_menu"
hover "0-0_Langage_menu_hover"
hotspot (32, 218, 418, 268) clicked NullAction
hotspot (474, 216, 416, 270) clicked NullAction
hotspot (918, 214, 412, 266) clicked NullAction
hotspot (34, 498, 410, 268) clicked NullAction
hotspot (474, 498, 418, 268) clicked NullAction
hotspot (912, 500, 414, 264) clicked NullAction
https://ibb.co/is6V0G => When the american flag is hovered by the mouse
https://ibb.co/midzub => When the french flag is hovered by the mouse
https://ibb.co/iR8A0G => When the chinese flag is hovered by the mouse
Now the problem I have is about the action which follow a click.
I want the following action when the American flag is cliked :
$ langage_english = True
$ langage_french = False
I want the following action when the French flag is cliked :
$ langage_english = False
$ langage_french = True
I don't want any action when an other flag is cliked.
But for now i didn't find a way to make it working properly.
2nd problem (minor) :
Moreover, this code is in my "screen" file window (not in script), so the game had not started yet and variables which are initiated in the begining of the 'script' file
I think i could remedy that by only displaying the "langage" button in the navigation menu when the game as been lunch (when accessing the navigation screen menu by hiting 'esc' key during the game.
Anyway, thank you in advance for your help