Spoiler:Tooltips is no longer available on the ZDoom Forum. Thank you.
The mod that got its start as a tweak of m8f's Tips for Menus is now the solution to the problem you didn't know you had!
Are you tired of sorting through endless option menus just to tweak one tiny mod setting among a load order sea
only to wonder what some of these settings even do? Are you a modder making something technical that has
an options menu that you'd like to explain to players in greater detail? Well my friends allow me to introduce:
So What is It?
- Tooltips v0.3.3.1
An Over-engineered Solution to a Problem No One HasFeaturing Such Awesome Features As:
- Tooltips is a resource mod for (G)ZDoom versions that support ZScript version 4.2.1 and higher.
This mod creates new menu and menu item classes which support the display of tooltips to
give details and further explain the purpose or function of a menu item. Tooltips takes this
a step further and offers extensive customization options to the end user, which when
combined with (G)ZDoom's localization capabilities, also offers significant increases in accessibility.Does it work with Chex Quest?!
- The ability to toggle the mod
- Display timing
- Draw order control
- Borders around the text box
- Control over the thickness of the border
- Control over the color and the alpha of the border
- Backgrounds for the textbox, and you can toggle it!
- Different background options based on the iWad
- Padding
- Margins
- Different location options for the text box, including the mouse!
- Text alignment
- Font control, including custom fonts
- Control over the font color on a menu item or global basis
But, Sarah, I like hanging out in menus in multiplayer...
- Did you watch the video? I didn't put up with the Chex Quest noise to record it for nothing!
Yeah it works with ALL of the commercial iWads! It works so well that Tooltips
will let you pick different backgrounds based on the iWad!
- Well, voice in my head, Tooltips "should" have you covered.
Uhm, please read the fine print below.
The Fine Print Below
- First, I don't have Hexen or Strife, so I'm guessing Tooltips works fine with them. If someone could test and let me know I'd appreciate it. Second I don't know a whole lot about multiplayer so I can't confirm Tooltips works in multiplayer. I'll fix it if I can but someone more knowledgeable of ZScript and multiplayer will have to tell me what needs fixed; assuming Tooltips doesn't work in multiplayer. Finally there's a known bug with border frames; the short and sweet is if you're using the default frames, everything is fine, if you define a custom frame in MAPINFO, Tooltips will be unable to ascertain the dimensions of your graphics and there will be some minor clipping until I can access the code that stores that info.
Enough Talk, Where's Mod?
The latest version is right here: Tooltips v0.3.3.1
Tooltips is also available on Github: Tooltips Repo
Old Versions Not Worth Using:
Tooltips v0.3.3.0
Tooltips v0.3.2.1
Tooltips v0.3.2
Tooltips v0.3.1
Tooltips v0.3
Tooltips v0.2
Tooltips v0.1
More Info for Players and Modders
If you are a player that was directed to this page from a mod citing Tooltips as a requirement:If you are a modder looking to incorporate Tooltips into your project:
- You are pretty much done. You should have downloaded a PK3 which contains Tooltips. Load it as you would any other mod. If you are using a mod manager, like ZDL, load order is not important.
You have 2 options, that mean 2 different things, and which choice you make is entirely dependent on the mod you are making:
- Incorporate - this is where you take all of the Tooltips files and put them in your mod. You build your menus using Tooltips classes. A player only has to download your mod for your menus to function.
- Why a Modder Would Incorporate Tooltips:
- You are making a TC (total conversion), such as Total Chaos, or a mod that should be run standalone and will only function correctly with mods made specifically for it.
Spoiler: Incorporation Tutorial
Refer to the Dependency Tutorial for basic usage of the classes in a MENUDEF. This tutorial is geared more toward other programmers.
Naming:
Ideally you should open each file and replace the TLTP prefix with your own, especially in the classes, however the class names are used as strings in the code. To do the renaming I recommend using a more robust Find and Replace function like that in Notepad++. This isn't 100% necessary, but ensures that your mod will not accidentally interact with another.
Files Handling:
In all reality, you don't have to merge Tooltips' files into your own. Tooltips uses the extension ".tltp" for its files, so you should be able to just drop the files into your mod and fix your ZScript inclusions. You are of course welcome to organize the files and code in whatever build structure works best for you. Tooltips does include it's own ZScript translation unit, so you will need to merge that file with your own.- Dependency - this is where you build your menus using Tooltips classes but do not build Tooltips into your mod. A player must download your mod and Tooltips for your menus to function.
- Why a Modder Would Make Their Mod Dependent on Tooltips:
- Your mod likely won't work with other mods changing the same thing, especially vanilla content, but can be loaded with other mods that may have their own menus.
Spoiler: Dependency Tutorial
This shows a barebones example of what your MENUDEF would contain in order to use the classes contained in Tooltips. In testing, you'll need to load Tooltips along with your mod, just as the end user would.
Don't worry about load order, if using a mod manager like ZDL. What's important is that the classes exist when needed.
Options Menus:List MenusCode: Select all
// This adds your menu to the Options Menu AddOptionMenu "OptionsMenu" { SubMenu "Your Tooltips Options Menu", "YourTooltipsOptionsMenu" } OptionMenu "YourTooltipsOptionsMenu" { // Inform the engine that this menu is a Tooltips Options Menu Class "TLTPOptionsMenu" Title "Your Awesome Options Menu that has Tooltips!!!" Position -32 StaticText "" StaticText "Menu Section Heading", "White" TLTPOption "Your Option Label with a Tooltip", "Hey I'm the Option's Tooltip", "White", "cvarForOption", "Options" TLTPSlider "Your Slider Label with a Tooltip", "Oh yeah, well I'm a slider Tooltip", "White", "cvarForSlider", 1, 10, 1, 0 }
Code: Select all
ListMenu "TooltipListTest" { Class "TLTPListMenu" TLTPTextItem "I'm a Tooltips List Menu Text Item!", "I'm the tooltip!", "White", t, "" }
Spoiler: Tooltips Class and Function InformationUpdates, Bugs, and Feature Requests
Supported Options Menu Items (Args are for reference, some are defaulted in code):Supported List Menu Items:
- Control (string label, string tooltip, name tipcolor, name command)
- MapControl (string label, string tooltip, name tipcolor, name command)
- Option (string label, string tooltip, name tipcolor, name command, name values, cvar graycheck, int center)
- Slider (string label, string tooltip, name tipcolor, name command, double min, double max, double step, int showval, cvar graycheck)
- ScaleSlider (string label, string tooltip, name tipcolor, name command, double min, double max, double step, string zero, string negone)
- TextField (string label, string tooltip, name tipcolor, name command, cvar graycheck)
- ColorPicker (string label, string tooltip, name tipcolor, name command)
- NumberField (string label, string tooltip, name tipcolor, name command, float minimum, float maximum, float step, cvar graycheck)
- SubMenu (string label, string tooltip, name tipcolor, name command, int param, bool centered)
Supported Commands
- TextItem (string text, string tooltip, name tipcolor, string hotkey, name child, int param)
- PatchItem(TextureID patch, string tooltip, name tipcolor, string hotkey, name child, int param)
A Note about Commands:
- Command(string label, string tooltip, name tipcolor, name command, name values, cvar valueswitch, bool centered, bool closeonselect)
A Tooltip Command introduces two new members to the class: the values and valueswitch arguments respectively. These function very similar to a Menu Option. Values may be used to indicate the current state of a command, for example you could supply "OnOff" if the command were a toggle. The CVar valueswitch is how the value indicator is changed; this is what the drawer will check to know what value to display. It is up to user implementation to change the CVar to whatever value corresponds to a particular indication value. The intention of this was to remove CVar dependency for such menu commands, but the added functionality brought the dependency right back However, the indication value is in no way required and original Command functionality is preserved, just with the addition of tooltips.
Usage:
- Create your Option or List Menu using Tooltips Option or List Menu classes. (Refer to Incorporation or Dependency Tutorials)
- You can still use the ancestor classes of Tooltips Menu Items in Tooltips Menus. Tooltips ignores any Menu Item that is not a Tooltips Menu Item.
- Place the prefix "TLTP" in front of any supported Menu Item you want to be a Tooltips Menu Item, in a Tooltips Menu.
- The "tooltip" argument - This is the text that will be displayed as a tooltip. The string will obey special characters, like newline ( \n ), if the tooltip is defined in a LANGUAGE file.
- The "tipcolor" argument - This is a string which refers to CVar Message Color Names. You can input "white", "orange", etc., to define a default color for the text.
Lastly, I hope you like Tooltips as much as I enjoyed making it. I didn't plan on this at all but, hey, it was a fun project!
- Updates - there shouldn't be any functionality updates that would break anyone's menus. Updates should be under the hood at this point. The most likely thing is new features.
Spoiler: Changelog
- 13-05-2020 - 1 : Update to v0.3.1. Changed the tiling loops to do/while that appear to give more consistent results since they actually check if the next tile row/column would be beyond the clipping boundary. This fixes a bug caused by trying to calculate the number of tile rows/columns by dividing the boundary dimensions by the graphic dimensions and not handling fractional results. Should be more efficient as well, fewer loops at the cost of a bit more checking.
-- 13-05-2020 - 2 : Update to v0.3.2. Fixed how Tooltips gets the default cursor based on the iWad; this is now completely ZScript. This eliminates the KEYCONF and MENUDEF hackery that passed the cursor names to a CVar, so this version of Tooltips does not have a KEYCONF nor does it need one. Also, discovered that disabling the display timers caused a tooltip to display permanently, even when nothing was selected in a list menu; it also should have been occurring in option menus. Fixed as well, more or less an oversight in valid object detection. Location display bug on the first tick is still being a pain; I need to fiddle with the Ticker and Init. Lastly, sort of a new feature, the expanded valid object checking now allows regular menu items to be mixed in with Tooltips menu items. The menu does need to be a Tooltips menu; you can put Tooltips menu items in the Options Menu but the tooltips will not work.
-- 13-05-2020 - 3 : Update to v0.3.2.1. Location display bug is "fixed"; more like masked, but visually fixed. I need to see if a menu has any method that is called prior to either the first tick or the first draw call so I can initialize stuff. Really sucks that I can't declare and assign a class global outside a method, but maybe that's my C# talking. Basically this fix just puts in a draw delay to allow the Ticker method to update all of the variables before drawing anything, which makes the position glitch go away. So fixed but I don't like it.
-- 14-06-2020 : Updated OP Tutorial Info.
-- 09-08-2020 : Updated Tooltips to v0.3.3.0. Tooltips now supports the Menu Command with some added functionality.
-- 27-08-2022 : Updated Tooltips to v0.3.3.1. I'm awesome at updating my stuff two years later! Updated files to reflect my name change, ZScript file extension conventions, and finally added the gray out option for sliders. After 2 years, I'm taking the policy of if you haven't updated your copy of the engine and you're using Tooltips, then things might break now. UPDATE!
- Bugs - please report them! Be clear, be concise, have a video or a picture, and/or the mod or a demo handy.
- Feature Requests - think I forgot something that is essential to the Tooltips experience? Or something could be better? Or Tooltips would be the most awesome mod you've ever used in the entire world and you'll never ever use any other mod in the entire world because Tooltips is the absolute best, I mean come on man, it's got a Zombies mode for the N64 bro!....if it had this one feature that I just have to have? Then by all means, let me know and I'll see if it's something I think I can/want to do.
Spoiler: Credits & License
Don't say I don't give no credit
Clearly my own awesome talent on the guitar there in the video...
pfffft no, that's clearly the awesomeness that is Andrew Hulshult and his Doom II, Map 13 Remake for Brutal Doom.
Code: Select all
/* LICENSE * * Copyright Sarah Blackburn "Saicannasha/Sarah" (nightowlgraphicarts@gmail.com) 2022 * * This file is a part of ToolTips.pk3. * * ToolTips.pk3 is free software: you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * ToolTips.pk3 is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * ToolTips.pk3. If not, see <https://www.gnu.org/licenses/>. * * Tooltips is either directly or indirectly related to the following mods: * Any licenses governing their use also apply to Tooltips. * Tips <https://forum.zdoom.org/viewtopic.php?f=105&t=66539> * Nash's Gore Mod <https://forum.zdoom.org/viewtopic.php?f=46&t=62641#p1080654> * */ /* CREDITS * * m8f - Tips; the latest Tooltips has next to no relation to its ancestor, but old versions were a mod of Tips. * Nash - Nash Gore Menu; code base for 0.3 onward with heavy modification * Ivory Duke - Hovering Tooltip Menu; no real code relation but a foundation for drawing and mouse code * AFADoomer - general help with questions * */
All of my mods can be found on my GitHub.