Raised This Month: $32 Target: $400
 8% 

menu.NoVoteButton = true; results in misaligned paginated menu controls


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dagothur
Member
Join Date: Dec 2014
Old 08-25-2019 , 11:29   menu.NoVoteButton = true; results in misaligned paginated menu controls
Reply With Quote #1

menu.NoVoteButton = true; results in misaligned paginated menu controls

Page #1


Page #2


Page #3


sm version
SourceMod Version Information:
SourceMod Version: 1.9.0.6281
SourcePawn Engine: 1.9.0.6281, jit-x86 (build 1.9.0.6281)
SourcePawn API: v1 = 4, v2 = 12
Compiled on: May 14 2019 16:03:05
Built from: https://github.com/alliedmodders/sou...commit/c5efe48
Build ID: 6281:c5efe48
http://www.sourcemod.net/
Attached Files
File Type: sp Get Plugin or Get Source (menu_test1.sp - 112 views - 1.5 KB)

Last edited by Dagothur; 08-28-2019 at 11:38. Reason: example updated to new syntax
Dagothur is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 08-26-2019 , 09:56   Re: SetMenuOptionFlags(menu, MENUFLAG_BUTTON_NOVOTE) results in misaligned menu
Reply With Quote #2

I don't understand what is wrong with this menu? Cosmetically it looks fine.
Halt is offline
Dagothur
Member
Join Date: Dec 2014
Old 08-26-2019 , 12:03   Re: SetMenuOptionFlags(menu, MENUFLAG_BUTTON_NOVOTE) results in misaligned menu
Reply With Quote #3

The menu is supposed to be:

8. Back
9. Next

both coloured in orange.

Like this one:

Dagothur is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 08-27-2019 , 12:03   Re: SetMenuOptionFlags(menu, MENUFLAG_BUTTON_NOVOTE) results in misaligned menu
Reply With Quote #4

Disclaimer we might not have enough to work with in order to solve it here.

1. You're using old syntax
2. You didn't even follow the wiki for writing this. Whats the point of using the old syntax and not using the SM wikis?

Not saying you're wrong or bashing you. But I recommend using the new pawn syntax. And if you stick to the old then follow the instructions on creating a menu.

https://wiki.alliedmods.net/Menu_API_(SourceMod)

Last edited by Halt; 08-27-2019 at 12:04.
Halt is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-27-2019 , 18:20   Re: SetMenuOptionFlags(menu, MENUFLAG_BUTTON_NOVOTE) results in misaligned menu
Reply With Quote #5

Votes usually don't have an Exit button, so Previous and Next get moved down.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-27-2019 at 18:21.
Powerlord is offline
Dagothur
Member
Join Date: Dec 2014
Old 08-27-2019 , 21:11   Re: SetMenuOptionFlags(menu, MENUFLAG_BUTTON_NOVOTE) results in misaligned menu
Reply With Quote #6

Quote:
Originally Posted by Halt View Post
Disclaimer we might not have enough to work with in order to solve it here.

1. You're using old syntax
2. You didn't even follow the wiki for writing this. Whats the point of using the old syntax and not using the SM wikis?

Not saying you're wrong or bashing you. But I recommend using the new pawn syntax. And if you stick to the old then follow the instructions on creating a menu.

https://wiki.alliedmods.net/Menu_API_(SourceMod)
I copied the code out of UMC and modified it slightly to compile in its own plugin, but yeah, fair enough, I'll keep these things in mind before posting next time.

Quote:
Originally Posted by Powerlord View Post
Votes usually don't have an Exit button, so Previous and Next get moved down.
Saving slots does make sense but I would expect the control to at least be coloured orange (the glance value of a gray 0. Next control feels misleading). This excerpt from Halt's link also suggests this behavior is not intended:

Quote:
"Next" is always drawn as the second navigation item, second from the last supported position. This will not be drawn if the menu only contains one page. If there are no further pages, the text will not be drawn on either style; if possible, the menu will be padded so spacing is consistent.

Valve Style position: 7
Radio Style position: 9
Dagothur is offline
Dagothur
Member
Join Date: Dec 2014
Old 08-28-2019 , 11:40   Re: SetMenuOptionFlags(menu, MENUFLAG_BUTTON_NOVOTE) results in misaligned menu
Reply With Quote #7

Quote:
Originally Posted by Halt View Post
1. You're using old syntax
2. You didn't even follow the wiki for writing this. Whats the point of using the old syntax and not using the SM wikis?
I've edited the example in the OP to be from the wiki and in new syntax.
Dagothur is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode