So my project has an inventory menu, which uses the navigation menu. Both the navigation menu and the inventory menu use tooltips, which are working just fine individually, however displaying both menus at the same time is causing issues.
Basically, the tooltips for each menu have a box where they're supposed to appear, but when the two menus are displayed together, the tooltips for both menus show up in both boxes. I can gather that this happens because this code:
Code: Select all
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip]" xpos 736 ypos 548 size 17
Code: Select all
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip]"
$ tooltip2 = GetTooltip()
if tooltip2:
text "[tooltip]"
Basically, what I'm seeing is that I don't really understand the tooltip function well enough to figure it out at this point, haha.
Here's some screenshots to demonstrate the problem: (please ignore how horrible it looks; my game uses pixel art but I had to downsize the images for the forum)
This is one of the nav menu tooltips displayed by itself.
And one of the inventory menu tooltips with both menus open.
And here's the relevant code: ("phone_menu" is the nav menu.)
Code: Select all
screen inventory_menu:
tag menu
use phone_menu
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip]" xpos 736 ypos 548 size 17
imagebutton:
hover "gui/inv_osphone.png"
idle "gui/inv_osphone.png"
action NullAction()
xpos 733
ypos 283
tooltip "{b}Ospina's Phone{/b}\nA smartphone you can wear on your wrist. The screen \nis cracked and the battery is dead, so it’s pretty useless \nright now."
Code: Select all
screen phone_menu:
tag menu
$ tooltip = GetTooltip()
if tooltip:
text "[tooltip]" xpos 468 ypos 578 size 17
imagebutton:
auto "gui/phone_return_%s.png"
action SetVariable('qm_use', True), Return()
xpos 538
ypos 319
tooltip "Return to surviving."