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

ExitBackButton for panels?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 04-26-2014 , 22:57   ExitBackButton for panels?
Reply With Quote #1

hey,
i've been trying to make a way that players can close an informative panel that i wrote, when i use setmenuexitbackbutton on the panel, the panel can not be displayed.

its a raw text panel without slots, so if theres no exitback button the panel will be visible for the amount of time i have set it up.

I want to be able to go back to a menu when player press back or close the panel when he exits or presses a numerical key from 1-7.

EDIT:
I could make the exitback and exit myself but incase there are more then 8 items in the panel, will it automaticly create a new page?
if not i think it might be easier for me to just use another menu instead of a panel, would save me alot of work
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 04-26-2014 at 23:35.
striker07 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-27-2014 , 00:28   Re: ExitBackButton for panels?
Reply With Quote #2

Panels are a low level API while menus are a higher level API that uses the panel API internally.

Not surprisingly, the menu API has a lot of niceties that the panel API doesn't have.

Having said that, you can draw an item on the panel and handle the MenuAction_Select for that item. DrawPanelItem will return the menu item slot that it positions an item in.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 04-27-2014 , 17:00   Re: ExitBackButton for panels?
Reply With Quote #3

I'll just use the menu instead of the panel then, thx
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]
striker07 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 03:46.


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