Raised This Month: $51 Target: $400
 12% 

[TF2] What is the difference between Menu and Panel


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 03-01-2016 , 10:20   [TF2] What is the difference between Menu and Panel
Reply With Quote #1

The title says everything. I want to know what is the difference. Also I have some questions!
__________________
My plugins:
*None for now*


Steam:
naydef
Naydef is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 03-01-2016 , 10:57   Re: [TF2] What is the difference between Menu and Panel
Reply With Quote #2

https://wiki.alliedmods.net/Menu_API_(SourceMod)#Panels
Miu is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 03-01-2016 , 12:03   Re: [TF2] What is the difference between Menu and Panel
Reply With Quote #3

I already read this web page. I want to know what are the advantages/disadvantages to use Panel or Menu? And:
  1. Panel handles are required to be closed. Are menu handles also requred to be closed and when?
  2. Can I change the text size and other properties?
  3. Is it possible to color the text?
  4. How many character can be used?
  5. I have more questions, but I will ask later
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 03-01-2016 at 12:05.
Naydef is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 03-01-2016 , 14:46   Re: [TF2] What is the difference between Menu and Panel
Reply With Quote #4

I'm fairly certain I got these things right, but it might require some fool-proofing:

I use Panels myself each time I need to fit more selectable and/or unselectable lines (i.e. action + comment + space) as Panels allow you to have lines which you don't need to assign a number to. For example, in a Panel you can have:
HTML Code:
Panel Title
1. Slay all
Slays all players on the server
-
2. Kick all
Kicks all players from the server
-
3. Heal all
Heals all players on the server
-
4. Info
Display additional commands
And you can have everything which doesn't have a number to be completely unselectable. A thing to note about Panels is that their handles are not tied to a specific callback, which means you create a Panel handle and tie it to manager callback when you're sending it to a client. This might not necessarily be a good thing as you are left to clean up after the Panel yourself.

But in a menu each of those line must have their number assigned to them. You can choose it to hide it, but you can't reuse it nonetheless; "Slay all" will be 1, "Kick all" will be 4, "Heal all" will be 7 and the limit is usually here.

The advantages of Menus, on the other hand, is that, although they can't offer raw text, they do offer a better item managing, by which I mean pagination. This basically means that Menus can have a very large amount of items in them and they will be nicely formatted however you tell them to. In paginated Menus, 3 last keys will be taken and replaced by the navigation items: 8 - "back/previous page", 9 - "next page", 0 - "exit". They will update automatically depending on whether the client is viewing the first or the last page of items. As mentioned in Panels, Menu handles' callbacks are tied to them upon their creation.
Phil25 is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 03-01-2016 , 14:58   Re: [TF2] What is the difference between Menu and Panel
Reply With Quote #5

OK, it's more clear now. I have one more question + the questions above.
6. What is Radio style menu and what is Valve style menu(if somebody can show pictures, please)?
Spoiler
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 03-01-2016 at 15:04.
Naydef is offline
psychonic

BAFFLED
Join Date: May 2008
Old 03-01-2016 , 17:16   Re: [TF2] What is the difference between Menu and Panel
Reply With Quote #6

Quote:
Originally Posted by Naydef View Post
Is the valve style like this picture:
Yes.
psychonic is offline
Reply



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 00:18.


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