SourceMod SDK  1.7
IMenuManager.h File Reference

Abstracts on-screen menus for clients. More...

#include <IShareSys.h>
#include <IHandleSys.h>

Go to the source code of this file.

Classes

struct  SourceMod::menu_slots_t
 Pairs an item type with an item menu position. More...
 
struct  SourceMod::menu_states_t
 Describes menu display information. More...
 
struct  SourceMod::ItemDrawInfo
 Information about item drawing. More...
 
struct  SourceMod::menu_vote_result_t
 Contains information about a vote result. More...
 
struct  SourceMod::menu_vote_result_t::menu_client_vote_t
 
struct  SourceMod::menu_vote_result_t::menu_item_vote_t
 
class  SourceMod::IMenuPanel
 Sets how a raw menu should be drawn. More...
 
class  SourceMod::IMenuStyle
 Describes a "MenuStyle" system which manages menu drawing and construction. More...
 
class  SourceMod::IBaseMenu
 High-level interface for building menus. More...
 
class  SourceMod::IMenuHandler
 Contains callbacks for menu actions. More...
 
class  SourceMod::IMenuManager
 Manages menu creation and displaying. More...
 

Macros

#define SMINTERFACE_MENUMANAGER_NAME   "IMenuManager"
 
#define SMINTERFACE_MENUMANAGER_VERSION   16
 
#define ITEMDRAW_DEFAULT   (0)
 
#define ITEMDRAW_DISABLED   (1<<0)
 
#define ITEMDRAW_RAWLINE   (1<<1)
 
#define ITEMDRAW_NOTEXT   (1<<2)
 
#define ITEMDRAW_SPACER   (1<<3)
 
#define ITEMDRAW_IGNORE   ((1<<1)|(1<<2))
 
#define ITEMDRAW_CONTROL   (1<<4)
 
#define MENU_NO_PAGINATION   0
 
#define MENU_TIME_FOREVER   0
 
#define MENUFLAG_BUTTON_EXIT   (1<<0)
 
#define MENUFLAG_BUTTON_EXITBACK   (1<<1)
 
#define MENUFLAG_NO_SOUND   (1<<2)
 
#define MENUFLAG_BUTTON_NOVOTE   (1<<3)
 
#define VOTEFLAG_NO_REVOTES   (1<<0)
 

Enumerations

enum  ItemSelection {
  SourceMod::ItemSel_None, SourceMod::ItemSel_Back, SourceMod::ItemSel_Next, SourceMod::ItemSel_Exit,
  SourceMod::ItemSel_Item, SourceMod::ItemSel_ExitBack
}
 Used to determine how an item selection is interpreted.
 
enum  ItemOrder { SourceMod::ItemOrder_Ascending, SourceMod::ItemOrder_Descending }
 Used to determine which order to search for items in.
 
enum  MenuCancelReason {
  SourceMod::MenuCancel_Disconnected = -1, SourceMod::MenuCancel_Interrupted = -2, SourceMod::MenuCancel_Exit = -3, SourceMod::MenuCancel_NoDisplay = -4,
  SourceMod::MenuCancel_Timeout = -5, SourceMod::MenuCancel_ExitBack = -6
}
 Reasons for a menu dying.
 
enum  MenuEndReason {
  SourceMod::MenuEnd_Selected = 0, SourceMod::MenuEnd_VotingDone = -1, SourceMod::MenuEnd_VotingCancelled = -2, SourceMod::MenuEnd_Cancelled = -3,
  SourceMod::MenuEnd_Exit = -4, SourceMod::MenuEnd_ExitBack = -5
}
 Reasons a menu ended.
 
enum  VoteCancelReason { SourceMod::VoteCancel_Generic = -1, SourceMod::VoteCancel_NoVotes = -2 }
 Reasons a vote can be cancelled.
 
enum  MenuOption { SourceMod::MenuOption_IntroMessage, SourceMod::MenuOption_IntroColor, SourceMod::MenuOption_Priority }
 Extended menu options.
 
enum  MenuSource { SourceMod::MenuSource_None = 0, SourceMod::MenuSource_External = 1, SourceMod::MenuSource_BaseMenu = 2, SourceMod::MenuSource_Display = 3 }
 Describes the menu a player is viewing.
 

Detailed Description

Abstracts on-screen menus for clients.

Macro Definition Documentation

#define ITEMDRAW_CONTROL   (1<<4)

Item is control text (back/next/exit)

#define ITEMDRAW_DEFAULT   (0)

Item should be drawn normally

#define ITEMDRAW_DISABLED   (1<<0)

Item is drawn but not selectable

#define ITEMDRAW_IGNORE   ((1<<1)|(1<<2))

Item should be completely ignored (rawline + notext)

#define ITEMDRAW_NOTEXT   (1<<2)

No text should be drawn

#define ITEMDRAW_RAWLINE   (1<<1)

Item should be a raw line, without a slot

#define ITEMDRAW_SPACER   (1<<3)

Item should be drawn as a spacer, if possible

#define MENU_NO_PAGINATION   0

Menu should not be paginated (10 items max)

#define MENU_TIME_FOREVER   0

Menu should be displayed as long as possible

#define MENUFLAG_BUTTON_EXIT   (1<<0)

Menu has an "exit" button

#define MENUFLAG_BUTTON_EXITBACK   (1<<1)

Menu has an "exit back" button

#define MENUFLAG_BUTTON_NOVOTE   (1<<3)

Menu has a "No Vote" button at slot 1

#define MENUFLAG_NO_SOUND   (1<<2)

Menu will not have any select sounds

#define SMINTERFACE_MENUMANAGER_NAME   "IMenuManager"

vim: set ts=4 :

SourceMod

Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3.0, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

As a special exception, AlliedModders LLC gives you permission to link the code of this program (as well as its derivative works) to "Half-Life 2," the "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software by the Valve Corporation. You must obey the GNU General Public License in all respects for all other code used. Additionally, AlliedModders LLC grants this exception to all derivative works. AlliedModders LLC defines further exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), or http://www.sourcemod.net/license.php.

Version: $Id$

#define VOTEFLAG_NO_REVOTES   (1<<0)

Players cannot change their votes