Add infos into target window
[ryzomcore.git] / ryzom / client / data / gamedev / interfaces_v3 / phrase.xml
blob9cde224adec9f2d236068c50a22837fc9b7c62a6
1 <interface_config>
3 <root id="interface" x="0" y="0" w="800" h="600" active="true" />
6 <!-- ************** -->
7 <!-- * PHRASE MAIN * -->
8 <!-- ************** -->
10 <!-- search "DEPENDS on %phrase_max_restrict_combat" if you have to change this value" -->
11 <define id="phrase_max_restrict_combat" value="15"/>
12 <!-- Definition of all combat Skill (ie weapons) we want to see in weapon restriction.
13         Code deduce the icons (fake sbrick) to draw, by filling UI:PHRASE:BUILD:RESTRICT_COMBAT:*:SHEET
14         the number of skill must be == %phrase_max_restrict_combat (nlassert)
15 -->
16 <define id="phrase_def_skill_restrict_combat" value="SFM1SSM SFM1SAM SFM1BMM SFM1BSM SFM1PSM SFM2SSM SFM2SAM SFM2BMM SFM2PPM SFMCADM SFMCAHM SFR1APM SFR2AAM SFR2ALM SFR2ARM"/>
19 <variable entry="UI:SAVE:PHRASE:BOOK_AS_LIST_TEXT"  type="sint32" value="1" />
20 <variable entry="UI:SAVE:PHRASE:BOOK_AUTOFOLD"  type="sint32" value="1" />
21 <variable entry="UI:PHRASE:BUILD:TOTAL_COST"  type="sint32" value="0" />
22 <variable entry="UI:PHRASE:BUILD:TOTAL_CREDIT"  type="sint32" value="0" />
23 <variable entry="UI:PHRASE:BUILD:ROOT_EFFECT_VALID"  type="sint32" value="0" />
24 <variable entry="UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED"  type="sint32" value="0"/>
25 <variable entry="UI:PHRASE:BUILD:RESTRICT_COMBAT:$i:SHEET"  type="sint32" value="0" size="%phrase_max_restrict_combat" />
26 <variable entry="UI:PHRASE:BUILD:RESTRICT_COMBAT:$i:LOCKED"  type="sint32" value="0" size="%phrase_max_restrict_combat" />
27 <variable entry="UI:VARIABLES:LINKS_INFOS"  type="sint32" value="0" />
30 <proc id="phrase_book_opened">
31         <action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:ACTIONS|value=1"/>
32         <!--<action handler="context_help_html" params="action_drag_drop"/>-->
33 </proc>
36 <!-- Spell_Book Frame def-->
37 <define id="phrase_book_main_w" value="610" />
38 <define id="phrase_book_filter_w" value="382" />
39 <define id="phrase_book_list_w" value="216" />
40 <define id="phrase_book_line_maxw" value="176" />
43 <!-- * SKILL template skill * -->
44 <template name="tips_skill" keep="true" posparent="parent" posref="TL TL" h="30" id="" skillid="" >
46         <group id="#id" w="160" h="#h" posparent="#posparent" posref="#posref" >
48                 <instance template="frame_widget" id="frame" posref="TL TL" sizeref="wh" w="0" h="0" x="0" />
49                 <view type="bitmap" id="back" scale="true" posref="TL TL" x="1" y="-1" sizeref="hw" h="-2" w="-2" texture="blank.tga" color="28 28 28 255" global_color="false"/>
51                 <!-- do not change id (used for setting right skill name) -->
52                 <group id="group_name" x="0" sizeref="wh" w="0" h="0" posref="TL TL" >
53                         <view type="text" id="name" fontsize="10" x="1" y="-3" posref="TM TM" shadow="true" global_color="false" line_maxw="156"
54                                 over_extend_view_text="true" over_extend_parent_rect="true" />
55                 </group>
57                 <!-- Show Value of the skill and the Cap_Skill. Do not change the ids. -->
58                 <view type="text"                id="max" posref="BR BR" x="-4"  y="0" fontsize="10" shadow="true" global_color="false" />
59                 <view type="text"                id="sep" posparent="max" posref="BL BR" x="-2" y="0" fontsize="10" shadow="true" hardtext="/" global_color="false" />
60                 <view type="text"                id="bas" posparent="sep" posref="BL BR" x="-2" y="0" fontsize="10" shadow="true" global_color="false" />
61                 <view type="text_number" id="lvl" posparent="bas" posref="BL BR" x="-2" y="0" fontsize="10" shadow="true" value="%player_skills:#skillid:%skill" positive="true" global_color="false" />
62                 <view type="bar" id="progress" posref="BL BL" x="4" y="4" mini="true" value="%player_skills:#skillid:%skill_progress" range="255" />
65                 <!-- Buf Debuf. -->
66                 <link expr="ifthenelse(lt(@%player_skills:#skillid:%skill, @%player_skills:#skillid:%skill_base), '%skill_neg_buf',
67                                         ifthenelse(gt(@%player_skills:#skillid:%skill, @%player_skills:#skillid:%skill_base), '%skill_pos_buf', '255 255 255 255' ) )"
68                                                                 target="lvl:color" />
69                 <link expr="getSkillBaseText(@%player_skills:#skillid:%skill, @%player_skills:#skillid:%skill_base)"
70                                                                 target="bas:hardtext" />
72                 <!-- Change Skill Background Color -->
73                 <link expr="ifthenelse(eq(@%player_skills:#skillid:%skill_base, 0), '60 90 90 64',
74                                                  ifthenelse(not(isSkillAtMax(#skillid,@UI:VARIABLES:TRACK_SKILL_CHANGE)), '175 100 10 192', '145 155 20 192'))" target="back:color" />
77                 <!-- Skill not At Max or not 0: show progress & change name Y-->
78                 <link expr="and(ne(@%player_skills:#skillid:%skill_base, 0),not(isSkillAtMax(#skillid,@UI:VARIABLES:TRACK_SKILL_CHANGE)))" target="progress:active,max:active,sep:active,bas:active,lvl:active" />
79                 <link expr="ifthenelse(and(ne(@%player_skills:#skillid:%skill_base, 0),not(isSkillAtMax(#skillid,@UI:VARIABLES:TRACK_SKILL_CHANGE))), '-3' ,'-11')" target="group_name:name:y" />
81         </group>
83 </template>
86 <!-- * template for Phrase Section display -->
87 <template name="template_phrase_progression_section" keep="true" posparent="parent" id="" >
88         <group id="#id" posref="TL TL" x="0" y="0" h="26" child_resize_w="true" >
89                 <view type="text" id="name" posref="ML ML" x="0" y="-8" shadow="true" global_color="false" color="255 255 255 255" fontsize="10"/>
90         </group>
91 </template>
94 <!-- * template for Phrase as Icon List -->
95 <template name="template_phrase_action_icon_list" id="" dbentry="" >
96         <group type="list_sheet_icon_phrase" nature="sphrase" id="#id" value="#dbentry" array="false"
97                 posref="TL TL" x="0" y="0" sizeref="wh" w="0" h="0"
98                 wspace="4" hspace="4" dragable="true" rowmax="32" lmargin="10" tmargin="2" bmargin="0"
99                 onclick_r="open_help_auto" oncandrag="phrase_can_drag_castable"  auto_grayed="true" >
101                 <ctrl style="skin_scroll" id="scroll_row" posref="TL TL" target_stepy="26" />
103         </group>
104         <view type="bitmap" id="sep1" posparent="#id" posref="BL TL" scale="true" sizeref="w" h="2" y="0" texture="W_line_hor.tga" />
105         <link expr="eq(@UI:SAVE:PHRASE:BOOK_AS_LIST_TEXT,0)" target="#id:active,sep1:active" />
106 </template>
109 <!-- * template for Phrase as Text List -->
110 <template name="template_phrase_action_text_list" id="" dbentry="" >
111         <group type="list_sheet_text_phrase" nature="sphrase" id="#id" value="#dbentry" array="false"
112                 child_resize_h="false"
113                 posref="TL TL" x="0" y="0" sizeref="wh" w="0" h="0"
114                 hspace="4" selection="false"
115                 onclick_r="open_help_auto" oncandrag="phrase_can_drag_castable"
116                 xitem="2" yitem="-2" xtext="30" ytext="-2"
117                 dragable="true" auto_grayed="true" gray_text_with_ctrl="true"
118                 over_color="%bot_chat_sheet_selection_normal"
119                 over_col_pushed="%bot_chat_sheet_selection_pushed"
120                 over_col_over="%bot_chat_sheet_selection_over"
121                 color="255 255 255 255" fontsize="8" shadow="true"
122                 multi_line="true" multi_line_space="0" >
123                 <!-- the scroll -->
124                 <ctrl style="skin_scroll" id="scroll_row" posref="TL TL" target_stepy="30" />
126                 <!-- the group to scroll -->
127                 <group id="list" max_sizeref="h" max_sizeparent="parent" max_h="0" sizeref="w" posref="TL TL" x="8" y="0" w="-16" />
128         </group>
129         <view type="bitmap" id="sep2" posparent="#id" posref="BL TL" scale="true" sizeref="w" h="2" y="0" texture="W_line_hor.tga" />
130         <link expr="eq(@UI:SAVE:PHRASE:BOOK_AS_LIST_TEXT,1)" target="#id:active,sep2:active" />
131 </template>
135 <!-- **** Main container SKILLS PROGRESSION & ACTIONS -->
136 <group type="container" id="phrase_book" title="uiMK_Actions" global_color="false" opened="true" openable="false"
137         movable="true" active="true" header_color="UI:SAVE:WIN:COLORS:INV"
138         on_active="proc"        on_active_params="phrase_book_opened"
139         on_deactive="set" on_deactive_params="dblink=UI:VARIABLES:ISACTIVE:ACTIONS|value=0"
140         help_page="interf_action_book.html"
141         resizer="true"  w="610" h="400" pop_min_w="420" pop_min_h="300" pop_max_w="1024" pop_max_h="768"
145         <group id="header_closed" x="0" y="0" w="0" h="16" posref="TL TL" >
146         </group>
148         <group id="header_opened" x="0" y="0" w="0" h="16" posref="TL TL"
149                  group_onclick_r="active_menu"
150                  group_params_r="menu=ui:interface:base_menu_with_color" >
152                  <group id="death_malus" posref="MR MR" w="80" h="10" x="-32" y="0" >
153                          <view type="bar" id="xp_malus" posref="MR MR" mini="true" color="255 255 255 255" value="SERVER:USER:DEATH_XP_MALUS" range="255" />
154                          <ctrl type="tooltip" id="tt_malus" tooltip="uittPhraseXPMalus" tooltip_parent="win" posref="TL TL" x="0" y="0" sizeref="w" w="0" h="10" />
156                          <view type="bitmap" id="death" posref="TL TL" texture="w_death.tga" global_color="false" />
157                 </group>
158                 <link expr="ne(@SERVER:USER:DEATH_XP_MALUS,255)" target="death_malus:active" />
159         </group>
162         <group id="content" x="0" y="0" sizeref="wh" w="0" h="0" posref="TL TL" >
164                 <!-- SKILLS -->
165                 <group type="skills_displayer" id="content" posref="TL TL" x="0" y="-6" sizeref="w6h" w="0" h="-24" template_skill="tips_skill"
166                         node_handler="phrase_book_skill_filter" >
168                         <group id="sbtree" posref="TL TL" sizeref="wh" w="0" x="0" y="0" h="0" >
169                                 <group id="black" posref="TL TL" sizeref="wh" x="10" w="-10" h="0" inherit_gc_alpha="true"/>
170                                 <instance template="inner_thin_border" posparent="black" inherit_gc_alpha="true"/>
172                                 <group id="tree_list" type="tree" posref="TL TL" x="14" y="-2"
173                                                 col_over="255 255 255 150" col_select="255 255 255 255" fontsize="10"
174                                                 max_sizeparent="parent" max_sizeref="wh" max_w="-16" max_h="-8"
175                                                 arbo_open_first="skill_arbo_open_first.tga"
176                                                 arbo_close_just_one="skill_arbo_close_just_one.tga"
177                                                 arbo_son_without_son="skill_arbo_son_without_son.tga"
178                                                 arbo_son_last="skill_arbo_son_last.tga"
179                                                 arbo_son="skill_arbo_son.tga"
180                                                 arbo_level="skill_arbo_level.tga"
181                                                 arbo_x_extend="skill_arbo_x_extend.tga"
182                                                 select_ancestor_on_close="true"
183                                                 navigate_one_branch="true"
184                                                 rectangle_outline="true"
185                                                 rectangle_w="160"
186                                                 rectangle_h="30"
187                                                 rectangle_x="0"
188                                                 rectangle_y="0"
189                                                 rectangle_drl="1"
190                                                 >
191                                 </group>
193                                 <ctrl style="skin_scroll" id="scroll_bar" posref="TL TL" target="tree_list" target_stepy="32" />
195                         </group>
196                 </group>
199                 <!-- ACTION TYPE SELECTION -->
200                 <group id="tab_group" posref="TR TR" x="-4" y="-8" sizeref="w4" w="-4" h="24" >
201                         <group type="tab" id="action_select" posref="TL TL" x="0" y="0" child_resize_w="true" h="24" >
202                                 <ctrl style="tab_button_new" id="tab0" x="0" posref="TL TL"     group="content:progress_actions"        hardtext="uitabPhraseActions"   onclick_l="" params_l="" tooltip="uittPhraseActions" tooltip_parent="win" />
203                                 <ctrl style="tab_button_new" id="tab1" posparent="tab0"         group="content:progress_upgrades"       hardtext="uitabPhraseUpgrades"  onclick_l="" params_l="" tooltip="uittPhraseUpgrades" tooltip_parent="win" />
204                         </group>
205                         <view type="bitmap" id="septab" posparent="action_select" posref="BR BL" sizeparent="parent" sizeref="w" w="0" h="1" scale="true" texture="blank.tga" color="166 166 166 255" />
206                 </group>
209                 <!-- PROGRESSION ACTIONS -->
210                 <group id="progress_actions" posref="TR TR" x="-4" y="-36" sizeref="w4h" w="-4" h="-60" >
211                         <!-- Raw List of Phrase -->
212                         <instance template="template_phrase_action_icon_list" id="list_icon" dbentry="UI:PHRASE:PROGRESS_ACTIONS" />
213                         <!-- Text List of Phrase -->
214                         <instance template="template_phrase_action_text_list" id="list_text" dbentry="UI:PHRASE:PROGRESS_ACTIONS" />
215                 </group>
218                 <!-- PROGRESSION UPGRADES -->
219                 <group id="progress_upgrades" posref="TR TR" x="-4" y="-36" sizeref="w4h" w="-4" h="-60" >
220                         <!-- Raw List of Phrase -->
221                         <instance template="template_phrase_action_icon_list" id="list_icon" dbentry="UI:PHRASE:PROGRESS_UPGRADES" />
222                         <!-- Text List of Phrase -->
223                         <instance template="template_phrase_action_text_list" id="list_text" dbentry="UI:PHRASE:PROGRESS_UPGRADES" />
224                 </group>
227                 <!-- TOGGLE List / Details -->
228                 <instance template="check_box" id="details" posref="BR BR" hardtext="uiPhraseDisplayTextList" dblink="UI:SAVE:PHRASE:BOOK_AS_LIST_TEXT" />
230                 <!-- TOGGLE AutoFold / Not -->
231                 <instance template="check_box" id="autofold" posref="BL BL" hardtext="uiPhraseAutoFold" dblink="UI:SAVE:PHRASE:BOOK_AUTOFOLD" />
232                 <link expr="@UI:SAVE:PHRASE:BOOK_AUTOFOLD" target="content:sbtree:tree_list:navigate_one_branch" />
235         </group>
236 </group>
239 <!-- ******************************************** -->
240 <!-- * PHRASE BRICK SELECTION                                   * -->
241 <!-- ******************************************** -->
244 <!-- Define varaibles for the list sheet of the root brick selection modal-->
245 <define id="phrase_brick_selection_max" value_from_code="getPhraseBrickSelectionMax()" />
246 <variable entry="UI:PHRASE:SELECT:$i:SHEET" type="sint32" value="0" size="%phrase_brick_selection_max" />
248 <!-- The modal for Brick selection -->
249 <!--<group type="modal" id="build_phrase_select_brick" x="0" y="0" w="184" posref="BL TL" child_resize_h="true" child_resize_hmargin="4"
250         exit_click_l="true" >
251         <group type="list_sheet" nature="sbrick" brick_over="true" id="list" posref="TL TL" value="UI:PHRASE:SELECT" wspace="4" hspace="4" array="false" x="4" y="-4" w="176"
252                 onclick_l="phrase_validate_brick" params_l="src=ctrl_launch_modal" onclick_r="open_sbrick_help" >
253         </group>
254 </group>
257 <!-- The modal for Brick selection. NB: don't exit on lclick cause of scrollbar -->
258 <group type="modal" id="build_phrase_select_brick" x="0" y="0" w="285" posref="BL TL" child_resize_h="true" child_resize_hmargin="4" options="skin_modal" >
259                 <!-- This group is here only to ensure that the modal is not too small -->
260                 <group id="fake_minh" posref="TL TL" sizeref="w" w="0" h="30" />
262                 <!-- The Selection group -->
263                 <group type="list_sheet_compo_brick" id="list" sizeref="w" w="-12" child_resize_h="true" child_resize_hmargin="0"
264                          posref="TL TL"
265                          x="4"
266                          y="-4"
267                          xitem="2" yitem="-2"
268                          xtext="32" ytext="-2"
269                          xcost="235" ycost="-8"
270                          hspace="4"
271                          array="false"
272                          value="UI:PHRASE:SELECT"
273                          selection="false"
275                          dragable="false"
276                          nature="sbrick"
277                          brick_over="true"
278                          onclick_l="phrase_validate_brick" params_l="src=ctrl_launch_modal"
279                      onclick_r="open_sbrick_help"
281                          over_color="%bot_chat_sheet_selection_normal"
282                          over_col_pushed="%bot_chat_sheet_selection_pushed"
283                          over_col_over="%bot_chat_sheet_selection_over"
285                          color="255 255 255 255"
286                          fontsize="8"
287                          shadow="true"
288                          multi_line="true"
289                          multi_line_space="0"
290                          line_maxw="210"
291                         >
292                         <!-- the scroll -->
293                         <ctrl style="skin_scroll" id="scroll_row" posref="TL TL" y="-2" />
295                         <!-- the group to scroll -->
296                         <group id="list" sizeref="w" posref="TL TL" max_h="300" x="8" y="0" w="-8" h="0" />
297                 </group>
298 </group>
300 <!-- ******************************** -->
301 <!-- * PHRASE COMPOSITION           * -->
302 <!-- ******************************** -->
304 <!-- Max Slots for phrase composition -->
305 <define id="phrase_max_brick" value="64" />
307 <!-- ******************************** -->
308 <!-- * Phrase icon select           * -->
309 <!-- ******************************** -->
310 <variable entry="UI:PHRASE:BUILD:ICON:$i:SHEET"  type="sint32" value="0" size="%phrase_max_brick" />
311 <variable entry="UI:PHRASE:BUILD:ICON:$i:INDEX"  type="sint32" value="0" size="%phrase_max_brick" />
313 <proc id="proc_phrase_set_icon">
314         <action handler="phrase_set_icon" params="index=@0" />
315         <action handler="leave_modal"/>
316 </proc>
317 <template name="ctrl_phrase_select_icon" posparent="parent" posref="" x="0" y="0" index="" id="" >
318         <ctrl type="sheet" id="#id" nature="sbrick" value="UI:PHRASE:BUILD:ICON:#index" posparent="#posparent" posref="#posref"
319                 x="#x" y="#y" auto_grayed="true" onclick_l="proc" params_l="proc_phrase_set_icon|#index"/>
320         <link expr="ne(@UI:PHRASE:BUILD:ICON:#index:SHEET,0)" target="#id:active" />
321 </template>
323 <group type="modal" id="build_phrase_select_icon" x="0" y="0" w="0" h="0" posref="BL TL" child_resize_w="true" child_resize_wmargin="8" child_resize_h="true" child_resize_hmargin="8" options="skin_modal" >
324                 <!-- This group is here only to ensure that the modal is not too small -->
325                 <group id="fake_minh" posref="TL TL" sizeref="w" w="0" h="30" />
327                 <!-- this depends on phrase_max_brick values -->
328                 <vector template="ctrl_phrase_select_icon" _firstindex="0"  _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-4" _nextpos="TR TL" />
329                 <vector template="ctrl_phrase_select_icon" _firstindex="8"  _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-30" _nextpos="TR TL" />
330                 <vector template="ctrl_phrase_select_icon" _firstindex="16" _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-56" _nextpos="TR TL" />
331                 <vector template="ctrl_phrase_select_icon" _firstindex="24" _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-82" _nextpos="TR TL" />
332                 <vector template="ctrl_phrase_select_icon" _firstindex="32" _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-108" _nextpos="TR TL" />
333                 <vector template="ctrl_phrase_select_icon" _firstindex="40" _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-134" _nextpos="TR TL" />
334                 <vector template="ctrl_phrase_select_icon" _firstindex="48" _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-160" _nextpos="TR TL" />
335                 <vector template="ctrl_phrase_select_icon" _firstindex="56" _size="8" id="brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-186" _nextpos="TR TL" />
336 </group>
338 <!-- ******************************** -->
339 <!-- * PHRASE COMPOSITION ELEMENTS  * -->
340 <!-- ******************************** -->
342 <!-- Ctrls for a Parameter -->
343 <template name="ctrl_phrase_param" id="" index="" paramindex="" posparent="" x="4" y="0" >
344         <view type="bitmap" id="param_back#index_#paramindex" posref="TR TL" posparent="#posparent" x="#x" y="#y" texture="W_slot_brick.tga" color="255 255 255 192" />
345         <ctrl type="sheet" id="param_brick#index_#paramindex" nature="sbrick" value="UI:PHRASE:BUILD:PARAM:#index:#paramindex" posref="TL TL" posparent="param_back#index_#paramindex" x="0" y="0"
346                 onclick_l="phrase_select_param_brick" params_l="index=#index|param_index=#paramindex" onclick_r="open_sbrick_help" />
347 </template>
350 <!-- This define the special maxw of the root text info -->
351 <define id="phrase_build_root_info_maxw" value="200" />
353 <!-- Ctrls for a Root/Mandatory/Optional Brick and its parameters instanciation -->
354 <template name="ctrl_phrase_main" posref="" posparent="parent" x="0" y="-2" index="" id="" >
355         <!-- The Main Suffix Brick -->
356         <view type="bitmap" id="main_back#index" posref="#posref" posparent="#posparent" x="#x" y="#y" texture="W_slot_brick.tga" color="255 255 255 192" />
357         <ctrl type="sheet" id="main_brick#index" nature="sbrick" value="UI:PHRASE:BUILD:MAIN:#index" posref="TL TL" posparent="main_back#index" x="0" y="0"
358                 onclick_l="phrase_select_main_brick" params_l="index=#index" onclick_r="open_sbrick_help" tooltip="uittSelectBrick" />
359         <view type="text" id="main_cost#index" posparent="main_brick#index" posref="MR ML" x="128" y="-2" color="255 210 11 255" shadow="true" fontsize="10" />
360         <view type="text" id="main_credit#index" posparent="main_brick#index" posref="MR ML" x="172" y="-2" color="80 217 11 255" shadow="true" fontsize="10" />
361         <view type="text" id="main_info#index" posparent="main_brick#index" posref="MR ML" x="8" y="-1" color="255 255 255 255" shadow="true" fontsize="10"
362                 multi_line="true" line_maxw="116" multi_line_space="0" />
363         <!-- The 4 Params Brick (hardcoded). Relative to Suffix then each other -->
364         <instance template="ctrl_phrase_param" id="param_back#index_0" index="#index" paramindex="0" posparent="main_back#index" x="8" />
365         <instance template="ctrl_phrase_param" id="param_back#index_1" index="#index" paramindex="1" posparent="param_back#index_0" />
366         <instance template="ctrl_phrase_param" id="param_back#index_2" index="#index" paramindex="2" posparent="param_back#index_1" />
367         <instance template="ctrl_phrase_param" id="param_back#index_3" index="#index" paramindex="3" posparent="param_back#index_2" />
368 </template>
371 <!-- ****************************** -->
372 <!-- * PHRASE COMPOSITION MAIN    * -->
373 <!-- ****************************** -->
375 <template name="box_widget_color" posref="TL TL" x="0" y="0" w="64" h="16"  id="" posparent="parent" sizeref="" color="" keep="true">
376         <group id="#id" posparent="#posparent" posref="#posref" w="#w" h="#h" x="#x" y="#y" color="#color" sizeref="#sizeref" >
377                 <group id="bg" sizeref="hw" h="0" w="0" />
378                 <view type="bitmap" id="back" scale="true" posparent="bg" posref="MM MM" sizeref="hw" h="-8" w="-8" texture="W_box_blank.tga" color="#color" global_color="false" inherit_gc_alpha="true"/>
379                 <view type="bitmap" id="bg" scale="true" sizeref="hw" h="0" w="0" texture="W_box_blank.tga" color="#color" global_color="false" inherit_gc_alpha="true"/>
380                 <view type="bitmap" id="tlb" texture="W_box_top_left.tga"  posref="TL TL" color="#color" global_color="false" inherit_gc_alpha="true"/>
381                 <view type="bitmap" id="trb" texture="W_box_top_right.tga"  posref="TR TR" color="#color" global_color="false" inherit_gc_alpha="true"/>
382                 <view type="bitmap" id="brb" texture="W_box_bot_right.tga"  posref="BR BR" color="#color" global_color="false" inherit_gc_alpha="true"/>
383                 <view type="bitmap" id="blb" texture="W_box_bot_left.tga" posref="BL BL" color="#color" global_color="false" inherit_gc_alpha="true"/>
384                 <view type="bitmap" id="tb" texture="W_box_top.tga" posref="TM TM" scale="true" sizeref="w" w="-8" h="4" color="#color" global_color="false" inherit_gc_alpha="true"/>
385                 <view type="bitmap" id="bb" texture="W_box_bot.tga" posref="BM BM" scale="true" sizeref="w" w="-8" h="4" color="#color" global_color="false" inherit_gc_alpha="true"/>
386                 <view type="bitmap" id="lb" texture="W_box_left.tga" posref="ML ML"  scale="true" sizeref="h" h="-8" w="4" color="#color" global_color="false" inherit_gc_alpha="true"/>
387                 <view type="bitmap" id="rb" texture="W_box_right.tga" posref="MR MR" scale="true" sizeref="h" h="-8" w="4" color="#color" global_color="false" inherit_gc_alpha="true"/>
388         </group>
389 </template>
391 <!-- brick to show weapon restriction -->
392 <template name="ctrl_combat_restrict" posparent="parent" posref="" x="0" y="0" index="" id="" >
393         <ctrl type="sheet" id="#id" nature="sbrick" value="UI:PHRASE:BUILD:RESTRICT_COMBAT:#index" posparent="#posparent" posref="#posref"
394                 x="#x" y="#y" auto_grayed="true" on_tooltip="phrase_combat_restrict_tooltip" />
395 </template>
397 <!-- Composition Modal container-->
398 <group style="container_modal" id="phrase_composition" w="272" h="440" title="uiPhraseCreate"
399         modal_parent="phrase_book"   header_color="UI:SAVE:WIN:COLORS:INV" pop_max_h="700"
400         on_enter="phrase_validate_on_enter"
401         on_active="set" on_active_params="dblink=UI:VARIABLES:PHRASE_COMPOSITION:ACTIVE|value=1"
402         on_deactive="set" on_deactive_params="dblink=UI:VARIABLES:PHRASE_COMPOSITION:ACTIVE|value=0"
403         >
405         <group id="header_closed" x="0" y="0" w="0" h="16" posref="TL TL" >
406         </group>
408         <group type="build_phrase" id="header_opened" x="0" y="0" w="0" h="0" posref="TL TL" >
410                 <!-- RESTRICT -->
411                 <group id="restrict" posref="TM TM" w="256" h="66" x="0" y="-59">
412                         <view type="text" id="restrict_text" posref="TL BL" x="0" y="-15" color="255 255 255 255" fontsize="10" shadow="true" hardtext="uiPhraseRESTRICTION" />
413                         <!-- Organize in 2 rows. DEPENDS on %phrase_max_restrict_combat  -->
414                         <vector template="ctrl_combat_restrict" _firstindex="0" _size="9" id="combat_brick$i" index="$i" _firstpos="TL TL  " _xfirst="4" _yfirst="-13" _nextpos="TR TL" />
415                         <vector template="ctrl_combat_restrict" _firstindex="9" _size="6" id="combat_brick$i" index="$i" _firstpos="TL TL" _xfirst="4" _yfirst="-39" _nextpos="TR TL" />
416                 </group>
417                 <link expr="@UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED" target="restrict:active" />
419                 <!-- BACK -->
420                 <group id="back" posref="TM TM" w="256" h="0" x="0" y="-74">
421                         <instance template="box_widget" id="back_root" posref="TL TL" w="256" h="0" x="0" y="0" />
422                         <view type="bitmap" id="col1" scale="true" posparent="back_root" posref="TR TR" h="278" w="40" x="-51" y="-34" texture="W_box_blank.tga" color="0 0 0 64" inherit_gc_alpha="true"/>
423                         <view type="bitmap" id="col2" scale="true" posparent="back_root" posref="TR TR" h="278" w="40" x="-7" y="-34" texture="W_box_blank.tga" color="0 0 0 64" inherit_gc_alpha="true"/>
424                         <link expr="ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0)" target="col1:active" />
425                         <link expr="ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0)" target="col2:active" />
426                 </group>
427                 <link expr="ifthenelse(ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0), 316, 66)" target="back:h" />
428                 <link expr="ifthenelse(ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0), 316, 66)" target="back:back_root:h" />
429                 <link expr="ifthenelse(ne(@UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED,0), -142, -74)" target="back:y" />
432                 <!-- NEW OP BUTTON. -->
433                 <group id="new_buttons" posparent="back" posref="TM TM" x="0" y="-8" child_resize_w="true" child_resize_h="true" >
435                         <ctrl style="new_element_content" id="new_optional_button" posref="TL TL" y="0" wmargin="8" hardtext="uittPhraseEditNewOptional"
436                                  onclick_l="phrase_select_new_brick" params_l="type=optional"/>
438                         <ctrl style="new_element_content" id="new_credit_button" posref="TR TL" posparent="new_optional_button" x="4" y="0"
439                                 wmargin="8" hardtext="uittPhraseEditNewCredit" onclick_l="phrase_select_new_brick" params_l="type=credit"/>
441                 </group>
442                 <!-- display only if root and effects are valid -->
443                 <link expr="@UI:PHRASE:BUILD:ROOT_EFFECT_VALID" target="new_buttons:active" />
446                 <!-- SPELL ICON -->
447                 <ctrl type="sheet" id="spell_view" nature="sphraseid" posref="TL BL" x="4" y="-56" value="UI:PHRASE:BUILD:EDITION_PHRASE" tooltip="uittActionIcon" onclick_l="phrase_select_icon" />
448                 <view type="text" id="spell_view_name" posparent="spell_view" posref="TL BL" x="0" y="-3" color="255 255 255 255" fontsize="10" shadow="true" hardtext="uiPhraseEditIcon" />
449                 <!-- Hide only the Icon if no composition starter (game design request) -->
450                 <link expr="ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0)" target="spell_view:active" />
453                 <!-- NAME OF SPELL -->
454                 <instance template="edit_box_widget"  id="eb_spell_name" posref="TR BR" x="0" w="216" y="-54" h="20" child_resize="false"
455                                 text_x="0" text_y="0" text_ref="ML ML"
456                                 fontsize="12" multi_line="false" max_num_chars="20"
457                                 enter_loose_focus="true" enter_recover_focus="false" prompt="" reset_focus_on_hide="true" onchange="phrase_change_name" />
458                 <view type="text" id="text_spell_name" posparent="eb_spell_name" posref="TL BL" x="0" y="-2" color="255 255 255 255" fontsize="10" shadow="true" hardtext="uiPhraseEditName" />
460                 <!-- INFOS -->
461                 <group id="infos" w="256" h="90" posparent="back" posref="BL TL" x="0" y="-4" >
463                         <!-- Sabrina Cost -->
464                         <view type="text" id="totaltext" posref="TL TL" fontsize="12" global_color="true" shadow="true" color="255 255 255 255" hardtext="uiPhraseTotal" />
465                         <view type="text_number" id="cost" posref="TL TM" fontsize="12" x="186" global_color="false" shadow="true" color="255 210 11 255" value="UI:PHRASE:BUILD:TOTAL_COST" />
466                         <view type="text_number" id="credit" posref="TL TM" fontsize="12" x="230" global_color="false" shadow="true" color="80 217 11 255" value="UI:PHRASE:BUILD:TOTAL_CREDIT" />
468                         <!-- Phrase DESC -->
469                         <view type="text" id="phrase_desc" posref="TL TL" x="0" y="-17" color="255 255 255 255" shadow="true" fontsize="10"
470                                 multi_line="true" multi_line_space="0" />
472                 </group>
473                 <link expr="ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0)" target="infos:active" />
475                 <!-- BALANCE -->
476                 <view type="bitmap" id="balance" posref="BM BM" x="0" y="34" texture="action_balance_equal.tga" global_color="false"/>
477                 <link expr="ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0)" target="balance:active" />
478                 <link expr="ifthenelse(eq(@UI:PHRASE:BUILD:TOTAL_COST,@UI:PHRASE:BUILD:TOTAL_CREDIT),'action_balance_equal.tga',
479                                                         ifthenelse(gt(@UI:PHRASE:BUILD:TOTAL_COST,@UI:PHRASE:BUILD:TOTAL_CREDIT),'action_balance_cost.tga',
480                                                                         'action_balance_cred.tga'))"
481                 target="balance:texture" />
482                 <view type="text" id="balancetext" posparent="balance" posref="BM TM" fontsize="10" global_color="false" shadow="true" color="255 255 255 255" hardtext="uiBalanceEqual" />
483                 <link expr="ne(@UI:PHRASE:BUILD:MAIN:0:SHEET,0)" target="balancetext:active" />
484                 <link expr="ifthenelse(eq(@UI:PHRASE:BUILD:TOTAL_COST,@UI:PHRASE:BUILD:TOTAL_CREDIT),'uiBalanceEqual',
485                                                         ifthenelse(gt(@UI:PHRASE:BUILD:TOTAL_COST,@UI:PHRASE:BUILD:TOTAL_CREDIT),'uiBalanceCost',
486                                                                         'uiBalanceCred'))"
487                 target="balancetext:hardtext" />
488                 <link expr="ifthenelse(eq(@UI:PHRASE:BUILD:TOTAL_COST,@UI:PHRASE:BUILD:TOTAL_CREDIT),'255 255 255 255',
489                                                         ifthenelse(gt(@UI:PHRASE:BUILD:TOTAL_COST,@UI:PHRASE:BUILD:TOTAL_CREDIT),'255 210 11 255',
490                                                                         '80 217 11 255'))"
491                 target="balancetext:color" />
495                 <view type="text" id="compo" posref="TL BL" posparent="back" x="0" y="0" fontsize="10" shadow="true" global_color="true" color="255 255 255 255" hardtext="uiPhraseCOMPOSITION" />
498                 <!-- The scroll group -->
499                 <group id="bricks" posparent="back" posref="TL TL" x="12" y="-32" w="244" child_resize_h="true" child_resize_hmargin="4" max_h="280" >
500                         <!-- List of Bricks -->
501                         <vector template="ctrl_phrase_main" id="main_back$i" _size="%phrase_max_brick" _firstpos="TL TL" _xfirst="4" _yfirst="-2" _nextpos="BL TL" index="$i" />
502                 </group>
503                 <ctrl style="skin_scroll" id="scroll_row" posparent="back" posref="TL TL" x="4" y="-34" target="bricks" target_stepy="28" />
507                 <!-- VALIDATION -->
508                 <instance template="button_ok_cancel" posref="BR BR" x="-4" y="4" onclick_ok="phrase_validate" ok_text="uittPhraseEditValidate"
509                                         onclick_cancel="set" onclick_cancel_param="target_property=ui:interface:phrase_composition:active|value=0" cancel_text="uittCancel" />
511         </group>
512         <link expr="ifthenelse( eq(@UI:PHRASE:BUILD:MAIN:0:SHEET,0), 190,
513                                                         ifthenelse(ne(@UI:PHRASE:BUILD:RESTRICT_COMBAT:ENABLED,0), 608, 540) )"
514                                         target="header_opened:h" />
516         <group id="content" x="0" y="0" w="0" h="0" posref="TL TL" >
517         </group>
519 </group>
522 <!-- ****************************** -->
523 <!-- * PHRASE FABER EXECUTION     * -->
524 <!-- ****************************** -->
526 <!-- constants -->
527 <define id="phrase_faber_selection_max" value_from_code="getPhraseMPSelectionMax()" />
528 <define id="phrase_faber_max_item_req" value="10" />    <!-- Max 5 item part, and 5 formula MPs -->
529 <define id="phrase_faber_max_mp_slot" value="36" />
531 <!-- Define varaibles for the list sheet of the mp selection modal-->
532 <variable entry="UI:PHRASE:FABER:MP_SELECT:$i:SHEET" type="sint32" value="0" size="%phrase_faber_selection_max" />
533 <variable entry="UI:PHRASE:FABER:MP_SELECT:$i:QUALITY" type="sint32" value="0" size="%phrase_faber_selection_max" />
534 <variable entry="UI:PHRASE:FABER:MP_SELECT:$i:QUANTITY" type="sint32" value="0" size="%phrase_faber_selection_max" />
535 <variable entry="UI:PHRASE:FABER:MP_SELECT:$i:USER_COLOR" type="sint32" value="0" size="%phrase_faber_selection_max" />
536 <variable entry="UI:PHRASE:FABER:MP_SELECT:$i:WEIGHT" type="sint32" value="0" size="%phrase_faber_selection_max" />
537 <!-- Define varaibles for the mp selected array-->
538 <template name="phrase_faber_def_build_mps" index="" id="" >
539         <variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:SHEET" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
540         <variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:QUALITY" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
541         <variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:QUANTITY" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
542         <variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:USER_COLOR" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
543         <variable entry="UI:PHRASE:FABER:MP_BUILD:#index:$i:WEIGHT" type="sint32" value="0" size="%phrase_faber_max_mp_slot" />
544 </template>
545 <vector template="phrase_faber_def_build_mps" id="yoyo_pipo_faber$i" index="$i" _size="%phrase_faber_max_item_req" _firstpos="TL TL" _xfirst="0" _nextpos="TR TL" _yfirst="0" />
546 <!-- Define varaibles for the plan selection -->
547 <variable entry="UI:PHRASE:FABER:FABER_PLAN:SHEET" type="sint32" value="0" />
548 <variable entry="UI:PHRASE:FABER:FABER_PLAN:HP_BUFF" type="sint32" value="0" />
549 <variable entry="UI:PHRASE:FABER:FABER_PLAN:SAP_BUFF" type="sint32" value="0" />
550 <variable entry="UI:PHRASE:FABER:FABER_PLAN:STA_BUFF" type="sint32" value="0" />
551 <variable entry="UI:PHRASE:FABER:FABER_PLAN:FOCUS_BUFF" type="sint32" value="0" />
552 <!-- Define varaibles for the Mp Quantity setup -->
553 <variable entry="UI:PHRASE:FABER:MP_QUANTITY:$i:SELECTED" type="sint32" value="0" size="%phrase_faber_max_item_req" />
554 <variable entry="UI:PHRASE:FABER:MP_QUANTITY:$i:REQUIRED" type="sint32" value="0" size="%phrase_faber_max_item_req" />
555 <!-- declare the dummy mp stack selection slot -->
556 <variable entry="UI:PHRASE:FABER:STACK_SELECT:SHEET" type="sint32" value="0" />
557 <variable entry="UI:PHRASE:FABER:STACK_SELECT:QUALITY" type="sint32" value="0" />
558 <variable entry="UI:PHRASE:FABER:STACK_SELECT:QUANTITY" type="sint32" value="0" />
559 <variable entry="UI:PHRASE:FABER:STACK_SELECT:USER_COLOR" type="sint32" value="0" />
560 <variable entry="UI:PHRASE:FABER:STACK_SELECT:WEIGHT" type="sint32" value="0" />
561 <!-- declare the dummy mp stack selection value -->
562 <variable entry="UI:PHRASE:FABER:STACK_SELECT:CUR_QUANTITY" type="sint32" value="0" />
563 <variable entry="UI:PHRASE:FABER:STACK_SELECT:MAX_QUANTITY" type="sint32" value="0" />
564 <!-- Define varaibles for the Result Item -->
565 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:SHEET" type="sint32" value="0" />
566 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:QUALITY" type="sint32" value="0" />
567 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:QUANTITY" type="sint32" value="0" />
568 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:USER_COLOR" type="sint32" value="0" />
569 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:LOCKED" type="sint32" value="0" />
570 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:WEIGHT" type="sint32" value="0" />
571 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:NAMEID" type="sint32" value="0" />
572 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:INFO_VERSION" type="sint32" value="0" />
573 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:ENCHANT" type="sint32" value="0" />
574 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:RM_CLASS_TYPE" type="sint32" value="0" />
575 <variable entry="UI:PHRASE:FABER:RESULT_ITEM:RM_FABER_STAT_TYPE" type="sint32" value="0" />
578 <!-- The modal for Mp selection. NB: x/y so the mouse is ready to click on first mp -->
579 <group type="modal" id="phrase_faber_mp_selection" posref="BL TL" x="-24" y="24" w="290"
580         child_resize_h="true" child_resize_hmargin="4" exit_click_out="true" options="skin_modal" >
582         <group type="list_sheet" nature="item" id="list" posref="TL TL" value="UI:PHRASE:FABER:MP_SELECT"
583                 wspace="4" hspace="4" array="false" x="4" y="-4" w="290" child_resize_h="true"
584                 rowmax="6" column_max="6" lmargin="10"
585                 onclick_l="phrase_faber_validate_mp" params_l="src=ctrl_launch_modal" onclick_r="open_item_help" >
587                 <!-- the scroll -->
588                 <ctrl style="skin_scroll" id="scroll_row" posref="TL TL" />
589         </group>
590 </group>
593 <!-- the modal For Mp Quantity Selection. NB: x/y so the mouse is ready to click "REMOVE" -->
594 <proc id="phrase_faber_remove_mp" >
595         <!-- set the quantity to  -->
596         <action handler="set" params="dblink=UI:PHRASE:FABER:STACK_SELECT:CUR_QUANTITY|value=0" />
597         <!-- then select the quantity -->
598         <action handler="phrase_faber_select_mp_quantity" />
599 </proc>
600 <group type="modal" id="phrase_faber_mp_quantity" exit_click_out="true"
601  posref="TL TL" w="185" h="100" x="-35" y="85"
602  on_enter="phrase_faber_select_mp_quantity" options="skin_modal"
604         <view type="text" id="text" posref="TL TL" x="4" y="-4" color="255 255 255 255" fontsize="12" shadow="true" global_color="false" hardtext="uiSelectQuantity" />
605         <ctrl type="sheet" id="sheet" onclick_r="open_help_auto" value="UI:PHRASE:FABER:STACK_SELECT" posref="MM MM" x="-26" y="0" use_quantity="false" />
606         <view type="text" id="x" posparent="sheet" posref="MR MM" x="8" y="0" color="255 255 255 255" fontsize="12" shadow="true" hardtext="X" />
607         <instance template="edit_box_widget" id="edit" entry_type="positive_integer" text_ref="TR TR" text_y="-1" fontsize="12"
608                         posparent="sheet" posref="MR ML" x="16" y="0" text_x="-2" w="32"
609                         prompt="" enter_loose_focus="false" multi_line="false" max_num_chars="3"
610                         onchange="editbox_number" onchange_params="value=UI:PHRASE:FABER:STACK_SELECT:CUR_QUANTITY|update_text=false|value=UI:PHRASE:FABER:STACK_SELECT:MAX_QUANTITY"
611                         onenter="phrase_faber_select_mp_quantity" max_historic="0" />
613         <instance template="button_ok_cancel" posref="BR BR" x="-4" y="4"
614                                 onclick_ok="phrase_faber_select_mp_quantity"
615                                 onclick_ok_param=""
616                                 onclick_cancel="leave_modal"
617                                 onclick_cancel_param="" />
619         <!-- the button to remove it (smae as set 0), on the left -->
620         <ctrl style="button_ok" id="button_remove" posref="BL BL" x="4" y="4"
621                 onclick_l="proc" params_l="phrase_faber_remove_mp" hardtext="uiFaberMpRemove" />
623 </group>
627 <!-- Template for a required item line -->
628 <template name="faber_item_req" posref="" posparent="parent" x="0" y="0" item_req="" id="" >
629         <group id="#id" x="#x" y="#y" posref="#posref" posparent="#posparent" w="350" child_resize_h="true" >
630                 <!-- The item part info Icon. Hidden if a formula MP and not an item part -->
631                 <view type="bitmap" id="icon" posref="TL TL" scale="true" x="5" y="0" w="24" h="24" global_color="false" />
633                 <!-- The item part/formula MP info text -->
634                 <view type="text" id="text" posref="TL TL" x="30" y="-8"
635                         color="255 255 255 255" global_color="true" fontsize="10" shadow="true" />
637                 <!-- The Quantity of item required info text -->
638                 <view type="text_quantity" id="text_quantity" posref="TR TR" x="0" y="-8"
639                         color="255 255 255 255" global_color="true" fontsize="10" shadow="true"
640                         value="UI:PHRASE:FABER:MP_QUANTITY:#item_req:SELECTED"
641                         valuemax="UI:PHRASE:FABER:MP_QUANTITY:#item_req:REQUIRED" />
643                 <!-- The list of item -->
644                 <group type="list_sheet" nature="item" id="list"
645                         posref="TL TL" x="8" y="-24" w="350" child_resize_h="true"
646                         wspace="8" hspace="8"
647                         value="UI:PHRASE:FABER:MP_BUILD:#item_req" array="false"
648                         auto_grayed="false"
649                         onclick_l="phrase_faber_select_mp" params_l="item_req=#item_req" onclick_r="open_item_help" tooltip="uittSelectMp" />
650         </group>
651 </template>
654 <!-- Template for a MPStat in Faber -->
655 <template name="template_mp_faber_stat" id="" x="0" y="-2" posparent="item_result" posref="" >
656         <group id="#id" posparent="#posparent" posref="#posref" x="#x" y="#y" w="380" h="18" active="false" >
657                 <view type="text" id="text" line_maxw="190" posref="ML ML" over_extend_view_text="true" />
658                 <view type="bar" id="bar" posref="MR MR" x="-55" value="0" range="100" />
659                 <view type="text" id="textstat" posref="MR MR" />
660                 <ctrl type="tooltip" id="tt" sizeref="wh" w="0" h="0" tooltip="" />
661         </group>
662 </template>
665 <!-- To know if Faber phrase is opened or not -->
666 <variable entry="UI:VARIABLES:ISACTIVE:PHRASE_FABER" type="sint32" value="0" />
667 <proc id="proc_phrase_faber_opened" >
668         <action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:PHRASE_FABER|value=1"/>
669 </proc>
670 <proc id="proc_phrase_faber_closed">
671         <action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:PHRASE_FABER|value=0"/>
672         <action handler="phrase_faber_on_close" />
673 </proc>
676 <!-- container modal on hand -->
677 <!--    on_enter="phrase_faber_validate_on_enter" -->
678 <group style="container_modal" id="phrase_faber_execution" w="800" h="516" title="uiPhraseFaberExecute"
679         modal_parent="gestionsets|bot_chat_missions"   header_color="UI:SAVE:WIN:COLORS:INV" pop_max_h="716"
680         on_active="proc" on_active_params="proc_phrase_faber_opened"
681         on_deactive="proc" on_deactive_params="proc_phrase_faber_closed"
682         >
684         <group id="header_closed" x="0" y="0" w="0" h="16" posref="TL TL" >
685         </group>
687         <group id="header_opened" x="0" y="0" w="0" h="496" posref="TL TL" >
688                 <!-- BACK -->
689                 <group id="back" posref="TL TL" w="792" h="424" x="0" y="-44">
690                         <instance template="box_widget" id="back_root" posref="TL TL" w="792" h="424" x="0" y="0" />
691                 </group>
693                 <!-- Help info -->
694                 <view type="text" id="select_info" posref="TL TL" x="8" y="-26" color="255 255 255 255" shadow="true" fontsize="12"
695                         multi_line="true" line_maxw="380" multi_line_space="0" hardtext="uiTextHelpSelectMp" />
696                 <link expr="ifthenelse(eq(@UI:PHRASE:FABER:FABER_PLAN:SHEET, 0), 'uiTextHelpSelectFaberPlan', 'uiTextHelpSelectMp')" target="select_info:hardtext" />
698                 <!-- The FaberPlan Brick -->
699                 <ctrl type="sheet" id="faber_plan" nature="sbrick" value="UI:PHRASE:FABER:FABER_PLAN" posref="TL TL" posparent="back" x="8" y="-6"
700                         onclick_l="phrase_faber_select_plan" onclick_r="open_sbrick_help" tooltip="uittSelectPlan" />
701                 <view type="text" id="faber_plan_info" posparent="faber_plan" posref="MR ML" x="8" y="-1" color="255 255 255 255" shadow="true" fontsize="10"
702                         multi_line="true" line_maxw="250" multi_line_space="0" hardtext="uiTextHelpSelectFaberPlanSlot" />
703                 <link expr="eq(@UI:PHRASE:FABER:FABER_PLAN:SHEET, 0)" target="faber_plan_info:active" />
705                 <view type="text" id="name" posparent="faber_plan" posref="TR TL" x="4" y="0" color="255 255 255 255" shadow="true" fontsize="10" multi_line="false" line_maxw="350" hardtext="" over_extend_view_text="true" />
706                 <view type="text" id="desc" posparent="name" posref="BL TL" x="0" y="0" color="255 255 255 255" shadow="true" fontsize="8" multi_line="false" line_maxw="350" hardtext="" over_extend_view_text="true" />
707                 <link expr="ne(@UI:PHRASE:FABER:FABER_PLAN:SHEET, 0)" target="name:active,desc:active" />
708                 <link expr="@UI:PHRASE:FABER:FABER_PLAN:SHEET" action="lua:game:updatePhraseFaberPreview('UI:PHRASE:FABER:FABER_PLAN:SHEET')" />
710                 <!-- The Success Rate info. Must be multiline for Formating -->
711                 <view type="text" id="success_text" posparent="back" posref="TL TL" x="8" y="-36" color="255 255 255 255" shadow="true" fontsize="12"
712                         multi_line="true" line_maxw="350" multi_line_space="0" hardtext="" />
713                 <link expr="ne(@UI:PHRASE:FABER:FABER_PLAN:SHEET, 0)" target="success_text:active" />
715                 <!-- The 10 item_req (itemParts and specific Formula items) -->
716                 <group id="back_slots" x="16" y="-56" posparent="back" posref="TL TL" w="368" h="312" >
717                         <instance template="inner_thin_border" inherit_gc_alpha="true" />
718                 </group>
719                 <group id="item_reqs" x="16" y="-60" posparent="back" posref="TL TL" child_resize_w="true" child_resize_h="true" max_h="304" >
720                         <vector template="faber_item_req" _size="%phrase_faber_max_item_req" id="item_req_$i" item_req="$i" _firstpos="TL TL" _nextpos="BL TL" x="0" y="0" />
721                 </group>
722                 <ctrl style="skin_scroll" id="sv" posparent="back" posref="TL TL" x="4" y="-60" target="item_reqs" />
724                 <!-- RESULT ITEM -->
725                 <group id="item_result" posparent="back" posref="TR TR" x="-10" y="-6" w="390" child_resize_h="true" max_h="375" >
726                         <instance template="inner_thin_border"  inherit_gc_alpha="true" />
728                         <!-- Text Header -->
729                         <view type="text" id="header" posref="TL TL" x="5" y="-2" hardtext="uiFaberItemResultHeader"/> <!-- for item, pacts, .. -->
731                         <!-- item result -->
732                         <ctrl type="sheet" id="item_result" nature="item" value="UI:PHRASE:FABER:RESULT_ITEM" posparent="header" posref="BL TL" y="-4" tooltip="uittFaberItemResult" />
733                         <view type="text" id="name" posparent="item_result" posref="TR TL" x="4" y="0" fontsize="10" multi_line="false" line_maxw="340" hardtext="uittFaberItemResult" over_extend_view_text="true" />
734                         <view type="text" id="desc" posparent="name" posref="BL TL" x="0" y="0" fontsize="8" multi_line="false" line_maxw="340" hardtext="..." over_extend_view_text="true" />
735                         <link expr="@UI:PHRASE:FABER:RESULT_ITEM:SHEET" action="lua:game:updatePhraseFaberPreview('UI:PHRASE:FABER:RESULT_ITEM:SHEET')" />
737                         <!-- buffs -->
738                         <view type="bitmap"      id="hp_icon"                           posref="TR TR" x="-2" y="-2" scale="true" w="16" h="16" texture="ico_heal.tga" />
739                         <view type="bitmap"      id="sap_icon"   posparent="hp_icon"    posref="BR TR" x="0" y="0"   scale="true" w="16" h="16" texture="ico_sap.tga" />
740                         <view type="bitmap"      id="sta_icon"   posparent="sap_icon"   posref="BR TR" x="0" y="0"   scale="true" w="16" h="16" texture="ico_stamina.tga" />
741                         <view type="bitmap"      id="focus_icon" posparent="sta_icon"   posref="BR TR" x="0" y="0"   scale="true" w="16" h="16" texture="ico_focus.tga" />
743                         <view type="text_number" id="hp_text"    posparent="hp_icon"    posref="ML MR" x="0" y="0" fontsize="10" shadow="true" value="UI:PHRASE:FABER:FABER_PLAN:HP_BUFF" global_color="true" />
744                         <view type="text_number" id="sap_text"   posparent="sap_icon"   posref="ML MR" x="0" y="0" fontsize="10" shadow="true" value="UI:PHRASE:FABER:FABER_PLAN:SAP_BUFF" global_color="true" />
745                         <view type="text_number" id="sta_text"   posparent="sta_icon"   posref="ML MR" x="0" y="0" fontsize="10" shadow="true" value="UI:PHRASE:FABER:FABER_PLAN:STA_BUFF" global_color="true" />
746                         <view type="text_number" id="focus_text" posparent="focus_icon" posref="ML MR" x="0" y="0" fontsize="10" shadow="true" value="UI:PHRASE:FABER:FABER_PLAN:FOCUS_BUFF" global_color="true" />
748                         <link expr="ne(@UI:PHRASE:FABER:FABER_PLAN:HP_BUFF, 0)" target="hp_icon:active,hp_text:active" />
749                         <link expr="ne(@UI:PHRASE:FABER:FABER_PLAN:SAP_BUFF, 0)" target="sap_icon:active,sap_text:active" />
750                         <link expr="ne(@UI:PHRASE:FABER:FABER_PLAN:STA_BUFF, 0)" target="sta_icon:active,sta_text:active" />
751                         <link expr="ne(@UI:PHRASE:FABER:FABER_PLAN:FOCUS_BUFF, 0)" target="focus_icon:active,focus_text:active" />
753                         <!-- Stat Preview -->
754                         <vector template="template_mp_faber_stat" id="stat$i" _size="%MAX_STAT_MP_CRAFT" _firstpos="BL TL" _xfirst="0" _yfirst="-6" _nextpos="BL TL" />
755                 </group>
756                 <ctrl style="skin_scroll" id="sv_ir" posparent="back" posref="TR TR" x="-8" y="-44" target="item_result" />
758                 <!-- VALIDATION -->
759                 <instance template="button_ok_cancel" posref="BR BR" x="-4" y="4" onclick_ok="phrase_faber_validate" ok_text="uittPhraseFaberBuild"
760                                         onclick_cancel="set" onclick_cancel_param="target_property=ui:interface:phrase_faber_execution:active|value=0" cancel_text="uittCancel" />
761         </group>
763         <group id="content" x="0" y="0" w="0" h="0" posref="TL TL" >
764         </group>
766 </group>
768 <!--************************-->
769 <!--            LINKS                   -->
770 <!--************************-->
772 <!-- TEMPLATE DE LINK -->
773 <template name="active_link" keep="true" posparent="parent" posref="TL TL" h="32" id="" x="0" y="0" index="" >
774         <group id="#id" w="306" h="#h" posparent="#posparent" posref="#posref" x="#x" y="#y" >
775                 <group id="cadre" posref="ML ML" w="306" h="30" >
776                         <!-- CADRE -->
777                         <view type="bitmap" id="cadre1" posref="TL TL" scale="true" sizeref="h" h="0" w="2" texture="W_line_ver.tga" x="-1" />
778                         <view type="bitmap" id="cadre2" posref="TR TR" scale="true" sizeref="h" h="0" w="2" texture="W_line_ver.tga" x="1" />
779                         <view type="bitmap" id="cadre3" posref="TL TL" scale="true" sizeref="w" h="2" w="0" texture="W_line_hor.tga" y="1" />
780                         <view type="bitmap" id="cadre4" posref="BL BL" scale="true" sizeref="w" h="2" w="0" texture="W_line_hor.tga" y="-1" />
781                 </group>
782                 <link expr="ifthenelse(eq(@UI:VARIABLES:LINKS_INFOS, 0), 306, 200)" target="cadre:w" />
784                 <!-- SLOT. don't change the id for info -->
785                 <ctrl type="sheet" id="ctrl_phrase" nature="sphraseid" posref="ML ML" x="2" dragable="false"
786                         value="SERVER:EXECUTE_PHRASE:LINK:#index" onclick_r="open_phraseid_help" />
788                 <group id="name_cost" w="120" h="26" posparent="ctrl_phrase" posref="TR TL" x="2" y="-1" >
789                         <!-- NAME. Get the Name spell -->
790                         <view type="text" id="spell_name" posref="TL TL" y="-1" w="120" h="10" shadow="true" fontsize="10"
791                                 global_color="false" />
792                         <link expr="getSPhraseName(@SERVER:EXECUTE_PHRASE:LINK:#index:PHRASE)" target="spell_name:uc_hardtext" />
794                         <!-- COSTS (HP, SAP, STA) -->
795                         <!--
796                         <view type="text" id="costs" posparent="spell" posref="BR BL" x="2" y="0" shadow="true" fontsize="8" hardtext="uiLinksCosts" />
797                         -->
798                         <instance template="box_widget" id="box_cost" posref="BL BL" w="81" h="13" />
800                         <view type="text_number" id="hp_cost" posparent="box_cost" posref="ML MM" x="14" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:HP_COST" color="%hp_color" global_color="false" />
801                         <view type="text" id="sep1" posparent="box_cost" posref="ML MM" x="27" y="-1" shadow="true" fontsize="10" hardtext="/" color="255 255 255 255" />
802                         <view type="text_number" id="sap_cost" posparent="box_cost" posref="MM MM" x="0" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:SAP_COST" color="%sap_color" global_color="false" />
803                         <view type="text" id="sep2" posparent="box_cost" posref="ML MM" x="54" y="-1" shadow="true" fontsize="10" hardtext="/" color="255 255 255 255" />
804                         <view type="text_number" id="sta_cost" posparent="box_cost" posref="MR MM" x="-14" y="-2" fontsize="8" shadow="true" value="SERVER:EXECUTE_PHRASE:LINK:#index:STA_COST" color="%sta_color" global_color="false" />
805                 </group>
806                 <link expr="eq(@UI:VARIABLES:LINKS_INFOS, 0)" target="name_cost:active" />
808                 <!-- SEP SPELL/TARGET -->
809                 <view type="bitmap" id="sep" posref="ML ML" x="150" scale="true" w="2" h="26" color="255 255 255 160" texture="W_line_ver.tga" />
810                 <link expr="eq(@UI:VARIABLES:LINKS_INFOS, 0)" target="sep:active" />
812                 <!-- TARGET -->
813                 <group id="target" posref="ML ML" x="154" w="150" h="26" >
814                         <!-- TARGET Name -->
815                         <view type="text_id" id="name" posref="TL TL" x="0" y="-1" h="10" shadow="true" fontsize="10" textid="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_NAME" />
816                         <!-- Jauges Target -->
817                         <view type="bar3" id="jauges" posref="BL BL" mini="true" y="1"
818                                                                 color1="%sta_color"     value1="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_STA"   range1="UI:CONST:127"
819                                                                 color2="%sap_color"   value2="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_SAP"     range2="UI:CONST:127"
820                                                                 color3="%hp_color"   value3="SERVER:EXECUTE_PHRASE:LINK:#index:TARGET_HP"       range3="UI:CONST:127" />
821                 </group>
822                 <link expr="ifthenelse(eq(@UI:VARIABLES:LINKS_INFOS, 0), 154, 40)" target="target:x" />
824                 <!-- BUTTON TO STOP THE LINK -->
825                 <ctrl type="button" id="stop_button" button_type="push_button" posref="MM MM" sizeref="wh" w="-2" h="-4" scale="true"
826                         tx_normal="blank.tga" tx_pushed="blank.tga" tx_over="blank.tga" color="0 0 0 0" col_pushed="0 0 0 0" col_over="255 255 255 32"
827                         onclick_l="phrase_link_stop" params_l="#index" tooltip="uiStopLinkSpell"
828                         onclick_r="phrase_link_ctrl_rclick" />
830                 <!-- HIDE THIS GROUP IF NO LINK -->
831                 <link expr="ne(@SERVER:EXECUTE_PHRASE:LINK:#index:PHRASE, 0)" target="active" />
833         </group>
834 </template>
837 <!-- LE CONTAINER DE LINKS -->
838 <group type="container" id="links" w="314" title="uiLinksTitle" global_color="false" opened="true" resizer="false" openable="false"
839         movable="true" active="true" header_color="UI:SAVE:WIN:COLORS:INV"
840         on_active="set" on_active_params="dblink=UI:VARIABLES:ISACTIVE:LINKS|value=1"
841         on_deactive="set" on_deactive_params="dblink=UI:VARIABLES:ISACTIVE:LINKS|value=0"
844         <group id="header_closed" x="0" y="0" w="314" h="16" posref="TL TL" >
845         </group>
847         <group id="header_opened" x="0" y="0" w="314" h="20" posref="TL TL"
848                  group_onclick_r="active_menu"
849                  group_params_r="menu=ui:interface:base_menu_with_color" >
851                  <view type="text" id="text_show_preview" posref="MR MR" x="-16" y="0" color="255 255 255 255" fontsize="10" global_color="false" shadow="true" hardtext="uiLinkInfo" />
852                  <ctrl type="button" id="show_info" button_type="toggle_button" posparent="text_show_preview" posref="ML MR" x="-2" y="2" pushed="false"
853                                 tx_normal="w_opacity_on.tga" tx_pushed="w_slot_on.tga" tx_over="w_slot_on.tga"
854                                 color="255 255 255 255" col_pushed="255 255 255 255" col_over="255 255 255 0"
855                                 global_color_normal="true" global_color_over="true" global_color_pushed="true"
856                                 onclick_l="set" params_l="dblink=UI:VARIABLES:LINKS_INFOS|value=not(@UI:VARIABLES:LINKS_INFOS)" />
858         </group>
860         <group id="content" x="0" y="0" w="310" child_resize_h="true" posref="TL TL" >
861                 <!-- Yoyo: must leave 0 to the Y, if we want the system "hide=>H==0" to work -->
862                 <instance template="active_link" id="al0" index="0" posref="TL TL"                                 />
863                 <instance template="active_link" id="al1" index="1" posparent="al0" posref="BL TL" />
864                 <instance template="active_link" id="al2" index="2" posparent="al1" posref="BL TL" />
865                 <instance template="active_link" id="al3" index="3" posparent="al2" posref="BL TL" />
866                 <instance template="active_link" id="al4" index="4" posparent="al3" posref="BL TL" />
867                 <instance template="active_link" id="al5" index="5" posparent="al4" posref="BL TL" />
868                 <instance template="active_link" id="al6" index="6" posparent="al5" posref="BL TL" />
869                 <instance template="active_link" id="al7" index="7" posparent="al6" posref="BL TL" />
870                 <instance template="active_link" id="al8" index="8" posparent="al7" posref="BL TL" />
871                 <instance template="active_link" id="al9" index="9" posparent="al8" posref="BL TL" />
872         </group>
873 </group>
874 <link expr="ifthenelse(eq(@UI:VARIABLES:LINKS_INFOS, 0), 314, 208)" target="ui:interface:links:w" />
879 <!--************************-->
880 <!--            LINKS                   -->
881 <!--************************-->
886 <tree node="phrase_book"/>
887 <tree node="phrase_composition"/>
888 <tree node="phrase_faber_execution"/>
889 <tree node="links"/>
892 </interface_config>