[ZScript] Tips for menus

Post your example zscripts/ACS scripts/etc here.

Re: [ZScript] Tips for menus

Postby m8f » Thu Dec 24, 2020 12:30 pm

Can you PM me your mod so I can take a look at what's wrong?
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Other Linux 64-bit

Re: [ZScript] Tips for menus

Postby Enjay » Fri Mar 18, 2022 4:27 pm

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [ZScript] Tips for menus

Postby m8f » Sat Mar 19, 2022 12:01 am

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

Code: Select allExpand view
      double x = Screen.GetWidth() - MARGIN - lines.StringWidth(i) * CleanXFac_1;

to
Code: Select allExpand view
      double x = (Screen.GetWidth() - lines.StringWidth(i) * CleanXFac_1) / 2;
User avatar
m8f
dreamer
 
 
 
Joined: 29 Dec 2017
Location: Siberia (UTC+7)
Discord: m8f#0629
Github ID: mmaulwurff
Operating System: Other Linux 64-bit

Re: [ZScript] Tips for menus

Postby Enjay » Sat Mar 19, 2022 12:30 pm

Perfect! Thank you kindly. :)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Previous

Return to Script Library

Who is online

Users browsing this forum: DustedPandemonic and 2 guests