![]() In this case, we only have one screen (the confirmation dialogue itself) and attach transforms directly to text elements within it. This is definitely not ideal, but it does work. Instead, I kind of hacked around the problem, using simple text elements that are rendered (or not) based on the state, and attaching ATL effects to them. While this does indeed show the screen, it also strangely results in the screen being shown twice: Once next to the buttons as expected, but again in the top left corner of the screen on hover. I tried a few different things for this… the most naive approach was to copy the above approach, and use the “ use confirm_tooltip” to include the screen next to the buttons. ![]() What happens now when we’re dealing with a modal screen (like the confirmation dialogue) that isn’t always located at a consistent place on the screen? We can’t exactly place the text at a certain x/y coordinate and expect it to look right all the time. In particular, the location of the tooltip screen’s text was hardcoded to be placed next to the menu buttons. So this is all well and good… but notice that we’ve had to hardcode the position of everything above. Hovered Show("mm_tooltip",ttcontent="Quit") Hovered Show("mm_tooltip",ttcontent="Preferences") Imagebutton auto "gui/menu/prefs_%s.png": Hovered Show("mm_tooltip",ttcontent="About") Imagebutton auto "gui/menu/about_%s.png": Hovered Show("mm_tooltip",ttcontent="Load") Hovered Show("mm_tooltip",ttcontent="Save") Hovered Show("mm_tooltip",ttcontent="History")Īction Imagebutton auto "gui/menu/history_%s.png": Hovered Show("mm_tooltip",ttcontent="Main Menu") Hovered Show("mm_tooltip",ttcontent="Return") Imagebutton auto "gui/menu/return_%s.png": (I’ve also added ATL effects, not shown above, to the buttons themselves so they fade in and out, in addition to the tooltip text.) screen game_navigation(): You can lay them out however you want, but the important part is the “ Show” action for their hover attributes. Next are the actual menu items themselves. Transform mm_tooltip_show(delaytimer=0.0, duration=0.25): Xanchor 1.0 yanchor 1.0 ypos 1035 xsize 300 ysize 100 In this case, the tooltip fades in as it moves leftward out of the buttons, and fades out as it moves rightward back into the buttons. I believe this is also the more “traditional” way of doing tooltips.įirst thing’s first: We’ll need to define a screen to hold the tooltip text and a transform to show and hide it. ![]() You can even apply AT effects to the tooltip to make it fade out or whatever. This is fairly straightforward to do in the quick menu/game menu case, where the location of the tooltip is fixed. Part of the GUI work I did for Xenopathy was converting traditional buttons (in the quick menu, game menus, and confirmation screen, for example) into images, with hover tooltips that provide an explanation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |