1063-client.patch
b/code/ryzom/client/data/gamedev/interfaces_v3/login_widgets.xml Sat Oct 09 18:53:05 2010 +0200 | ||
---|---|---|
817 | 817 |
<action handler="leave_modal" /> <!-- must leave modal first if another modal is to be displayed after this one --> |
818 | 818 |
<action handler="" params=""/> |
819 | 819 |
</proc> |
820 |
<proc id="proc_valid_message_box_cancel" > |
|
821 |
<action handler="leave_modal" /> <!-- must leave modal first if another modal is to be displayed after this one --> |
|
822 |
<action handler="" params=""/> |
|
823 |
</proc> |
|
820 | 824 |
|
821 | 825 |
|
822 | 826 |
|
823 | 827 |
|
824 |
<group type="modal" id="valid_message_box" exit_click_out="false" posref="MM MM" w="1024" h="768" |
|
828 |
|
|
829 |
<group type="modal" id="valid_message_box" exit_click_out="false" posref="MM MM" w="420" child_resize_h="true" child_resize_hmargin="20" |
|
825 | 830 |
on_enter="proc" on_enter_params="proc_valid_message_box_ok" options="no_bordure" mouse_pos="false" |
826 | 831 |
> |
827 |
<view type="bitmap" posref="MM MM" id="log" texture="new_launcher_bg.tga" global_color="false" render_layer="-1" /> |
|
832 |
<instance template="log_box_frame" id="bk" posref="MM MM" sizeref="wh" w="0" h="0" /> |
|
833 |
<view type="text" id="text" posref="MM MM" line_maxw="420" w="420" x="0" y="12" color="135 243 28 255" fontsize="12" shadow="true" multi_line="true" multi_line_space="0" case_mode="%case_first_sentence_letter_up"/> |
|
828 | 834 |
|
829 |
<view type="text" id="text" posref="MM MM" line_maxw="412" w="412" x="0" y="0" color="135 243 28 255" fontsize="18" shadow="true" multi_line="true" multi_line_space="0" case_mode="%case_first_sentence_letter_up"/> |
|
830 |
|
|
831 |
|
|
832 |
<ctrl type="button" button_type="push_button" id="but_cancel" posref="BR BR" x="-304" y="157" |
|
833 |
tx_normal="log_over.tga" tx_over="log_over.tga" tx_pushed="log_over.tga" |
|
834 |
color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0" |
|
835 |
onclick_l="leave_modal" params_l="" /> |
|
836 |
|
|
837 |
<view type="text" id="txt_log" posparent="but_ok" posref="MM MM" hardtext="uittOK" shadow="true" fontsize="16" y="-2" color="208 212 182 255" /> |
|
838 |
|
|
839 |
|
|
840 |
<ctrl type="button" button_type="push_button" id="but_ok" posparent="but_cancel" posref="TL TR" x="3" y="0" |
|
841 |
tx_normal="log_over.tga" tx_over="log_over.tga" tx_pushed="log_over.tga" |
|
842 |
color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0" |
|
843 |
onclick_l="proc" params_l="proc_valid_message_box_ok" /> |
|
844 |
|
|
845 |
<view type="text" id="txt_ok" posparent="but_ok" posref="MM MM" hardtext="uittOK" shadow="true" fontsize="16" y="-2" color="208 212 182 255" /> |
|
846 |
<view type="text" id="txt_cancel" posparent="but_cancel" posref="MM MM" hardtext="uittCancel" shadow="true" fontsize="16" y="-2" color="208 212 182 255" /> |
|
847 |
|
|
848 |
<ctrl type="button" button_type="push_button" id="but_quit" posref="TR TR" x="-30" y="-30" |
|
849 |
tx_normal="quit_over.tga" tx_over="quit_over.tga" tx_pushed="quit_over.tga" |
|
850 |
color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0" |
|
851 |
onclick_l="login_quit" /> |
|
835 |
<ctrl style="log_std_but" id="but_ok" posparent="text" posref="BM TL" x="10" y="-6" onclick_l="proc" params_l="proc_valid_message_box_ok" hardtext="uittOK"/> |
|
836 |
<ctrl style="log_std_but" id="but_cancel" posparent="text" posref="BM TR" x="-10" y="-6" onclick_l="proc" params_l="proc_valid_message_box_cancel" hardtext="uittCancel"/> |
|
852 | 837 |
|
853 | 838 |
</group> |
854 | 839 |
|
855 |
--> |
|
856 |
|
|
857 |
|
|
858 |
|
|
859 | 840 |
|
860 | 841 |
<!-- |
861 | 842 |
<group type="modal" id="valid_message_box" exit_click_out="true" posref="MM MM" w="156" child_resize_h="true" child_resize_hmargin="12" |
b/code/ryzom/client/data/gamedev/interfaces_v3/out_v2_select.xml Sat Oct 09 18:53:05 2010 +0200 | ||
---|---|---|
429 | 429 |
<action handler="remove_link" params="id=resume_session_but_init" /> |
430 | 430 |
</proc> |
431 | 431 |
|
432 |
<!-- ******************** --> |
|
433 |
<!-- * MESSAGE BOX * --> |
|
434 |
<!-- ******************** --> |
|
435 |
<proc id="proc_valid_message_box_ok" > |
|
436 |
<action handler="leave_modal" /> <!-- must leave modal first if another modal is to be displayed after this one --> |
|
437 |
<action handler="" params=""/> |
|
438 |
</proc> |
|
439 |
<proc id="proc_valid_message_box_cancel" > |
|
440 |
<action handler="leave_modal" /> <!-- must leave modal first if another modal is to be displayed after this one --> |
|
441 |
<action handler="" params=""/> |
|
442 |
</proc> |
|
443 |
|
|
444 |
<group type="modal" id="valid_message_box" posref="MM MM" w="300" h="180" |
|
445 |
child_resize_h="true" child_resize_hmargin="20" |
|
446 |
mouse_pos="false" escapable="false" exit_click_out="false" display="false"> |
|
447 |
|
|
448 |
|
|
449 |
<instance template="outgame_popup" id="back" posref="TL TL" /> |
|
450 |
|
|
451 |
|
|
452 |
<view type="text" id="text" posref="TM TM" x="0" y="-60" color="255 255 255 255" global_color="false" line_maxw="284" |
|
453 |
fontsize="17" shadow="true" multi_line="true" multi_line_space="0"/> |
|
454 |
|
|
455 |
<ctrl style="valid_txt_button" id="submit" posref="BM TL" posparent="text" x="0" y="-6" hardtext="uittOK" |
|
456 |
onover="play_sound" params_over="name=specie_but_over" |
|
457 |
onclick_l="proc" params_l="proc_valid_message_box_ok" /> |
|
458 |
|
|
459 |
<ctrl style="valid_txt_button" id="cancel" posref="BM TR" x="0" y="-6" hardtext="uittCancel" posparent="text" |
|
460 |
onover="play_sound" params_over="name=specie_but_over" |
|
461 |
onclick_l="proc" params_l="proc_valid_message_box_cancel" /> |
|
462 |
</group> |
|
463 |
|
|
464 |
|
|
465 |
|
|
432 | 466 |
|
433 | 467 |
<!-- ***************** --> |
434 | 468 |
<!-- * MAIN WINDOW * --> |
b/code/ryzom/client/src/events_listener.cpp Sat Oct 09 18:53:05 2010 +0200 | ||
---|---|---|
30 | 30 |
#include "input.h" |
31 | 31 |
#include "interface_v3/interface_manager.h" |
32 | 32 |
#include "interface_v3/custom_mouse.h" |
33 |
|
|
33 |
#include "far_tp.h" |
|
34 | 34 |
|
35 | 35 |
using namespace NLMISC; |
36 | 36 |
|
37 | 37 |
extern CActionsManager Actions; // Actions Manager. |
38 |
extern CLoginStateMachine LoginSM; |
|
38 | 39 |
|
39 | 40 |
//--------------------------------------------------- |
40 | 41 |
// CEventsListener : |
... | ... | |
123 | 124 |
// Window closed. |
124 | 125 |
if(event == EventDestroyWindowId) |
125 | 126 |
{ |
126 |
// Interface saving |
|
127 |
CInterfaceManager::getInstance()->uninitInGame0(); |
|
128 |
|
|
129 |
/* YOYO: |
|
130 |
quitting safely sometimes crash in CContinentMngr::select() |
|
131 |
quitting unsafely crash always in ~CEntityManager() |
|
132 |
Id did not succeed to reproduce the crash in CContinentMngr::select(). |
|
133 |
Hence I let it to quit "safely", calling release methods |
|
134 |
*/ |
|
135 |
releaseMainLoop(true); |
|
136 |
release(); |
|
137 |
|
|
138 |
// quit properly crash info |
|
139 |
extern void quitCrashReport (); |
|
140 |
quitCrashReport (); |
|
141 |
|
|
142 |
// kill process |
|
143 |
exit(EXIT_SUCCESS); |
|
127 |
if (LoginSM.getCurrentState() == CLoginStateMachine::st_ingame) |
|
128 |
{ |
|
129 |
if( CInterfaceManager::getInstance()->isInGame() ) |
|
130 |
{ |
|
131 |
CInterfaceManager::getInstance()->runActionHandler("enter_modal", NULL, "group=ui:interface:quit_dialog"); |
|
132 |
} |
|
133 |
else |
|
134 |
{ |
|
135 |
CInterfaceManager::getInstance()->runActionHandler("quit_ryzom", NULL, ""); |
|
136 |
} |
|
137 |
} |
|
138 |
else |
|
139 |
{ |
|
140 |
CInterfaceManager::getInstance()->runActionHandler("login_quit", NULL, ""); |
|
141 |
} |
|
142 |
return; |
|
144 | 143 |
} |
145 | 144 |
// Event from the Mouse (ANGLE) |
146 | 145 |
if(event == EventGDMouseMove) |
b/code/ryzom/client/src/interface_v3/action_handler_game.cpp Sat Oct 09 18:53:05 2010 +0200 | ||
---|---|---|
1121 | 1121 |
public: |
1122 | 1122 |
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */) |
1123 | 1123 |
{ |
1124 |
/* todo game_exit |
|
1125 | 1124 |
game_exit = true; |
1126 |
nlinfo("User Request to Quit the game"); */
|
|
1125 |
ryzom_exit = true;
|
|
1127 | 1126 |
} |
1128 | 1127 |
}; |
1129 | 1128 |
REGISTER_ACTION_HANDLER( CAHQuitGame, "quit_game"); |
... | ... | |
1139 | 1138 |
// If we are not connected, quit now |
1140 | 1139 |
if((!ConnectionReadySent) && (!FarTP.isLeavingEGS())) |
1141 | 1140 |
{ |
1142 |
game_exit = true; |
|
1143 |
ryzom_exit = true; |
|
1144 | 1141 |
nlinfo("User Request to Quit ryzom"); |
1142 |
CInterfaceManager::getInstance()->validMessageBox(CInterfaceManager::WarningIconMsg, CI18N::get("uiQuitConfirm"), "quit_game", "","leave_modal", "", "ui:outgame"); |
|
1145 | 1143 |
} |
1146 | 1144 |
else |
1147 | 1145 |
{ |
b/code/ryzom/client/src/login.cpp Sat Oct 09 18:53:05 2010 +0200 | ||
---|---|---|
1293 | 1293 |
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) |
1294 | 1294 |
{ |
1295 | 1295 |
nlinfo("CAHLoginQuit called"); |
1296 |
CInterfaceManager::getInstance()->validMessageBox(CInterfaceManager::WarningIconMsg, CI18N::get("uiQuitConfirm"), "login_quit_real", "","leave_modal", "", "ui:login"); |
|
1297 |
} |
|
1298 |
}; |
|
1299 |
REGISTER_ACTION_HANDLER (CAHLoginQuit, "login_quit"); |
|
1300 |
|
|
1301 |
// *************************************************************************** |
|
1302 |
class CAHLoginQuitReal : public IActionHandler |
|
1303 |
{ |
|
1304 |
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) |
|
1305 |
{ |
|
1306 |
nlinfo("CAHLoginQuitReal called"); |
|
1296 | 1307 |
|
1297 | 1308 |
loginFinished = true; |
1298 | 1309 |
loginOK = false; |
... | ... | |
1300 | 1311 |
LoginSM.pushEvent(CLoginStateMachine::ev_quit); |
1301 | 1312 |
} |
1302 | 1313 |
}; |
1303 |
REGISTER_ACTION_HANDLER (CAHLoginQuit, "login_quit");
|
|
1314 |
REGISTER_ACTION_HANDLER (CAHLoginQuitReal, "login_quit_real");
|
|
1304 | 1315 |
|
1305 | 1316 |
|
1306 | 1317 |
// *************************************************************************** |