mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-17 13:01:42 +00:00
Merge with develop
This commit is contained in:
parent
975ed523be
commit
120d2d7dba
15 changed files with 144 additions and 80 deletions
|
@ -43,8 +43,8 @@ namespace NLGUI
|
||||||
_BmpLeftW= _BmpMiddleW= _BmpRightW= _BmpH= 0;
|
_BmpLeftW= _BmpMiddleW= _BmpRightW= _BmpH= 0;
|
||||||
_WMargin= 0;
|
_WMargin= 0;
|
||||||
_WMin= 0;
|
_WMin= 0;
|
||||||
_TextX= -2;
|
_TextX= 0;
|
||||||
_TextY= -2;
|
_TextY= 0;
|
||||||
_Setuped= false;
|
_Setuped= false;
|
||||||
_ViewText= NULL;
|
_ViewText= NULL;
|
||||||
_IsViewTextId= false;
|
_IsViewTextId= false;
|
||||||
|
@ -602,7 +602,7 @@ namespace NLGUI
|
||||||
_WMin= max(_WMin, _BmpLeftW + _BmpMiddleW + _BmpRightW);
|
_WMin= max(_WMin, _BmpLeftW + _BmpMiddleW + _BmpRightW);
|
||||||
|
|
||||||
// TextY
|
// TextY
|
||||||
_TextY= -2;
|
_TextY= 0;
|
||||||
prop = (char*) xmlGetProp( cur, (xmlChar*)"text_y" );
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"text_y" );
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2718,9 +2718,18 @@ namespace NLGUI
|
||||||
TextContext->setOblique (_Oblique);
|
TextContext->setOblique (_Oblique);
|
||||||
|
|
||||||
// Letter size
|
// Letter size
|
||||||
UTextContext::CStringInfo si = TextContext->getStringInfo(ucstring("|")); // for now we can't now that directly from UTextContext
|
ucstring chars;
|
||||||
_FontHeight = (uint) si.StringHeight; // + (_Shadow?(_ShadowOutline?2:1):0);
|
// instead of using the height of "|" that depends on font,
|
||||||
_FontLegHeight = (uint) si.StringLine; // + (_Shadow?(_ShadowOutline?2:1):0);
|
// we're using 2 characters:
|
||||||
|
// - "_" that should be the character with the lowest part
|
||||||
|
// - A with an accent for the highest part
|
||||||
|
chars.fromUtf8("_\xc3\x84");
|
||||||
|
|
||||||
|
// for now we can't know that directly from UTextContext
|
||||||
|
UTextContext::CStringInfo si = TextContext->getStringInfo(chars);
|
||||||
|
// add a padding of 1 pixel else the top will be truncated
|
||||||
|
_FontHeight = (uint) si.StringHeight+1;
|
||||||
|
_FontLegHeight = (uint) si.StringLine;
|
||||||
|
|
||||||
// Space width
|
// Space width
|
||||||
si = TextContext->getStringInfo(ucstring(" "));
|
si = TextContext->getStringInfo(ucstring(" "));
|
||||||
|
|
|
@ -41,13 +41,13 @@
|
||||||
<view type="text" id="txt_log" x="0" posref="TM TM" posparent="window" hardtext="uiLogin" fontsize="10" y="-200" color="255 255 255 255" />
|
<view type="text" id="txt_log" x="0" posref="TM TM" posparent="window" hardtext="uiLogin" fontsize="10" y="-200" color="255 255 255 255" />
|
||||||
<view type="text" id="txt_pas" posparent="txt_log" posref="TM TM" hardtext="uiPassword" fontsize="10" y="-48" color="255 255 255 255" />
|
<view type="text" id="txt_pas" posparent="txt_log" posref="TM TM" hardtext="uiPassword" fontsize="10" y="-48" color="255 255 255 255" />
|
||||||
|
|
||||||
<instance template="edit_box_log" id="eb_login" posparent="txt_log" posref="BM TM" w="240" h="24" fontsize="12" x="0" y="-4"
|
<instance template="edit_box_log" id="eb_login" posparent="txt_log" posref="BM TM" w="240" h="26" fontsize="12" x="0" y="-4"
|
||||||
text_ref="BM BM" text_y="-2"
|
text_ref="BM BM" text_y="0"
|
||||||
reset_focus_on_hide="false" max_historic="0"
|
reset_focus_on_hide="false" max_historic="0"
|
||||||
onenter="set_keyboard_focus" params="target=ui:login:checkpass:content:submit_gr:eb_password:eb|select_all=false"
|
onenter="set_keyboard_focus" params="target=ui:login:checkpass:content:submit_gr:eb_password:eb|select_all=false"
|
||||||
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="12" color="135 243 28 255" />
|
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="12" color="135 243 28 255" />
|
||||||
|
|
||||||
<instance template="edit_box_log" id="eb_password" posparent="txt_pas" posref="BM TM" w="240" h="24" fontsize="14" x="0" y="-4"
|
<instance template="edit_box_log" id="eb_password" posparent="txt_pas" posref="BM TM" w="240" h="26" fontsize="12" x="0" y="-4"
|
||||||
text_ref="BM BM" text_y="-2"
|
text_ref="BM BM" text_y="-2"
|
||||||
reset_focus_on_hide="false" max_historic="0" entry_type="password"
|
reset_focus_on_hide="false" max_historic="0" entry_type="password"
|
||||||
onenter="on_login" params=""
|
onenter="on_login" params=""
|
||||||
|
@ -116,8 +116,8 @@
|
||||||
<view type="text" id="title_res" posparent="res_win" posref="TL BL" y="0" color="255 255 255 255" fontsize="10" shadow="true" hardtext="uiLOGResolution" />
|
<view type="text" id="title_res" posparent="res_win" posref="TL BL" y="0" color="255 255 255 255" fontsize="10" shadow="true" hardtext="uiLOGResolution" />
|
||||||
<view type="text" id="title_lod" posparent="lod_win" posref="TL BL" y="0" color="255 255 255 255" fontsize="10" shadow="true" hardtext="uiLOGLod" />
|
<view type="text" id="title_lod" posparent="lod_win" posref="TL BL" y="0" color="255 255 255 255" fontsize="10" shadow="true" hardtext="uiLOGLod" />
|
||||||
|
|
||||||
<view type="text" id="res_value" posparent="res_win" posref="MM MM" y="-2" color="135 243 28 255" fontsize="10" shadow="true" hardtext="uiResValue" />
|
<view type="text" id="res_value" posparent="res_win" posref="MM MM" y="0" color="135 243 28 255" fontsize="10" shadow="true" hardtext="uiResValue" />
|
||||||
<view type="text" id="lod_value" posparent="lod_win" posref="MM MM" y="-2" color="135 243 28 255" fontsize="10" shadow="true" hardtext="uiLodValue" />
|
<view type="text" id="lod_value" posparent="lod_win" posref="MM MM" y="0" color="135 243 28 255" fontsize="10" shadow="true" hardtext="uiLodValue" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Boutons Res -->
|
<!-- Boutons Res -->
|
||||||
|
@ -297,7 +297,7 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
|
||||||
<!-- Window -->
|
<!-- Window -->
|
||||||
<instance template="server_box" id="check_win" posparent="window" posref="MM MM" w="600" h="128" x="0" y="0" />
|
<instance template="server_box" id="check_win" posparent="window" posref="MM MM" w="600" h="128" x="0" y="0" />
|
||||||
|
|
||||||
<!-- Textes -->
|
<!-- Texts -->
|
||||||
|
|
||||||
<view type="text" id="title" posparent="check_win" posref="TM BM" y="8" color="255 255 255 255"
|
<view type="text" id="title" posparent="check_win" posref="TM BM" y="8" color="255 255 255 255"
|
||||||
fontsize="12" shadow="true" hardtext="uiOnChecking" />
|
fontsize="12" shadow="true" hardtext="uiOnChecking" />
|
||||||
|
@ -626,7 +626,7 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
|
||||||
</group>
|
</group>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- Page that show the result of data scanning -->
|
<!-- Page that allows to create an account -->
|
||||||
<group id="create_account" posref="MM MM" w="1024" h="768" active="false" >
|
<group id="create_account" posref="MM MM" w="1024" h="768" active="false" >
|
||||||
|
|
||||||
<group id="content" x="0" y="0" w="1024" h="768" posref="TL TL" >
|
<group id="content" x="0" y="0" w="1024" h="768" posref="TL TL" >
|
||||||
|
@ -647,8 +647,8 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
|
||||||
<!-- login -->
|
<!-- login -->
|
||||||
<view type="text" id="txt_log" posref="TL TL" hardtext="uiUsername" fontsize="12" x="0" y="-60" color="255 255 255 255" />
|
<view type="text" id="txt_log" posref="TL TL" hardtext="uiUsername" fontsize="12" x="0" y="-60" color="255 255 255 255" />
|
||||||
|
|
||||||
<instance template="edit_box_log" id="eb_login" posparent="txt_log" posref="BL BL" w="260" h="24" fontsize="12" x="190" y="0"
|
<instance template="edit_box_log" id="eb_login" posparent="txt_log" posref="BL BL" w="250" h="26" fontsize="12" x="200" y="0"
|
||||||
text_ref="BM BM" text_y="-2"
|
text_ref="BM BM" text_y="0"
|
||||||
on_focus="create_account_rules" on_focus_params="rules_login" reset_focus_on_hide="false" max_historic="0"
|
on_focus="create_account_rules" on_focus_params="rules_login" reset_focus_on_hide="false" max_historic="0"
|
||||||
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_password:eb|select_all=false"
|
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_password:eb|select_all=false"
|
||||||
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="12" color="135 243 28 255" />
|
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="12" color="135 243 28 255" />
|
||||||
|
@ -656,7 +656,7 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
|
||||||
<!-- password -->
|
<!-- password -->
|
||||||
<view type="text" id="txt_pas" posparent="txt_log" posref="BL TL" hardtext="uiPassword" fontsize="12" x="0" y="-30" color="255 255 255 255" />
|
<view type="text" id="txt_pas" posparent="txt_log" posref="BL TL" hardtext="uiPassword" fontsize="12" x="0" y="-30" color="255 255 255 255" />
|
||||||
|
|
||||||
<instance template="edit_box_log" id="eb_password" posparent="txt_pas" posref="BL BL" w="260" h="24" fontsize="16" x="190" y="0"
|
<instance template="edit_box_log" id="eb_password" posparent="txt_pas" posref="BL BL" w="250" h="26" fontsize="12" x="200" y="0"
|
||||||
text_ref="BM BM" text_y="-2"
|
text_ref="BM BM" text_y="-2"
|
||||||
on_focus="create_account_rules" on_focus_params="rules_password" reset_focus_on_hide="false" max_historic="0" entry_type="password"
|
on_focus="create_account_rules" on_focus_params="rules_password" reset_focus_on_hide="false" max_historic="0" entry_type="password"
|
||||||
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_confirm_password:eb|select_all=false"
|
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_confirm_password:eb|select_all=false"
|
||||||
|
@ -665,7 +665,7 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
|
||||||
<!-- confirm password -->
|
<!-- confirm password -->
|
||||||
<view type="text" id="txt_confirm_pas" posparent="txt_pas" posref="BL TL" hardtext="uiConfirmPassword" fontsize="12" x="0" y="-30" color="255 255 255 255" />
|
<view type="text" id="txt_confirm_pas" posparent="txt_pas" posref="BL TL" hardtext="uiConfirmPassword" fontsize="12" x="0" y="-30" color="255 255 255 255" />
|
||||||
|
|
||||||
<instance template="edit_box_log" id="eb_confirm_password" posparent="txt_confirm_pas" posref="BL BL" w="260" h="24" fontsize="16" x="190" y="0"
|
<instance template="edit_box_log" id="eb_confirm_password" posparent="txt_confirm_pas" posref="BL BL" w="250" h="26" fontsize="12" x="200" y="0"
|
||||||
text_ref="BM BM" text_y="-2"
|
text_ref="BM BM" text_y="-2"
|
||||||
on_focus="create_account_rules" on_focus_params="rules_password_conf" reset_focus_on_hide="false" max_historic="0" entry_type="password"
|
on_focus="create_account_rules" on_focus_params="rules_password_conf" reset_focus_on_hide="false" max_historic="0" entry_type="password"
|
||||||
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_email:eb|select_all=false"
|
onenter="set_keyboard_focus" params="target=ui:login:create_account:content:submit_gr:eb_email:eb|select_all=false"
|
||||||
|
@ -674,8 +674,8 @@ on_enter="leave_modal" options="no_bordure" mouse_pos="false" exit_key_pushed="t
|
||||||
<!-- email -->
|
<!-- email -->
|
||||||
<view type="text" id="txt_email" posparent="txt_confirm_pas" posref="BL TL" hardtext="uiEmail" fontsize="12" x="0" y="-30" color="255 255 255 255" />
|
<view type="text" id="txt_email" posparent="txt_confirm_pas" posref="BL TL" hardtext="uiEmail" fontsize="12" x="0" y="-30" color="255 255 255 255" />
|
||||||
|
|
||||||
<instance template="edit_box_log" id="eb_email" posparent="txt_email" posref="BL BL" w="260" h="24" fontsize="12" x="190" y="0"
|
<instance template="edit_box_log" id="eb_email" posparent="txt_email" posref="BL BL" w="250" h="26" fontsize="12" x="200" y="0"
|
||||||
text_ref="BM BM" text_y="-2"
|
text_ref="BM BM" text_y="0"
|
||||||
on_focus="create_account_rules" on_focus_params="rules_email" reset_focus_on_hide="false" max_historic="0"
|
on_focus="create_account_rules" on_focus_params="rules_email" reset_focus_on_hide="false" max_historic="0"
|
||||||
onenter="" params=""
|
onenter="" params=""
|
||||||
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="254" color="135 243 28 255" />
|
prompt="" enter_loose_focus="true" multi_line="false" max_num_chars="254" color="135 243 28 255" />
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<template name="edit_box_log" posref="TL TL" text_x="0" text_y="-1" text_ref="BL BL" multi_line="false" x="0" y="0" w="0" h="0"
|
<template name="edit_box_log" posref="TL TL" text_x="0" text_y="0" text_ref="BL BL" multi_line="false" x="0" y="0" w="0" h="0"
|
||||||
id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true" on_focus="" on_focus_params=""
|
id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true" on_focus="" on_focus_params=""
|
||||||
enter_loose_focus="true" prompt=">"
|
enter_loose_focus="true" prompt=">"
|
||||||
enter_recover_focus="true"
|
enter_recover_focus="true"
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<template name="edit_box_widget_multiline" posref="TL TL" text_x="0" text_y="-1" text_ref="BL BL" child_resize_h="true" multi_line="true" x="0" y="0" w="0" h="0"
|
<template name="edit_box_widget_multiline" posref="TL TL" text_x="0" text_y="0" text_ref="BL BL" child_resize_h="true" multi_line="true" x="0" y="0" w="0" h="0"
|
||||||
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
||||||
enter_loose_focus="true" prompt=">"
|
enter_loose_focus="true" prompt=">"
|
||||||
enter_recover_focus="true"
|
enter_recover_focus="true"
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- Alternate look for multi line input -->
|
<!-- Alternate look for multi line input -->
|
||||||
<template name="edit_box_widget_multiline_2" posref="TL TL" text_x="0" text_y="-1" text_ref="BL BL" child_resize_h="true" multi_line="true" x="0" y="0" w="0" h="0"
|
<template name="edit_box_widget_multiline_2" posref="TL TL" text_x="0" text_y="0" text_ref="BL BL" child_resize_h="true" multi_line="true" x="0" y="0" w="0" h="0"
|
||||||
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
||||||
enter_loose_focus="true" prompt=">"
|
enter_loose_focus="true" prompt=">"
|
||||||
enter_recover_focus="true"
|
enter_recover_focus="true"
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
<style style="log_std_but" type="text_button" button_type="push_button"
|
<style style="log_std_but" type="text_button" button_type="push_button"
|
||||||
tx_normal="but" tx_pushed="but" tx_over="but_over" wmargin="16"
|
tx_normal="but" tx_pushed="but" tx_over="but_over" wmargin="16"
|
||||||
color="255 255 255 160" col_over="255 255 255 255" col_pushed="255 255 255 255"
|
color="255 255 255 160" col_over="255 255 255 255" col_pushed="255 255 255 255"
|
||||||
text_y="-3" fontsize="10" shadow="true"
|
text_y="-1" fontsize="10" shadow="true"
|
||||||
text_color_normal="135 243 28 160"
|
text_color_normal="135 243 28 160"
|
||||||
text_color_pushed="135 243 28 255"
|
text_color_pushed="135 243 28 255"
|
||||||
text_color_over="135 243 28 255"
|
text_color_over="135 243 28 255"
|
||||||
|
@ -232,7 +232,7 @@
|
||||||
<style style="text_button_16" type="text_button" button_type="push_button"
|
<style style="text_button_16" type="text_button" button_type="push_button"
|
||||||
tx_normal="w_text_button_normal" tx_pushed="w_text_button_pushed" tx_over="w_text_button_over"
|
tx_normal="w_text_button_normal" tx_pushed="w_text_button_pushed" tx_over="w_text_button_over"
|
||||||
global_color_normal="true" global_color_over="true" global_color_pushed="true"
|
global_color_normal="true" global_color_over="true" global_color_pushed="true"
|
||||||
text_y="-2" fontsize="10" shadow="true" case_mode="%case_upper" wmargin="8"
|
text_y="0" fontsize="10" shadow="true" case_mode="%case_upper" wmargin="8"
|
||||||
text_color_normal="255 255 255 128" text_color_pushed="255 255 255 255" text_color_over="255 255 255 255" />
|
text_color_normal="255 255 255 128" text_color_pushed="255 255 255 255" text_color_over="255 255 255 255" />
|
||||||
|
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@
|
||||||
<!-- * EDIT BOX WIDGET * -->
|
<!-- * EDIT BOX WIDGET * -->
|
||||||
<!-- ********************* -->
|
<!-- ********************* -->
|
||||||
|
|
||||||
<template name="edit_box_widget" posref="TL TL" text_x="0" text_y="-1" text_ref="BL BL" child_resize_h="true" multi_line="false" x="0" y="0" w="0" h="0"
|
<template name="edit_box_widget" posref="TL TL" text_x="0" text_y="0" text_ref="BL BL" child_resize_h="true" multi_line="false" x="0" y="0" w="0" h="0"
|
||||||
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
||||||
enter_loose_focus="true" prompt=">"
|
enter_loose_focus="true" prompt=">"
|
||||||
enter_recover_focus="true"
|
enter_recover_focus="true"
|
||||||
|
@ -423,7 +423,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- alternate look for edit box -->
|
<!-- alternate look for edit box -->
|
||||||
<template name="edit_box_widget_2" posref="TL TL" text_x="0" text_y="-1" text_ref="BL BL" child_resize_h="true" multi_line="false" x="0" y="0" w="0" h="0"
|
<template name="edit_box_widget_2" posref="TL TL" text_x="0" text_y="0" text_ref="BL BL" child_resize_h="true" multi_line="false" x="0" y="0" w="0" h="0"
|
||||||
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
sizeref="" id="eb" posparent="parent" onenter="chat_box_entry" params="" reset_focus_on_hide="true"
|
||||||
enter_loose_focus="true" prompt=">"
|
enter_loose_focus="true" prompt=">"
|
||||||
enter_recover_focus="true"
|
enter_recover_focus="true"
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
tx_normal="qh_off" tx_pushed="qh_on" tx_over="qh_off" wmin="80" wmargin="40"
|
tx_normal="qh_off" tx_pushed="qh_on" tx_over="qh_off" wmin="80" wmargin="40"
|
||||||
global_color_normal="false" global_color_over="false" global_color_pushed="false"
|
global_color_normal="false" global_color_over="false" global_color_pushed="false"
|
||||||
color="255 255 255 255" col_over="255 255 255 0" col_pushed="255 255 255 255"
|
color="255 255 255 255" col_over="255 255 255 0" col_pushed="255 255 255 255"
|
||||||
text_y="-1" fontsize="13" shadow="true"
|
text_y="1" fontsize="13" shadow="true"
|
||||||
text_color_normal="222 201 182 255"
|
text_color_normal="222 201 182 255"
|
||||||
text_color_pushed="222 201 182 255"
|
text_color_pushed="222 201 182 255"
|
||||||
text_color_over="255 255 255 255"
|
text_color_over="255 255 255 255"
|
||||||
|
|
|
@ -2619,7 +2619,7 @@
|
||||||
<template name="edit_box_widget"
|
<template name="edit_box_widget"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
text_x="0"
|
text_x="0"
|
||||||
text_y="-1"
|
text_y="0"
|
||||||
text_ref="BL BL"
|
text_ref="BL BL"
|
||||||
child_resize_h="true"
|
child_resize_h="true"
|
||||||
child_resize_hmargin="0"
|
child_resize_hmargin="0"
|
||||||
|
@ -2789,7 +2789,7 @@
|
||||||
<template name="edit_box_widget_multiline"
|
<template name="edit_box_widget_multiline"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
text_x="0"
|
text_x="0"
|
||||||
text_y="-1"
|
text_y="0"
|
||||||
text_ref="BL BL"
|
text_ref="BL BL"
|
||||||
child_resize_h="true"
|
child_resize_h="true"
|
||||||
multi_line="true"
|
multi_line="true"
|
||||||
|
@ -3036,7 +3036,7 @@
|
||||||
id="edit"
|
id="edit"
|
||||||
entry_type="positive_integer"
|
entry_type="positive_integer"
|
||||||
text_ref="TR TR"
|
text_ref="TR TR"
|
||||||
text_y="-1"
|
text_y="0"
|
||||||
fontsize="12"
|
fontsize="12"
|
||||||
posparent="sheet"
|
posparent="sheet"
|
||||||
posref="MR ML"
|
posref="MR ML"
|
||||||
|
@ -4520,7 +4520,7 @@
|
||||||
entry_type="positive_integer"
|
entry_type="positive_integer"
|
||||||
id="edit"
|
id="edit"
|
||||||
text_ref="TR TR"
|
text_ref="TR TR"
|
||||||
text_y="-1"
|
text_y="0"
|
||||||
fontsize="12"
|
fontsize="12"
|
||||||
posparent="sheet"
|
posparent="sheet"
|
||||||
posref="MR ML"
|
posref="MR ML"
|
||||||
|
@ -4850,7 +4850,7 @@
|
||||||
global_color_normal="true"
|
global_color_normal="true"
|
||||||
global_color_over="true"
|
global_color_over="true"
|
||||||
global_color_pushed="true"
|
global_color_pushed="true"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
case_mode="%case_upper"
|
case_mode="%case_upper"
|
||||||
|
@ -4868,7 +4868,7 @@
|
||||||
global_color_normal="true"
|
global_color_normal="true"
|
||||||
global_color_over="true"
|
global_color_over="true"
|
||||||
global_color_pushed="true"
|
global_color_pushed="true"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
case_mode="%case_upper"
|
case_mode="%case_upper"
|
||||||
|
@ -4902,7 +4902,7 @@
|
||||||
x="0"
|
x="0"
|
||||||
y="0"
|
y="0"
|
||||||
posref="TL TL"
|
posref="TL TL"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
onclick_l="#onclick_ok"
|
onclick_l="#onclick_ok"
|
||||||
params_l="#onclick_ok_param"
|
params_l="#onclick_ok_param"
|
||||||
hardtext="#ok_text"
|
hardtext="#ok_text"
|
||||||
|
@ -4910,7 +4910,7 @@
|
||||||
<ctrl style="button_cancel"
|
<ctrl style="button_cancel"
|
||||||
x="4"
|
x="4"
|
||||||
posparent="ok"
|
posparent="ok"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
posref="TR TL"
|
posref="TR TL"
|
||||||
onclick_l="#onclick_cancel"
|
onclick_l="#onclick_cancel"
|
||||||
params_l="#onclick_cancel_param"
|
params_l="#onclick_cancel_param"
|
||||||
|
@ -4946,7 +4946,7 @@
|
||||||
global_color_normal="true"
|
global_color_normal="true"
|
||||||
global_color_over="true"
|
global_color_over="true"
|
||||||
global_color_pushed="true"
|
global_color_pushed="true"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
case_mode="%case_upper"
|
case_mode="%case_upper"
|
||||||
|
@ -4960,7 +4960,7 @@
|
||||||
tx_normal="w_text_button_normal"
|
tx_normal="w_text_button_normal"
|
||||||
tx_pushed="w_text_button_pushed"
|
tx_pushed="w_text_button_pushed"
|
||||||
tx_over="w_text_button_over"
|
tx_over="w_text_button_over"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
case_mode="%case_upper"
|
case_mode="%case_upper"
|
||||||
|
@ -4984,7 +4984,7 @@
|
||||||
global_color_normal="true"
|
global_color_normal="true"
|
||||||
global_color_over="true"
|
global_color_over="true"
|
||||||
global_color_pushed="true"
|
global_color_pushed="true"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
case_mode="%case_upper"
|
case_mode="%case_upper"
|
||||||
|
@ -5002,7 +5002,7 @@
|
||||||
tx_normal="w_text_button_normal"
|
tx_normal="w_text_button_normal"
|
||||||
tx_pushed="w_text_button_pushed"
|
tx_pushed="w_text_button_pushed"
|
||||||
tx_over="w_text_button_over"
|
tx_over="w_text_button_over"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
case_mode="%case_upper"
|
case_mode="%case_upper"
|
||||||
|
@ -5030,7 +5030,7 @@
|
||||||
color="255 255 255 128"
|
color="255 255 255 128"
|
||||||
col_over="255 255 255 0"
|
col_over="255 255 255 0"
|
||||||
col_pushed="255 128 0 192"
|
col_pushed="255 128 0 192"
|
||||||
text_y="-2"
|
text_y="0"
|
||||||
fontsize="12"
|
fontsize="12"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
text_color_normal="255 255 255 255"
|
text_color_normal="255 255 255 255"
|
||||||
|
@ -5056,7 +5056,7 @@
|
||||||
color="255 255 255 128"
|
color="255 255 255 128"
|
||||||
col_over="255 255 255 0"
|
col_over="255 255 255 0"
|
||||||
col_pushed="255 190 0 192"
|
col_pushed="255 190 0 192"
|
||||||
text_y="-3"
|
text_y="0"
|
||||||
fontsize="12"
|
fontsize="12"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
text_color_normal="255 255 255 160"
|
text_color_normal="255 255 255 160"
|
||||||
|
@ -5093,7 +5093,7 @@
|
||||||
color="255 255 255 255"
|
color="255 255 255 255"
|
||||||
col_over="255 255 255 255"
|
col_over="255 255 255 255"
|
||||||
col_pushed="255 255 255 255"
|
col_pushed="255 255 255 255"
|
||||||
text_y="-3"
|
text_y="0"
|
||||||
fontsize="14"
|
fontsize="14"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
text_color_pushed="255 255 255 255"
|
text_color_pushed="255 255 255 255"
|
||||||
|
@ -5143,7 +5143,7 @@
|
||||||
color="255 255 255 255"
|
color="255 255 255 255"
|
||||||
col_over="255 255 255 255"
|
col_over="255 255 255 255"
|
||||||
col_pushed="255 255 255 255"
|
col_pushed="255 255 255 255"
|
||||||
text_y="-4"
|
text_y="-2"
|
||||||
fontsize="10"
|
fontsize="10"
|
||||||
shadow="true"
|
shadow="true"
|
||||||
case_mode="%case_upper"
|
case_mode="%case_upper"
|
||||||
|
|
|
@ -46,9 +46,6 @@
|
||||||
// Ligo.
|
// Ligo.
|
||||||
#include "nel/ligo/ligo_config.h"
|
#include "nel/ligo/ligo_config.h"
|
||||||
|
|
||||||
// Std.
|
|
||||||
#include <fstream>
|
|
||||||
#include <sstream>
|
|
||||||
// Client
|
// Client
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
@ -578,14 +575,12 @@ void listStereoDisplayDevices(std::vector<NL3D::CStereoDeviceInfo> &devices)
|
||||||
IStereoDisplay::listDevices(devices);
|
IStereoDisplay::listDevices(devices);
|
||||||
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
||||||
{
|
{
|
||||||
std::stringstream name;
|
std::string name = toString("%s - %s - %s", IStereoDisplay::getLibraryName(it->Library), it->Manufacturer.c_str(), it->ProductName.c_str());
|
||||||
name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName;
|
std::string fullname = toString("[%s] [%s]", name.c_str(), it->Serial.c_str());
|
||||||
std::stringstream fullname;
|
nlinfo("VR [C]: Stereo Display: %s", name.c_str());
|
||||||
fullname << std::string("[") << name.str() << "] [" << it->Serial << "]";
|
|
||||||
nlinfo("VR [C]: Stereo Display: %s", name.str().c_str());
|
|
||||||
if (cache)
|
if (cache)
|
||||||
{
|
{
|
||||||
VRDeviceCache.push_back(std::pair<std::string, std::string>(name.str(), it->Serial)); // VR_CONFIG
|
VRDeviceCache.push_back(std::pair<std::string, std::string>(name, it->Serial)); // VR_CONFIG
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -623,9 +618,8 @@ void initStereoDisplayDevice()
|
||||||
{
|
{
|
||||||
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
for (std::vector<NL3D::CStereoDeviceInfo>::iterator it(devices.begin()), end(devices.end()); it != end; ++it)
|
||||||
{
|
{
|
||||||
std::stringstream name;
|
std::string name = toString("%s - %s - %s", IStereoDisplay::getLibraryName(it->Library), it->Manufacturer.c_str(), it->ProductName.c_str());
|
||||||
name << IStereoDisplay::getLibraryName(it->Library) << " - " << it->Manufacturer << " - " << it->ProductName;
|
if (name == ClientCfg.VRDisplayDevice)
|
||||||
if (name.str() == ClientCfg.VRDisplayDevice)
|
|
||||||
deviceInfo = &(*it);
|
deviceInfo = &(*it);
|
||||||
if (ClientCfg.VRDisplayDeviceId == it->Serial)
|
if (ClientCfg.VRDisplayDeviceId == it->Serial)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -927,7 +927,7 @@ public:
|
||||||
CEntityCL *pSel = EntitiesMngr.entity(UserEntity->selection());
|
CEntityCL *pSel = EntitiesMngr.entity(UserEntity->selection());
|
||||||
if (pSel != NULL)
|
if (pSel != NULL)
|
||||||
if (pSel->isForageSource())
|
if (pSel->isForageSource())
|
||||||
UserEntity->moveToExtractionPhrase(UserEntity->selection(), 2.0f, ~0, ~0, true);
|
UserEntity->moveToExtractionPhrase(UserEntity->selection(), 2.0f, std::numeric_limits<uint>::max(), std::numeric_limits<uint>::max(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -862,11 +862,6 @@ OperationStep CConfigFile::getInstallNextStep() const
|
||||||
return CopyInstaller;
|
return CopyInstaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_shouldUninstallOldClient && !getSrcServerDirectory().isEmpty() && QFile::exists(getSrcServerDirectory() + "/Uninstall.exe"))
|
|
||||||
{
|
|
||||||
return UninstallOldClient;
|
|
||||||
}
|
|
||||||
|
|
||||||
// no default profile
|
// no default profile
|
||||||
if (profile.id.isEmpty())
|
if (profile.id.isEmpty())
|
||||||
{
|
{
|
||||||
|
@ -898,6 +893,11 @@ OperationStep CConfigFile::getInstallNextStep() const
|
||||||
if (!settings.contains("InstallLocation")) return CreateAddRemoveEntry;
|
if (!settings.contains("InstallLocation")) return CreateAddRemoveEntry;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (m_shouldUninstallOldClient && !getSrcServerDirectory().isEmpty() && QFile::exists(getSrcServerDirectory() + "/Uninstall.exe"))
|
||||||
|
{
|
||||||
|
return UninstallOldClient;
|
||||||
|
}
|
||||||
|
|
||||||
return Done;
|
return Done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,23 +61,6 @@ int main(int argc, char *argv[])
|
||||||
QApplication::setApplicationVersion(RYZOM_VERSION);
|
QApplication::setApplicationVersion(RYZOM_VERSION);
|
||||||
QApplication::setWindowIcon(QIcon(":/icons/ryzom.ico"));
|
QApplication::setWindowIcon(QIcon(":/icons/ryzom.ico"));
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && !defined(_DEBUG)
|
|
||||||
QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
|
||||||
|
|
||||||
// check if launched from TEMP directory
|
|
||||||
if (QApplication::applicationDirPath() != tempPath)
|
|
||||||
{
|
|
||||||
// copy installer and required files to TEMP directory
|
|
||||||
if (copyInstallerExecutable(tempPath))
|
|
||||||
{
|
|
||||||
QString tempFile = tempPath + "/" + QFileInfo(QApplication::applicationFilePath()).fileName();
|
|
||||||
|
|
||||||
// launch copy in TEMP directory with same arguments
|
|
||||||
if (QProcess::startDetached(tempFile, QApplication::arguments())) return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QLocale locale = QLocale::system();
|
QLocale locale = QLocale::system();
|
||||||
|
|
||||||
// load application translations
|
// load application translations
|
||||||
|
@ -125,6 +108,23 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
if (parser.isSet(uninstallOption))
|
if (parser.isSet(uninstallOption))
|
||||||
{
|
{
|
||||||
|
#if defined(Q_OS_WIN) && !defined(_DEBUG)
|
||||||
|
QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
||||||
|
|
||||||
|
// check if launched from TEMP directory
|
||||||
|
if (QApplication::applicationDirPath() != tempPath)
|
||||||
|
{
|
||||||
|
// copy installer and required files to TEMP directory
|
||||||
|
if (copyInstallerExecutable(tempPath))
|
||||||
|
{
|
||||||
|
QString tempFile = tempPath + "/" + QFileInfo(QApplication::applicationFilePath()).fileName();
|
||||||
|
|
||||||
|
// launch copy in TEMP directory with same arguments
|
||||||
|
if (QProcess::startDetached(tempFile, QApplication::arguments())) return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SComponents components;
|
SComponents components;
|
||||||
|
|
||||||
// add all servers by default
|
// add all servers by default
|
||||||
|
|
|
@ -38,12 +38,14 @@ struct SComponents
|
||||||
SComponents()
|
SComponents()
|
||||||
{
|
{
|
||||||
installer = true;
|
installer = true;
|
||||||
|
downloadedFiles = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList servers;
|
QStringList servers;
|
||||||
QStringList profiles;
|
QStringList profiles;
|
||||||
|
|
||||||
bool installer;
|
bool installer;
|
||||||
|
bool downloadedFiles;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum OperationStep
|
enum OperationStep
|
||||||
|
|
|
@ -243,11 +243,13 @@ void COperationDialog::updateAddRemoveComponents()
|
||||||
// update components to remove
|
// update components to remove
|
||||||
m_removeComponents.profiles << profilesToDelete;
|
m_removeComponents.profiles << profilesToDelete;
|
||||||
m_removeComponents.installer = false;
|
m_removeComponents.installer = false;
|
||||||
|
m_removeComponents.downloadedFiles = false;
|
||||||
|
|
||||||
// update components to add
|
// update components to add
|
||||||
m_addComponents.profiles << profilesToAdd;
|
m_addComponents.profiles << profilesToAdd;
|
||||||
m_addComponents.servers << serversToUpdate;
|
m_addComponents.servers << serversToUpdate;
|
||||||
m_addComponents.installer = false;
|
m_addComponents.installer = false;
|
||||||
|
m_addComponents.downloadedFiles = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void COperationDialog::processUpdateProfilesNextStep()
|
void COperationDialog::processUpdateProfilesNextStep()
|
||||||
|
@ -351,6 +353,10 @@ void COperationDialog::processUninstallNextStep()
|
||||||
{
|
{
|
||||||
QtConcurrent::run(this, &COperationDialog::deleteComponentsProfiles);
|
QtConcurrent::run(this, &COperationDialog::deleteComponentsProfiles);
|
||||||
}
|
}
|
||||||
|
else if (m_removeComponents.downloadedFiles)
|
||||||
|
{
|
||||||
|
QtConcurrent::run(this, &COperationDialog::deleteComponentsDownloadedFiles);
|
||||||
|
}
|
||||||
else if (m_removeComponents.installer)
|
else if (m_removeComponents.installer)
|
||||||
{
|
{
|
||||||
QtConcurrent::run(this, &COperationDialog::deleteComponentsInstaller);
|
QtConcurrent::run(this, &COperationDialog::deleteComponentsInstaller);
|
||||||
|
@ -1154,6 +1160,43 @@ void COperationDialog::deleteComponentsInstaller()
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
|
|
||||||
|
// reset it once it's done
|
||||||
|
m_removeComponents.installer = false;
|
||||||
|
|
||||||
|
emit onProgressSuccess(1);
|
||||||
|
emit done();
|
||||||
|
}
|
||||||
|
|
||||||
|
void COperationDialog::deleteComponentsDownloadedFiles()
|
||||||
|
{
|
||||||
|
m_currentOperation = tr("Delete downloaded files");
|
||||||
|
m_currentOperationProgressFormat = tr("Deleting %1...");
|
||||||
|
|
||||||
|
CConfigFile *config = CConfigFile::getInstance();
|
||||||
|
|
||||||
|
QString path = config->getInstallationDirectory();
|
||||||
|
|
||||||
|
QDir dir(path);
|
||||||
|
|
||||||
|
QStringList filter;
|
||||||
|
filter << "*.7z";
|
||||||
|
filter << "*.bnp";
|
||||||
|
filter << "*.zip";
|
||||||
|
filter << "*.part";
|
||||||
|
|
||||||
|
QStringList files = dir.entryList(filter, QDir::Files);
|
||||||
|
|
||||||
|
foreach(const QString &file, files)
|
||||||
|
{
|
||||||
|
if (!QFile::remove(file))
|
||||||
|
{
|
||||||
|
qDebug() << "Unable to delete" << file;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// reset it once it's done
|
||||||
|
m_removeComponents.downloadedFiles = false;
|
||||||
|
|
||||||
emit onProgressSuccess(1);
|
emit onProgressSuccess(1);
|
||||||
emit done();
|
emit done();
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,8 +116,8 @@ protected:
|
||||||
void addComponentsProfiles();
|
void addComponentsProfiles();
|
||||||
void deleteComponentsProfiles();
|
void deleteComponentsProfiles();
|
||||||
|
|
||||||
void addComponentsInstaller();
|
|
||||||
void deleteComponentsInstaller();
|
void deleteComponentsInstaller();
|
||||||
|
void deleteComponentsDownloadedFiles();
|
||||||
|
|
||||||
void updateAddRemoveComponents();
|
void updateAddRemoveComponents();
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,14 @@ CUninstallDialog::CUninstallDialog(QWidget *parent):QDialog(parent), m_installer
|
||||||
// installer
|
// installer
|
||||||
m_installerIndex = model->rowCount();
|
m_installerIndex = model->rowCount();
|
||||||
|
|
||||||
item = new QStandardItem(tr("Ryzom Installer"));
|
item = new QStandardItem(tr("Installer"));
|
||||||
|
item->setCheckable(true);
|
||||||
|
model->appendRow(item);
|
||||||
|
|
||||||
|
// downloaded files
|
||||||
|
m_downloadedFilesIndex = model->rowCount();
|
||||||
|
|
||||||
|
item = new QStandardItem(tr("Downloaded Files"));
|
||||||
item->setCheckable(true);
|
item->setCheckable(true);
|
||||||
model->appendRow(item);
|
model->appendRow(item);
|
||||||
|
|
||||||
|
@ -148,6 +155,10 @@ void CUninstallDialog::setSelectedComponents(const SComponents &components)
|
||||||
// installer
|
// installer
|
||||||
item = model->item(m_installerIndex);
|
item = model->item(m_installerIndex);
|
||||||
if (item) item->setCheckState(components.installer ? Qt::Checked : Qt::Unchecked);
|
if (item) item->setCheckState(components.installer ? Qt::Checked : Qt::Unchecked);
|
||||||
|
|
||||||
|
// downloaded files
|
||||||
|
item = model->item(m_downloadedFilesIndex);
|
||||||
|
if (item) item->setCheckState(components.downloadedFiles ? Qt::Checked : Qt::Unchecked);
|
||||||
}
|
}
|
||||||
|
|
||||||
SComponents CUninstallDialog::getSelectedCompenents() const
|
SComponents CUninstallDialog::getSelectedCompenents() const
|
||||||
|
@ -187,6 +198,10 @@ SComponents CUninstallDialog::getSelectedCompenents() const
|
||||||
item = model->item(m_installerIndex);
|
item = model->item(m_installerIndex);
|
||||||
res.installer = item && item->checkState() == Qt::Checked;
|
res.installer = item && item->checkState() == Qt::Checked;
|
||||||
|
|
||||||
|
// downloaded files
|
||||||
|
item = model->item(m_downloadedFilesIndex);
|
||||||
|
res.downloadedFiles = item && item->checkState() == Qt::Checked;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@ private:
|
||||||
IDIndicesMap m_profilesIndices;
|
IDIndicesMap m_profilesIndices;
|
||||||
|
|
||||||
int m_installerIndex;
|
int m_installerIndex;
|
||||||
|
int m_downloadedFilesIndex;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue