[ZScript] Tooltips 0.3.3.0

Post your example zscripts/ACS scripts/etc here.

[ZScript] Tooltips 0.3.3.0

Postby Nero » Wed May 06, 2020 6:37 pm



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:

    Tooltips v0.3.3.0
    An Over-engineered Solution to a Problem No One Has

So What is It?
    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.

Featuring Such Awesome Features As:
  • 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

Does it work with Chex Quest?!
    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!

But, Nero, I like hanging out in menus in multiplayer...
    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.0
Tooltips is also available on Github: Tooltips Repo

Old Versions Not Worth Using:
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:
  • 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.

If you are a modder looking to incorporate Tooltips into your project:
You have 2 options, that mean 2 different things, and which choice you make is entirely dependent on the mod you are making:
  1. 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"

  2. 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"

Spoiler: "Tooltips Class and Function Information"


Updates, Bugs, and Feature Requests
  • 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"
  • 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.

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! :D

Spoiler: "Credits & License"
Last edited by Nero on Sun Aug 09, 2020 1:30 pm, edited 3 times in total.
User avatar
Nero
Royal Boredom....Why can't I do this in Windows?
 
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.

Re: [ZScript] Tooltips 0.3.2.1

Postby Jekyll Grim Payne » Thu Jun 11, 2020 11:42 am

Awesome work! Would you mind it if I incoroporated it into Beautiful Doom?

Also, how can I create a linebreak inside a tooltip text? Is it only possible by using the LANGUAGE lump?
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: [ZScript] Tooltips 0.3.2.1

Postby Nero » Sun Jun 14, 2020 11:26 am

Hey thanks JGP! And absolutely yes you can incorporate Tooltips into Beautiful Doom!

Uh, do refer to the OP section for modders though - the decision to either incorporate or become dependent on Tooltips is all about what kind of mod Beautiful Doom is. Let me know if I can help at all.

Also, LANGUAGE is just there to make Tooltips multi-lingual. I could release French, German, etc., translations for the menu, and include them in just one file. The engine will pick up the system language and use the correct translations if they are present. It defaults to English; also that's all that's there right now.

For a linebreak, put a \n where you want the line broken off at. It shouldn't matter if the tooltip is defined in the MENUDEF or a LANGUAGE lump, it should obey the linebreak. Let me know if it's not.

Edit - So apparently it does matter where the tooltip string is defined. I made the jump to a LANGUAGE file pretty fast when building Tooltips so I did not catch this bug; currently no solution other than define strings in a LANGUAGE file if you want to use special characters. This is odd, I suspect localization is prepping the string for the text drawer while simply defining the tooltip string in the MENUDEF does not. What preparation needs done? I don't know without seeing it in a debugger.
User avatar
Nero
Royal Boredom....Why can't I do this in Windows?
 
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.

Re: [ZScript] Tooltips 0.3.2.1

Postby Jekyll Grim Payne » Mon Jun 29, 2020 2:28 am

Thanks! I did eventually figure out the linebreak thing. I also read the section for modders in detail. Tool tips work very well with Beautiful Doom since it has a rather extensive options menu. If you're interested to see how it works, feel free to check it out here: https://github.com/jekyllgrim/Beautiful-Doom (you can either download the latest release or the repository itself with Clone or Download > Download ZIP).
User avatar
Jekyll Grim Payne
 
Joined: 21 Jul 2008
Discord: Agent_Ash#4401
Github ID: jekyllgrim
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: [ZScript] Tooltips 0.3.3.0

Postby Nero » Sun Aug 09, 2020 1:36 pm

Tooltips Updates to v0.3.3.0

Out of my own necessity I've updated Tooltips to support Menu Commands. My original intention was to eliminate the CVar dependence for things like debugging toggles, however feature expansion has made that dependency optional now. The idea is to move to net events. At the core, Tooltips just adds itself to the Command class so there can be tooltips when you highlight one, but I took it a step further: I added functionality from the Option class.

Tooltip Commands may also display a value indicator next to the command label. This works like an Option, for example if the Command is a toggle, you can supply a value like "OnOff". For this to work, there still has to be a CVar that is getting changed by some piece of code somewhere, so this is implementation controlled.
User avatar
Nero
Royal Boredom....Why can't I do this in Windows?
 
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.


Return to Script Library

Who is online

Users browsing this forum: IdiotBitz and 0 guests