1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
MAIN_MENU_CATEGORY_ENABLED = 0
MAIN_MENU_CATEGORY_DISABLED_WHILE_DEAD = 1
MAIN_MENU_CATEGORY_DISABLED_WHILE_IN_COMBAT = 2
MAIN_MENU_CATEGORY_DISABLED_WHILE_REVIVING = 3
--Main Menu Categories
MENU_CATEGORY_MARKET = 1
MENU_CATEGORY_INVENTORY = 2
MENU_CATEGORY_CHARACTER = 3
MENU_CATEGORY_SKILLS = 4
MENU_CATEGORY_CHAMPION = 5
MENU_CATEGORY_JOURNAL = 6
MENU_CATEGORY_COLLECTIONS = 7
MENU_CATEGORY_MAP = 8
MENU_CATEGORY_GROUP = 9
MENU_CATEGORY_CONTACTS = 10
MENU_CATEGORY_GUILDS = 11
MENU_CATEGORY_ALLIANCE_WAR = 12
MENU_CATEGORY_MAIL = 13
MENU_CATEGORY_NOTIFICATIONS = 14
MENU_CATEGORY_HELP = 15
MENU_CATEGORY_ACTIVITY_FINDER = 16
--
--[[ MainMenu Singleton ]] --
--
return mainMenu
end
{
}
local PLAYER_IS_DEAD = false
local PLAYER_IS_ALIVE = true
EVENT_MANAGER : RegisterForEvent ( "MainMenu_Manager" , EVENT_PLAYER_DEAD , function ( ) self : OnPlayerAliveStateChanged ( PLAYER_IS_DEAD ) end )
EVENT_MANAGER : RegisterForEvent ( "MainMenu_Manager" , EVENT_PLAYER_ALIVE , function ( ) self : OnPlayerAliveStateChanged ( PLAYER_IS_ALIVE ) end )
EVENT_MANAGER : RegisterForEvent ( "MainMenu_Manager" , EVENT_PLAYER_COMBAT_STATE , function ( eventCode , inCombat ) self : OnPlayerCombatStateChanged ( inCombat ) end )
local PLAYER_IS_REVIVING = true
EVENT_MANAGER : RegisterForEvent ( "MainMenu_Manager" , EVENT_PLAYER_REINCARNATED , function ( ) self : OnPlayerRevivingStateChanged ( not PLAYER_IS_REVIVING ) end )
EVENT_MANAGER : RegisterForEvent ( "MainMenu_Manager" , EVENT_PLAYER_ACTIVATED , function ( ) self : RefreshPlayerState ( ) end )
end
end
end
end
end
end
end
end
end
--[[
Blocking Scenes prevent the menu from showing other scenes while the blocking scene is activated. If
the player attempts to change the scene while the blocking scene is active, the requested scene is
stored and then only shown once the blocking scene has been cleared.
Blocking scenes should call SetBlockingScene and specify a callback when shown, and call ClearBlockingScene when hidden.
Only one blocking scene should be active at any given time.
Note: nextSceneData is a table that can contain the following information:
category: Integer ID for the menu category. Must be specified if sceneName is not.
sceneName: The name of the scene. Must be specified if category is not.
sceneGroup: The scene group that the scene is a part of. category and sceneName must both be specified if this is used
]] --
self : FireCallbacks ( "OnBlockingSceneActivated" , self . activatedByMouseClick , self . nextSceneData . sceneGroup ~= nil )
end
-- Call this when the blocking scene is shown
assert ( self . blockingSceneName == nil and sceneName ) -- Can't set more than one blocking scene at a time, or can't set one without a name
end
-- Call this when the blocking scene is hidden
end
end
-- Call this if you want to cancel the scene to show when the blocking scene is cleared.
end
-- Don't call this directly; intended to be a private method
end
end
local function MainMenu_Manager_ActivatedBlockingScene_Internal ( self , sceneData , isBaseScene , activatedByMouseClick )
end
end
end
end
end
end
end
EVENT_MANAGER : RegisterForEvent ( "MainMenu_Manager" , EVENT_GAMEPAD_PREFERRED_MODE_CHANGED , OnGamepadPreferredModeChanged ) |