Ceres Posted September 9, 2021 Report Share Posted September 9, 2021 (edited) @Stan`@Angen@Freagarach@maroder Do you have a hint for me how hover actions are coded? Is this C++ or JS? Where would I find some (example) code? Thank you! I ask because of patch D4252, where we agree that the additional explanatory text won't fit behind the "Enabled mods" text anymore, so that it would need to be a hover-over tooltip. Edited September 9, 2021 by Ceres Quote Link to comment Share on other sites More sharing options...
maroder Posted September 9, 2021 Report Share Posted September 9, 2021 To give you some starting information: The tooltips are defined in public/gui/common/setup.xml and you can use them in the xml files, which define the layout of the mod page like this (i.e. tooltip_style): <object type="button" style="MenuButton" tooltip_style="AwesomeToolTip"/> 1 Quote Link to comment Share on other sites More sharing options...
bb_ Posted September 9, 2021 Report Share Posted September 9, 2021 5 hours ago, Ceres said: Is this C++ or JS? Neither you can do it all by editing the xml file you already found. 5 hours ago, Ceres said: Where would I find some (example) code? I guess: search your favorite tooltip in game and look how it is done there (hint: the mod up and mod down buttons on the right hand side of the modselection panel seem like a good candidate) 1 Quote Link to comment Share on other sites More sharing options...
Ceres Posted September 10, 2021 Author Report Share Posted September 10, 2021 (edited) @bb_@Stan` I would like to understand the meaning of this: <object size="16 62% 100%-15 100%-84"> I'm on IRC (as Ceres). Is that the right place to ask or rather here in the forum? PS: @bb_ Thanks for your kind help over there! For other interested people: left top position is (16, 62%): object is 16 pixels to the right (absolute) object is at 62% of the height (relative) right bottom is (100%-15, 100%-84): right hand side of object is 15 pixels from right of parent object bottom of object is 84 pixels from bottom of the parent object Note that sizes are relative to parent object's size. Hopefully, I summarised this correctly. I will play around with different numbers to better understand this. Edited September 11, 2021 by Ceres changed "top left" to "left top" and "bottom right" to "right bottom" Quote Link to comment Share on other sites More sharing options...
Ceres Posted September 14, 2021 Author Report Share Posted September 14, 2021 (edited) I have created a tooltip for 'Enabled Mods': https://code.wildfiregames.com/D4252?id=18662 Please let me know what you think about it. As I'm still at the very beginning of understanding stuff, this very likely needs further amendments, but I'm happy to learn. Edited September 14, 2021 by Ceres Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.