1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010-2019 Winch Gate Property Limited
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2013 Laszlo KIS-ADAM (dfighter) <dfighter1985@gmail.com>
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef NL_GAME_CONTEXT_MENU_H
23 #define NL_GAME_CONTEXT_MENU_H
25 #include "nel/misc/types_nl.h"
26 #include "main_loop.h"
27 #include "nel/gui/ctrl_text_button.h"
28 #include "nel/gui/interface_group.h"
29 #include "interface_v3/interface_pointer.h"
30 #include "game_share/bot_chat_types.h"
33 // ***************************************************************************
44 // ***************************************************************************
47 * \author Lionel Berenguier
48 * \author Nevrax France
51 class CGameContextMenu
58 // init with IM and DB
59 void init(const std::string
&menuId
);
61 // update the context menu
64 bool isBuilding() const { return _OkTextTradeOutpostBuilding
; }
71 bool canPvpChallenge();
75 void updateContextMenuMissionsOptions( bool forceHide
);
76 void updateContextMenuWebPage(uint options
);
77 void updateContextMenuOutpostState(uint options
);
78 void updateContextMenuOutpostBanish();
79 void updateContextMenuMissionRing();
82 void updateContextMenuTalkEntries(uint options
);
83 void setupContextMenuCantTalk();
84 void setupContextMenuTalkWithPlayer();
88 CInterfaceGroupPtr _GroupMilkoPad
;
89 NLMISC::CCDBNodeLeaf
*_MilkoAttackDisengage
;
90 CCtrlTextButtonPtr _MilkoAttDisBut1
;
91 CCtrlTextButtonPtr _MilkoAttDisBut2
;
93 CGroupMenu
*_GroupMenu
;
94 NLMISC::CCDBNodeLeaf
*_ContextVal
;
95 NLMISC::CCDBNodeLeaf
*_AvailablePrograms
;
96 NLMISC::CCDBNodeLeaf
*_ServerTeamPresent
;
97 NLMISC::CCDBNodeLeaf
*_MissionOption
[NUM_MISSION_OPTIONS
];
98 NLMISC::CCDBNodeLeaf
*_ServerInDuel
;
99 NLMISC::CCDBNodeLeaf
*_ServerInPvpChallenge
;
100 NLMISC::CCDBNodeLeaf
*_WebPageTitle
;
101 NLMISC::CCDBNodeLeaf
*_OutpostSheet
;
102 NLMISC::CCDBNodeLeaf
*_OutpostRightToBannish
;
103 NLMISC::CCDBNodeLeaf
*_MissionRing
[BOTCHATTYPE::MaxR2MissionEntryDatabase
];
106 CViewTextMenuPtr _TextLootAction
;
107 CViewTextMenuPtr _TextQuartering
;
108 CViewTextMenuPtr _TextAttack
;
109 CViewTextMenuPtr _TextDuel
;
110 CViewTextMenuPtr _TextUnDuel
;
111 CViewTextMenuPtr _TextPvpChallenge
;
112 CViewTextMenuPtr _TextUnPvpChallenge
;
113 CViewTextMenuPtr _TextExchange
;
114 CViewTextMenuPtr _TextMount
;
115 CViewTextMenuPtr _TextFreeLook
;
116 CViewTextMenuPtr _TextMove
;
117 CViewTextMenuPtr _TextStop
;
118 CViewTextMenuPtr _TextDisengage
;
119 CViewTextMenuPtr _TextUnseat
;
120 CViewTextMenuPtr _TextInfo
;
121 CViewTextMenuPtr _TextFollow
;
122 CViewTextMenuPtr _TextAssist
;
123 CViewTextMenuPtr _TextInvit
;
124 CViewTextMenuPtr _TextGuildInvit
;
125 CViewTextMenuPtr _TextQuitTeam
;
126 CViewTextMenuPtr _TextAddToFriendList
;
127 CViewTextMenuPtr _TextMission
[NUM_MISSION_OPTIONS
];
130 CViewTextMenuPtr _TextPAFollow
;
131 CViewTextMenuPtr _TextPAStop
;
132 CViewTextMenuPtr _TextPAFree
;
133 CViewTextMenuPtr _TextPAEnterStable
;
134 CViewTextMenuPtr _TextPAEnterBag
;
136 // BotChat and player talk
137 CViewTextMenuPtr _TextNews
;
138 CViewTextMenuPtr _TextTradeItem
;
139 CViewTextMenuPtr _TextTradeTeleport
;
140 CViewTextMenuPtr _TextTradeFaction
;
141 CViewTextMenuPtr _TextTradeCosmetic
;
142 CViewTextMenuPtr _TextTradeGuildOptions
;
143 CViewTextMenuPtr _TextTradeOutpostBuilding
;
144 CViewTextMenuPtr _TextTradeGuildRoleMaster
;
145 CViewTextMenuPtr _TextTradePact
;
146 CViewTextMenuPtr _TextTradePhrase
;
147 CViewTextMenuPtr _TextChooseMission
;
148 CViewTextMenuPtr _TextCreateGuild
;
149 CViewTextMenuPtr _TextDynamicMission
;
150 CViewTextMenuPtr _TextTalk
;
151 CViewTextMenuPtr _TextChooseZCCharge
;
152 CViewTextMenuPtr _TextChooseBuilding
;
153 CViewTextMenuPtr _TextBuyRM
;
154 CViewTextMenuPtr _TextUpgradeRM
;
155 CViewTextMenuPtr _TextCancelZCCharge
;
156 CViewTextMenuPtr _TextDestroyBuilding
;
157 CViewTextMenuPtr _TextOutpostState
;
158 CViewTextMenuPtr _TextOutpostBanishPlayer
;
159 CViewTextMenuPtr _TextOutpostBanishGuild
;
160 CViewTextMenuPtr _TextWebPage
;
161 CViewTextMenuPtr _TextMissionRing
[BOTCHATTYPE::MaxR2MissionEntryDatabase
];
164 CViewTextMenuPtr _TextExtractRM
;
167 CViewTextMenuPtr _TextBuildTotem
;
169 // Use intermediate OK value. not good thing to do "text->setActive(false); text->setActive(true)" each frame for nothing.
171 bool _OkTextTradeItem
;
172 bool _OkTextTradeTeleport
;
173 bool _OkTextTradeFaction
;
174 bool _OkTextTradeCosmetic
;
175 bool _OkTextTradeGuildOptions
;
176 bool _OkTextTradeOutpostBuilding
;
177 bool _OkTextTradeGuildRoleMaster
;
178 bool _OkTextTradePact
;
179 bool _OkTextTradePhrase
;
180 bool _OkTextChooseMission
;
181 bool _OkTextCreateGuild
;
182 bool _OkTextDynamicMission
;
184 bool _OkTextChooseZCCharge
;
185 bool _OkTextChooseBuilding
;
187 bool _OkTextUpgradeRM
;
188 bool _OkTextCancelZCCharge
;
189 bool _OkTextDestroyBuilding
;
190 bool _OkTextOutpostState
;
198 * Enable/disable various menu items for animals.
199 * selectedAnimalInVision can be NULL (out of vision)
200 * index can be -1 (no owned animal)
201 * Any CViewTextMenu* can be NULL
203 bool testMenuOptionForPackAnimal( CEntityCL
* selectedAnimalInVision
, uint index
, bool clearAll
,
204 CViewTextMenu
*pFollow
, CViewTextMenu
*pStop
, CViewTextMenu
*pFree
,
205 CViewTextMenu
*pEnterStable
, CViewTextMenu
*pLeaveStable
,
206 CViewTextMenu
*pMount
, CViewTextMenu
*pUnmount
,
207 CViewTextMenu
*pEnterBag
, CViewTextMenu
*pLeaveBag
);
210 #endif // NL_GAME_CONTEXT_MENU_H
212 /* End of game_context_menu.h */