[ZScript] Tips for menus

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [ZScript] Tips for menus

Post by m8f »

Can you PM me your mod so I can take a look at what's wrong?
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [ZScript] Tips for menus

Post by Enjay »

Sorry for the bumpage.

I'm trying to adjust this so that the tips appear in the centre-bottom of the screen (and centre justified) rather than being right-bottom aligned. However, my attempts have failed.

Is it possible? If so, can someone show me how?
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [ZScript] Tips for menus

Post by m8f »

In tp_tips.zs file, class tp_ListMenuNote, function Drawer, inside the for loop, change the line

Code: Select all

      double x = Screen.GetWidth() - MARGIN - lines.StringWidth(i) * CleanXFac_1;
to

Code: Select all

      double x = (Screen.GetWidth() - lines.StringWidth(i) * CleanXFac_1) / 2;
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [ZScript] Tips for menus

Post by Enjay »

Perfect! Thank you kindly. :)
User avatar
CherubCorps
Posts: 191
Joined: Fri Sep 11, 2020 8:09 pm
Location: United States
Contact:

Re: [ZScript] Tips for menus

Post by CherubCorps »

So when using two mods that utilize Tips for menus, GZdoom crashes, giving the message "Cvarinfo line X: cvar 'tip_show_notes' already exist". Is there a way to fix this?
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: [ZScript] Tips for menus

Post by m8f »

m8f wrote: Sun Dec 01, 2019 10:12 amHow to use:
- change tp_ prefix to your own;
One or both of the mods didn't do this.
User avatar
CherubCorps
Posts: 191
Joined: Fri Sep 11, 2020 8:09 pm
Location: United States
Contact:

Re: [ZScript] Tips for menus

Post by CherubCorps »

One or both of the mods didn't do this.
Ok. Cool. Fixed it. Thank you.
Post Reply

Return to “Script Library”