Merge branch 'fixes' into main/rendor-staging
[ryzomcore.git] / ryzom / client / mods / syui_v3 / syui / interaction.xml
blobd18b7959dd66d416fc42e94f35f50fd738430a3f
1 <interface_config>
2   <root id="interface"
3         x="0"
4         y="0"
5         w="800"
6         h="600"
7         active="true" />
8   <lua file="interaction.lua" />
9   <!-- ********** -->
10   <!-- * TARGET * -->
11   <!-- ********** -->
12   <!-- Track when the user change its Faction PVP Mode -->
13   <variable entry="UI:VARIABLES:USER:TRACK_PVP_CHANGE_MODE"
14             type="sint32"
15             value="0" />
16   <variable entry="UI:VARIABLES:USER:TRACK_TARGET_PVP_CHANGE_MODE"
17             type="sint32"
18             value="0" />
19   <!-- need for target's percent -->
20   <define id="target_hp_percent"
21           value="UI:VARIABLES:BARS:TARGET:HP_PERCENT" />
22   <define id="target_sap_percent"
23           value="UI:VARIABLES:BARS:TARGET:SAP_PERCENT" />
24   <define id="target_sta_percent"
25           value="UI:VARIABLES:BARS:TARGET:STA_PERCENT" />
26   <!-- The Target selected -->
27   <define id="target_name_id"
28           value="SERVER:Entities:E[UI:VARIABLES:TARGET:SLOT]:P6" />
29   <define id="target_uid"
30           value="SERVER:TARGET:BARS:UID" />
31   <define id="target_player_level"
32           value="SERVER:TARGET:BARS:PLAYER_LEVEL" />
33   <define id="region_force_1"
34           value="113 170 138 255" />
35   <!-- Newbieland creatures... -->
36   <define id="region_force_2"
37           value="112 112 221 255" />
38   <define id="region_force_3"
39           value="255 255 180 255" />
40   <define id="region_force_4"
41           value="238 160  96 255" />
42   <define id="region_force_5"
43           value="204  48  48 255" />
44   <define id="region_force_6"
45           value="144  48 144 255" />
46   <define id="force_level_1"
47           value="consider_1.tga" />
48   <define id="force_level_2"
49           value="consider_2.tga" />
50   <define id="force_level_3"
51           value="consider_3.tga" />
52   <define id="force_level_4"
53           value="consider_4.tga" />
54   <define id="force_level_5"
55           value="consider_5.tga" />
56   <define id="force_level_6"
57           value="consider_6.tga" />
58   <define id="force_level_7"
59           value="consider_6.tga" />
60   <define id="force_level_8"
61           value="consider_7.tga" />
62   <proc id="proc_target_changed">
63     <!-- Name -->
64     <action handler="set_target_name"
65             params="slot=@@UI:VARIABLES:TARGET:SLOT|target=ui:interface:target:uc_title|
66                                                                                                 title=ui:interface:target:header_opened:target_title:uc_hardtext" />
67     <!-- Region force & Force level of the creature/player -->
68     <!-- old consider system -->
69     <!--
70         <action handler="set_force_region_level" params="slot=@@UI:VARIABLES:TARGET:SLOT|targetRegion=ui:interface:target:header_opened:target_force|targetLevel=ui:interface:target:header_opened:target_level" />
71         -->
72     <!-- new consider level : lua code only -->
73     <action handler="lua"
74             params="game:updateTargetConsiderUI()" />
75   </proc>
76   <link expr="depends(@%target_name_id)"
77         action="proc"
78         params="proc_target_changed" />
79   <!-- will be called if either UI:VARIABLES:TARGET:SLOT (local) or P6 (server) changes -->
80   <link expr="depends(@%target_uid)"
81         action="proc"
82         params="proc_target_changed" />
83   <!-- detects when the target has changed -->
84   <link expr="depends(@%target_player_level)"
85         action="proc"
86         params="proc_target_changed" />
87   <!-- detect when the player level has changed (or called after the target has changed and the player level been read) -->
88   <link expr="depends(@UI:VARIABLES:USER:TRACK_PVP_CHANGE_MODE)"
89         action="proc"
90         params="proc_target_changed" />
91   <!-- detect when the user PVP mode has changed -->
92   <link expr="depends(@UI:VARIABLES:USER:TRACK_TARGET_PVP_CHANGE_MODE)"
93         action="proc"
94         params="proc_target_changed" />
95   <!--<link expr="depends(@UI:VARIABLES:USER:TRACK_TARGET_PVP_CHANGE_MODE)"
96         action="lua"
97         params="game:inPvPMode()" />-->
98   <!-- detect when the target PVP mode has changed -->
99   <!-- Target bars and tooltips -->
100   <template name="jauges_target"
101             x="0"
102             y="0"
103             posref="TR TR">
104     <view type="bar3"
105           id="jauges"
106           posref="TR TR"
107           color1="%focus_color"
108           value1="%target_focus"
109           range1="UI:CONST:127"
110           color2="%sap_color"
111           value2="%target_sap"
112           range2="UI:CONST:127"
113           color3="%sta_color"
114           value3="%target_sta"
115           range3="UI:CONST:127" />
116     <ctrl type="tooltip"
117           id="tt1"
118           tooltip="uiStamina"
119           color="%sta_color"
120           posparent="jauges"
121           posref="TL TL"
122           x="0"
123           y="0"
124           sizeref="wh3"
125           w="0"
126           h="0" />
127     <ctrl type="tooltip"
128           id="tt2"
129           tooltip="uiSap"
130           color="%sap_color"
131           posparent="tt1"
132           posref="BL BL"
133           x="0"
134           y="0"
135           sizeref="wh"
136           w="0"
137           h="0" />
138     <ctrl type="tooltip"
139           id="tt3"
140           tooltip="uiFocus"
141           color="%focus_color"
142           posparent="tt2"
143           posref="BL TL"
144           x="0"
145           y="0"
146           sizeref="wh"
147           w="0"
148           h="0" />
149   </template>
150   <template name="jauge_score_target"
151             posparent="parent"
152             x="0"
153             y="0"
154             h="16"
155             posref="TL TL"
156             id=""
157             w="156"
158             color=""
159             text=""
160             val=""
161             maxval="">
162     <group id="#id"
163            posparent="#posparent"
164            posref="#posref"
165            w="#w"
166            h="#h"
167            x="#x"
168            y="#y">
169       <group id="jauge_bar"
170              posref="TL TL"
171              w="156"
172              h="16">
173         <view type="bitmap"
174               id="jauge_graph"
175               posref="TL TL"
176               texture="jauge.tga"
177               color="#color"
178               global_color="false"
179                           render_layer="2" />
180       </group>
181           <!-- target percent text -->
182           <view type="text"
183             id="p"
184             posref="TL TL"
185             x="6"
186             y="-5"
187             color="255 255 255 255"
188             global_color="false"
189             fontsize="11"
190             shadow="true"
191             hardtext="#text"
192             render_layer="2" />
193       <view type="text_number"
194             id="pval"
195             posref="MR MR"
196             x="-16"
197                         y="-4"
198             color="255 255 255 255"
199             shadow="true"
200             global_color="false"
201             fontsize="11"
202             value="#val"
203             positive="true"
204                         render_layer="2" />
205           <view type="text"
206             id="psep"
207             posparent="pval"
208             posref="MR MR"
209             x="11"
210                         y="0"
211             color="255 255 255 255"
212             shadow="true"
213             global_color="false"
214             fontsize="11"
215             hardtext="%"
216             render_layer="2" />
217       <link expr="depends(@#val)"
218             action="set"
219             params="target='ui:interface:target:content:#id:jauge_bar:w'|value=div(mul(@#val, 156), 100)" />
220           <link expr="depends(@%target_hp, @%target_sap, @%target_sta, @UI:VARIABLES:CURRENT_SMOOTH_SERVER_TICK)"
221             action="lua"
222             params="game:showTargetPercent()" />
223     </group>
224   </template>
225   <!-- the Main Group -->
226   <group type="container"
227          id="target"
228          w="182"
229          h="512"
230          title=""
231          min_w="182"
232          max_w="182"
233          min_h="56"
234          max_h="82"
235          resizer="false"
236          global_color="false"
237          global_color_over="true"
238          movable="true"
239          active="false"
240          opened="true"
241          openable="false"
242          right_button="false"
243          on_active="set"
244          on_active_params="dblink=UI:VARIABLES:ISACTIVE:TARGET|value=1"
245          on_deactive="set"
246          on_deactive_params="dblink=UI:VARIABLES:ISACTIVE:TARGET|value=0"
247          help_page="interf_target.html"
248          header_active="false"
249          title_delta_max_w="-44"
250          title_over_extend_view_text="true">
251         <view type="bitmap"
252           id="frame_bg"
253           posref="TL TL"
254           global_color="false" />
255         <!--<view type="bitmap"
256           id="frame_bg"
257           posref="TL TL"
258           texture="user/interface/images/frame_bg.tga"
259                   color="74 74 74 205"
260           global_color="false" />-->
261     <group id="header_closed"
262            x="0"
263            y="0"
264            h="28"
265            posref="TL TL"
266            group_onclick_r="active_menu"
267            group_params_r="menu=ui:interface:base_menu_with_color">
268            </group>
269     <group id="header_opened"
270            x="0"
271            y="0"
272            h="56"
273            posref="TL TL"
274            group_onclick_r="active_menu"
275            group_params_r="menu=ui:interface:base_menu_with_color">
276       <view type="text"
277             id="target_title"
278             posref="TL TL"
279             x="0"
280             y="-20"
281             color="255 255 255 255"
282             global_color="true"
283             fontsize="10"
284             shadow="true"
285             hardtext=""
286             line_maxw="135"
287             over_extend_view_text="true" />
288       <!-- complex level display version -->
289       <!--
290                 <view type="bitmap" id="slot_force" posref="BR BR" x="0" y="0" color="255 255 255 255" texture="W_slot_consider.tga" />
291                 <view type="bitmap" id="target_force" posparent="slot_force" posref="MM MM" x="0" y="0" w="30" h="14" scale="true" color="0 0 0 0" global_color="false" texture="blank.tga" />
292                 <view type="bitmap" id="target_level" posparent="target_force" posref="MM MM" global_color="false" texture="consider_1.tga" />
293                 <ctrl type="tooltip" id="force" tooltip="uiForce" color="0 0 0 255" posparent="slot_force" posref="MM MM" x="0" y="0" sizeref="wh" w="0" h="0" tooltip_parent="win" />
294                 -->
295       <!-- simple level version -->
296       <view type="bitmap"
297             id="slot_force"
298             posref="BR BR"
299             x="0"
300             y="0"
301             color="0 0 0 0"
302             global_color="false"
303             texture="blank_n.tga" />
304           <view type="bitmap"
305             id="slot_claw"
306             posref="BR BR"
307             posparent="slot_force"
308             x="7"
309             y="-6"
310             color="255 255 255 255"
311             texture="claw.tga"
312             global_color="false"
313             render_layer="1"
314             active="false" />
315           <view type="bitmap"
316             id="conside"
317             posref="BR BR"
318             posparent="slot_claw"
319             x="-41"
320             y="7"
321                         w="75"
322                         h="18"
323             texture="blank_n.tga"
324             global_color="false"
325             render_layer="2"
326             active="false" />
327       <view type="text"
328             id="target_level"
329             posref="MM MM"
330             posparent="slot_claw"
331             x="-1"
332             y="-2"
333             color="255 255 255 255"
334             fontsize="12"
335             shadow="true"
336             hardtext="254"
337             global_color="false"
338                         render_layer="2"
339             active="true"       />
340       <view type="bitmap"
341             id="slot_ring"
342             posref="TL TL"
343             posparent="slot_force"
344             x="0"
345             y="0"
346             color="255 255 255 255"
347             texture="consider_ring.tga"
348             global_color="false"
349             render_layer="2"
350             active="false" />
351       <view type="bitmap"
352             id="impossible"
353             posref="BL BL"
354             posparent="slot_claw"
355             x="12"
356             y="10"
357                         scale="true"
358                         h="25"
359                         w="26"
360             color="255 255 255 255"
361             texture="skull_imp.tga"
362             global_color="false"
363             render_layer="2"
364             active="false" />
365       <ctrl type="tooltip"
366             id="target_tooltip"
367             tooltip="uittConsiderTargetNoSelection"
368             color="0 0 0 255"
369             posparent="slot_force"
370             posref="MM MM"
371             x="0"
372             y="0"
373             sizeref="wh"
374             w="0"
375             h="0"
376             tooltip_parent="win" />
377     </group>
378         
379         <group id="pvp_tags"
380            x="10"
381            y="-42"
382            w="164"
383            h="24"
384            posref="TL TL">
385       <!-- new Jauges -->
386       <view type="bitmap"
387             id="tag_1"
388             posref="TL TL"
389             x="2"
390             y="0"
391             texture="alpha_10.tga"
392                         global_color="false"
393             inherit_gc_alpha="false" />
394       <view type="bitmap"
395             id="tag_0"
396             posref="TR TL"
397                         posparent="tag_1"
398             x="2"
399             y="0"
400             texture="alpha_10.tga"
401                         global_color="false"
402             inherit_gc_alpha="false" />
403      <view type="bitmap"
404             id="tag_2"
405             posref="TR TL"
406                         posparent="tag_0"
407             x="2"
408             y="0"
409             texture="alpha_10.tga"
410                         global_color="false"
411             inherit_gc_alpha="false" />
412      <view type="bitmap"
413             id="tag_3"
414             posref="TR TL"
415                         posparent="tag_2"
416             x="2"
417             y="0"
418             texture="alpha_10.tga"
419                         global_color="false"
420             inherit_gc_alpha="false" />
421      <view type="bitmap"
422             id="tag_4"
423             posref="TR TL"
424                         posparent="tag_3"
425             x="2"
426             y="0"
427             texture="alpha_10.tga"
428                         global_color="false"
429             inherit_gc_alpha="false" />
430      <view type="bitmap"
431             id="tag_6"
432             posref="TR TL"
433                         posparent="tag_4"
434             x="2"
435             y="0"
436             texture="alpha_10.tga"
437                         global_color="false"
438             inherit_gc_alpha="false" />                 
439     </group>
440         
441     <group id="content"
442                x="0"
443            y="-26"
444            w="164"
445            h="55"
446            posref="TL TL">
447       <!-- new Jauges -->
448           <view type="bitmap"
449             id="slot_fake_jauge"
450                         posref="TL TL"
451                         x="0"
452             y="0"
453             global_color="false"
454             texture="blank.tga" />
455       <view type="bitmap"
456             id="t_life"
457                         posparent="slot_fake_jauge"
458             posref="TL TL"
459             x="0"
460             y="0"
461             texture="slot_jauge.tga"
462             inherit_gc_alpha="false"
463             render_layer="1" />
464           <view type="bitmap"
465             id="t_sap"
466                         posparent="slot_fake_jauge"
467             posref="TL TL"
468             x="0"
469             y="-18"
470             texture="slot_jauge.tga"
471             inherit_gc_alpha="false"
472             render_layer="1" />
473           <view type="bitmap"
474             id="t_sta"
475                         posparent="slot_fake_jauge"
476             posref="TL TL"
477             x="0"
478             y="-36"
479             texture="slot_jauge.tga"
480             inherit_gc_alpha="false"
481             render_layer="1" />
482           <instance template="jauge_score_target"
483                 id="jlifet"
484                 posparent="t_life"
485                 posref="TL TL"
486                 color="255 93 38 255"
487                 text="uiHP"
488                 val="%target_hp_percent" />
489           <instance template="jauge_score_target"
490                 id="jsapt"
491                 posparent="t_sap"
492                 posref="TL TL"
493                 color="100 255 40 255"
494                                 text="uiSap"
495                 val="%target_sap_percent" />
496       <instance template="jauge_score_target"
497                 id="jstat"
498                 posparent="t_sta"
499                 posref="TL TL"
500                 color="255 37 254 255"
501                                 text="uiStamina"
502                 val="%target_sta_percent" />
503           <instance template="text_tt"
504                 posparent="jlifet"
505                 tooltip="uittTargetHp"
506                 tooltip_parent="win" />
507     </group>
509      <!-- when the level of the player change, we should update the consider widget, so add an observer to each of its skills -->
510     <link expr="depends(@SERVER:USER:SKILL_POINTS_0:VALUE)"
511           action="lua"
512           params="game:updateTargetConsiderUI()" />
513     <link expr="depends(@SERVER:USER:SKILL_POINTS_1:VALUE)"
514           action="lua"
515           params="game:updateTargetConsiderUI()" />
516     <link expr="depends(@SERVER:USER:SKILL_POINTS_2:VALUE)"
517           action="lua"
518           params="game:updateTargetConsiderUI()" />
519     <link expr="depends(@SERVER:USER:SKILL_POINTS_3:VALUE)"
520           action="lua"
521           params="game:updateTargetConsiderUI()" />
522     <!-- As well, if member are added, rmoved from the team, then the player may see the level of stronger creature, so update -->
523     <!-- the consider widget a well -->
524     <link expr="depends(@SERVER:GROUP:0:PRESENT)"
525           action="lua"
526           params="game:updateTargetConsiderUI()" />
527     <link expr="depends(@SERVER:GROUP:1:PRESENT)"
528           action="lua"
529           params="game:updateTargetConsiderUI()" />
530     <link expr="depends(@SERVER:GROUP:2:PRESENT)"
531           action="lua"
532           params="game:updateTargetConsiderUI()" />
533     <link expr="depends(@SERVER:GROUP:3:PRESENT)"
534           action="lua"
535           params="game:updateTargetConsiderUI()" />
536     <link expr="depends(@SERVER:GROUP:4:PRESENT)"
537           action="lua"
538           params="game:updateTargetConsiderUI()" />
539     <link expr="depends(@SERVER:GROUP:5:PRESENT)"
540           action="lua"
541           params="game:updateTargetConsiderUI()" />
542     <link expr="depends(@SERVER:GROUP:6:PRESENT)"
543           action="lua"
544           params="game:updateTargetConsiderUI()" />
545     <link expr="depends(@SERVER:GROUP:7:PRESENT)"
546           action="lua"
547           params="game:updateTargetConsiderUI()" />
548   </group>
549   <tree node="target" />
550   <!-- **************************************** -->
551   <!-- * PEOPLE LISTS BASE CONTAINER TEMPLATE * -->
552   <!-- **************************************** -->
553   <!-- simple people list -->
554   <template name="people_list_container"
555             keep="true"
556             active="true"
557             movable="false"
558             openable="false"
559             opened="true"
560             id="system">
561     <group type="container"
562            id="#id"
563            w="222"
564            active="#active"
565            movable="#movable"
566            opened="#opened"
567            openable="#openable"
568            header_color="UI:SAVE:WIN:COLORS:COM"
569            global_color="false"
570            global_color_over="true"
571            pop_min_h="96">
572       <group id="header_closed"
573              x="0"
574              y="0"
575              h="12"
576              posref="TL TL"></group>
577       <group id="header_opened"
578              x="0"
579              y="0"
580              h="12"
581              posref="TL TL"></group>
582     </group>
583   </template>
584   <!-- ********************************** -->
585   <!-- FRIEND LIST & IGNORE LIST TEMPLATE -->
586   <!-- ********************************** -->
587   <template name="people_list_container_with_add_edit_box"
588             keep="true"
589             active="true"
590             movable="false"
591             opened="true"
592             id="system">
593     <group type="container"
594            id="#id"
595            w="252"
596            active="#active"
597            movable="#movable"
598            opened="#opened"
599            header_color="UI:SAVE:WIN:COLORS:COM"
600            global_color="false"
601            global_color_over="true">
602       <group id="header_closed"
603              x="0"
604              y="0"
605              h="16"
606              posref="TL TL">
607         <ctrl style="text_button_16"
608               id="add_button"
609               posref="MR MR"
610               x="-4"
611               y="0"
612               onclick_l="add_contact_begin"
613               params_l="group=ui:interface:add_contact"
614               hardtext="uiPeopleAdd" />
615       </group>
616       <group id="header_opened"
617              x="0"
618              y="0"
619              h="16"
620              posref="TL TL">
621         <ctrl style="text_button_16"
622               id="add_button"
623               posref="MR MR"
624               x="-4"
625               y="0"
626               onclick_l="add_contact_begin"
627               params_l="group=ui:interface:add_contact"
628               hardtext="uiPeopleAdd" />
629       </group>
630       <group id="content"
631              x="0"
632              y="0"
633              h="0"
634              posref="TL TL"></group>
635     </group>
636   </template>
637   <group type="modal"
638          id="add_contact"
639          exit_click_out="true"
640          posref="MM MR"
641          w="212"
642          child_resize_h="true"
643          child_resize_hmargin="14"
644          options="skin_modal"
645          on_active="set_keyboard_focus"
646          on_active_params="target=ui:interface:add_contact:add_contact_eb:eb|select_all=false">
648     <view type="text"
649           id="text"
650           case_mode="%case_first_word_letter_up"
651           posref="TL TL"
652           x="8"
653           y="-8"
654           color="255 255 255 255"
655           global_color="false"
656           fontsize="12"
657           shadow="true"
658           hardtext="uiPeopleAddContact" />
659     <instance template="edit_box_widget"
660               id="add_contact_eb"
661               posref="TL TL"
662               x="6"
663               y="-24"
664               child_resize_h="true"
665               w="200"
666               onenter="add_contact"
667               max_num_chars="255"
668               entry_type="playername" />
669     <instance template="button_ok_cancel"
670               posparent="add_contact_eb"
671               posref="BR TR"
672               x="0"
673               y="0"
674               onclick_ok="add_contact"
675               onclick_ok_param=""
676               onclick_cancel="leave_modal"
677               onclick_cancel_param="" />
678   </group>
679   <!-- ***************** -->
680   <!-- * CHAT TEMPLATE * -->
681   <!-- ***************** -->
682   <template name="chat_id"
683             keep="true"
684             posparent="parent"
685             w="256"
686             h="64"
687             title="">
688     <group type="container"
689            id="#id"
690            w="#w"
691            h="#h"
692            posparent="#posparent"
693            title="#title"
694            resizer="true"
695            openable="false"
696            popable="false"
697            open_when_popup="true"
698            header_color="UI:SAVE:WIN:COLORS:COM"
699            global_color="false"
700            global_color_over="true"
701            lockable="true"
702            pop_min_w="216"
703            pop_min_h="96"
704            pop_max_w="2000"
705            pop_max_h="1600">
706       <group id="header_closed"
707              x="0"
708              y="0"
709              h="12"
710              posref="TL TL"></group>
711       <group id="header_opened"
712              x="0"
713              y="0"
714              w="160"
715              h="13"
716              posref="TL TL"></group>
717       <group id="content"
718              x="0"
719              y="0"
720              w="0"
721              h="0"
722              posref="TL TL">
723         <instance template="chat_box"
724                   id="cb"
725                   posref="TR TR"
726                   sizeref="wh"
727                   y="0"
728                   w="0"
729                   h="-24" />
730         <instance template="edit_box_widget"
731                   id="ebw"
732                   posref="BR TR"
733                   y="0"
734                   posparent="cb"
735                   child_resize_h="true"
736                   sizeref="w"
737                   w="-10"
738                   onenter="chat_box_entry"
739                   backup_father_container_pos="true" />
740       </group>
741     </group>
742   </template>
743   <!-- chat window with a 'clear' button -->
744   <template name="clearable_chat_id"
745             keep="true"
746             posparent="parent"
747             w="256"
748             h="64"
749             title="">
750     <group type="container"
751            id="#id"
752            w="#w"
753            h="#h"
754            posparent="#posparent"
755            title="#title"
756            resizer="true"
757            openable="false"
758            popable="false"
759            open_when_popup="true"
760            header_color="UI:SAVE:WIN:COLORS:COM"
761            global_color="false"
762            global_color_over="true"
763            lockable="true"
764            pop_min_w="216"
765            pop_min_h="96"
766            pop_max_w="2000"
767            pop_max_h="1600">
768       <group id="header_closed"
769              x="0"
770              y="0"
771              h="12"
772              posref="TL TL"></group>
773       <group id="header_opened"
774              x="0"
775              y="0"
776              w="160"
777              h="13"
778              posref="TL TL"></group>
779       <group id="content"
780              x="0"
781              y="0"
782              w="0"
783              h="0"
784              posref="TL TL">
785         <instance template="chat_box"
786                   id="cb"
787                   posref="TR TR"
788                   sizeref="wh"
789                   y="0"
790                   w="0"
791                   h="-24" />
792         <instance template="edit_box_widget"
793                   id="ebw"
794                   posref="BR TR"
795                   y="0"
796                   posparent="cb"
797                   child_resize_h="true"
798                   sizeref="w"
799                   w="-10"
800                   onenter="chat_box_entry"
801                   backup_father_container_pos="true" />
802         <ctrl style="text_button_16"
803               id="clear"
804               posref="TR TR"
805               posparent="chat_box"
806               x="-16"
807               y="-16"
808               wmargin="0"
809               color="255 255 255 255"
810               col_over="255 255 255 255"
811               col_pushed="255 255 255 255"
812               onclick_l="lua"
813               params_l="runCommand('clear', getUICaller().id)"
814               hardtext="clear" />
815       </group>
816     </group>
817   </template>
818   <!-- ********************************** -->
819   <!-- * CHAT WITH NO EDIT BOX TEMPLATE * -->
820   <!-- ********************************** -->
821   <template name="chat_no_eb_id"
822             keep="true"
823             posparent="parent"
824             w="256"
825             h="64"
826             title="">
827     <group type="container"
828            id="#id"
829            w="#w"
830            posparent="#posparent"
831            title="#title"
832            openable="false"
833            popable="false"
834            open_when_popup="true"
835            header_color="UI:SAVE:WIN:COLORS:COM"
836            global_color="false"
837            global_color_over="true"
838            pop_min_w="216"
839            pop_min_h="96"
840            pop_max_w="2000"
841            pop_max_h="1600"
842            lockable="true">
843       <group id="header_closed"
844              x="0"
845              y="0"
846              h="12"
847              posref="TL TL"></group>
848       <group id="header_opened"
849              x="0"
850              y="0"
851              w="160"
852              h="13"
853              posref="TL TL"
854              child_resize_h="true"
855              child_resize_hmargin="8"></group>
856       <group id="content"
857              x="0"
858              y="0"
859              h="0"
860              posref="TL TL">
861         <instance template="chat_box"
862                   id="cb"
863                   posref="TR TR"
864                   sizeref="wh"
865                   y="0"
866                   w="0" />
867       </group>
868     </group>
869   </template>
870   <!-- ***************************** -->
871   <!-- * CHAT WITH FILTER TEMPLATE * -->
872   <!-- ***************************** -->
873   <template name="filtered_chat_id"
874             keep="true"
875             posparent="parent"
876             w="256"
877             h="64"
878             title="">
879     <group type="container"
880            id="#id"
881            w="#w"
882            h="#h"
883            posparent="#posparent"
884            title="#title"
885            openable="false"
886            popable="false"
887            open_when_popup="true"
888            resizer="true"
889            pop_min_w="216"
890            pop_min_h="96"
891            pop_max_w="2000"
892            pop_max_h="1600"
893            header_color="UI:SAVE:WIN:COLORS:COM"
894            global_color="false"
895            global_color_over="true"
896            lockable="true">
897       <group id="header_closed"
898              x="0"
899              y="0"
900              h="12"
901              posref="TL TL"
902              group_onclick_r="select_chat_source"></group>
903       <group id="header_opened"
904              x="0"
905              y="0"
906              h="12"
907              posref="TL TL"
908              group_onclick_r="select_chat_source"></group>
909       <group id="content"
910              x="0"
911              y="0"
912              w="0"
913              h="0"
914              posref="TL TL">
915         <instance template="chat_box"
916                   id="cb"
917                   posref="TR TR"
918                   sizeref="wh"
919                   x="0"
920                   y="0"
921                   w="0"
922                   h="-24" />
923         <!-- display of filters -->
924         <ctrl style="text_button_16"
925               id="target_button"
926               posparent="cb"
927               posref="BL TL"
928               y="-4"
929               x="0"
930               hardtext="uiFilterAround"
931               onclick_l="select_chat_target"
932               params_l="menu=ui:interface:user_chat_target_menu|party_chats=false" />
933         <instance template="edit_box_widget"
934                   id="ebw"
935                   posref="BR TR"
936                   y="0"
937                   posparent="cb"
938                   child_resize_h="true"
939                   sizeref="w"
940                   w="-26"
941                   onenter="chat_box_entry"
942                   backup_father_container_pos="true" />
943       </group>
944     </group>
945   </template>
946   <!-- ************* -->
947   <!-- GROUP OF CHAT -->
948   <!-- ************* -->
949   <!-- Change those value to change the tab color wether a new message is present or not -->
950   <define id="chat_group_tab_color_normal"
951           value="255 255 255 128" />
952   <define id="chat_group_tab_color_newmsg"
953           value="255 100 100 220" />
954   <group type="menu"
955          id="user_chat_target_menu"
956          extends="base_menu"
957          formatted="true">
958     <action id="around"
959             name="uiFilterMenuAround"
960             handler="chat_target_selected"
961             params="say"
962             formatted="true" />
963     <action id="region"
964             name="uiFilterMenuRegion"
965             handler="chat_target_selected"
966             params="region"
967             formatted="true" />
968     <action id="universe"
969             name="uiFilterMenuUniverse"
970             handler="chat_target_selected"
971             params="universe"
972             formatted="true" />
973     <action id="team"
974             name="uiFilterMenuTeam"
975             handler="chat_target_selected"
976             params="team"
977             formatted="true" />
978     <action id="guild"
979             name="uiFilterMenuGuild"
980             handler="chat_target_selected"
981             params="guild"
982             formatted="true" />
983   </group>
984   <!-- actual action handlers are created in code, this just lists the emotes we want to appear in the quick access menu -->
985   <group type="menu"
986          id="user_chat_emote_menu"
987          extends="base_menu"
988          case_mode="%case_normal"
989          on_active="lua:game:updateEmoteMenu()">
990     <action id="uiEM_Wave"
991             name="uiQuickEmote" />
992     <action id="uiEM_Bow"
993             name="uiQuickEmote" />
994     <action id="uiEM_Courtly"
995             name="uiQuickEmote" />
996     <action id="uiEM_Hiha"
997             name="uiQuickEmote" />
998     <action id="uiEM_Thankful"
999             name="uiQuickEmote" />
1000     <action id="uiEM_Cheer"
1001             name="uiQuickEmote" />
1002     <action id="uiEM_Silly"
1003             name="uiQuickEmote" />
1004     <action id="uiEM_Dance"
1005             name="uiQuickEmote" />
1006     <action id="uiEM_Dramatic"
1007             name="uiQuickEmote" />
1008     <action id="uiEM_Heroic"
1009             name="uiQuickEmote" />
1010     <separator />
1011     <action id="quick_chat"
1012             name="uimQuickChat">
1013       <action id="qc0"
1014               name=""
1015               formatted="true"
1016               handler="talk_message"
1017               params="00" />
1018       <action id="qc1"
1019               name=""
1020               formatted="true"
1021               handler="talk_message"
1022               params="01" />
1023       <action id="qc2"
1024               name=""
1025               formatted="true"
1026               handler="talk_message"
1027               params="02" />
1028       <action id="qc3"
1029               name=""
1030               formatted="true"
1031               handler="talk_message"
1032               params="03" />
1033       <action id="qc4"
1034               name=""
1035               formatted="true"
1036               handler="talk_message"
1037               params="04" />
1038       <action id="qc5"
1039               name=""
1040               formatted="true"
1041               handler="talk_message"
1042               params="05" />
1043       <action id="qc6"
1044               name=""
1045               formatted="true"
1046               handler="talk_message"
1047               params="06" />
1048       <action id="qc7"
1049               name=""
1050               formatted="true"
1051               handler="talk_message"
1052               params="07" />
1053       <action id="qc8"
1054               name=""
1055               formatted="true"
1056               handler="talk_message"
1057               params="08" />
1058       <action id="qc9"
1059               name=""
1060               formatted="true"
1061               handler="talk_message"
1062               params="09" />
1063     </action>
1064     <separator />
1065   </group>
1066   <!-- a template of a dynamic chat tab -->
1067   <template name="temp_tab_dyn_chat"
1068             keep="true"
1069             nb=""
1070             id=""
1071             posparent=""
1072             posref="TR TL">
1073     <ctrl style="tab_button_new"
1074           id="#id"
1075           group="content:cb:dyn_chat#nb"
1076           posparent="#posparent"
1077           posref="#posref"
1078           textid="SERVER:DYN_CHAT:CHANNEL#nb:NAME"
1079           dynamic_string="true"
1080           onclick_r="set"
1081           params_r="dblink=UI:SAVE:ISDETACHED:DYNAMIC_CHAT#nb|value=1"
1082           onclick_l="chat_group_filter"
1083           params_l="dyn_chat#nb" />
1084     <link expr="and(and(ne(@SERVER:DYN_CHAT:CHANNEL#nb:NAME,0), @UI:SAVE:ISENABLED:DYNAMIC_CHAT#nb),
1085                     not(@UI:SAVE:ISDETACHED:DYNAMIC_CHAT#nb))"
1086           target="#id:active" />
1087   </template>
1088   <!-- To know if a dynamic chat has been selected and which -->
1089   <variable entry="UI:VARIABLES:MAIN_CHAT:WRITE_RIGHT"
1090             type="sint32"
1091             value="1" />
1092   <variable entry="UI:VARIABLES:MAIN_CHAT:IS_DYN_CHAT"
1093             type="sint32"
1094             value="0" />
1095   <variable entry="UI:VARIABLES:MAIN_CHAT:INDEX_DYN_CHAT"
1096             type="sint32"
1097             value="0" />
1098   <define id="canWriteToMainChat"
1099           value="and(@UI:VARIABLES:MAIN_CHAT:WRITE_RIGHT, or(not(@UI:VARIABLES:MAIN_CHAT:IS_DYN_CHAT), @SERVER:DYN_CHAT:CHANNEL[UI:VARIABLES:MAIN_CHAT:INDEX_DYN_CHAT]:WRITE_RIGHT))" />
1100   <proc id="main_chat_group_active">
1101     <action handler="set"
1102             params="dblink=UI:VARIABLES:ISACTIVE:CHAT_GROUP|value=1" />
1103     <action handler="set"
1104             params="dblink=UI:SAVE:ISDETACHED:CHAT_GROUP|value=1" />
1105   </proc>
1106   <proc id="main_chat_group_deactive">
1107     <action handler="set"
1108             params="dblink=UI:VARIABLES:ISACTIVE:CHAT_GROUP|value=0" />
1109     <action handler="set"
1110             params="dblink=UI:SAVE:ISDETACHED:CHAT_GROUP|value=0" />
1111   </proc>
1112   <!-- the main chat group -->
1113   <!-- IMPORTANT : below there are no 'on_active' & 'on_deactive' because these are set by C++ code -->
1114   <!-- these will call the 'main_chat_group_active' & 'main_chat_group_deactive' above -->
1115   <template name="main_chat_group"
1116             keep="true"
1117             posparent="parent"
1118             w="256"
1119             h="64"
1120             title="">
1121     <group type="container"
1122            id="#id"
1123            w="#w"
1124            h="#h"
1125            posparent="#posparent"
1126            resizer="true"
1127            openable="false"
1128            popable="false"
1129            open_when_popup="true"
1130            header_active="false"
1131            right_button="false"
1132            pop_min_w="244"
1133            pop_min_h="128"
1134            pop_max_w="2000"
1135            pop_max_h="1600"
1136            global_color="false"
1137            global_color_over="true"
1138            lockable="true"
1139            help_page="interf_chat.html"
1140            resizer_top_size="5">
1141       <group id="header_closed"
1142              x="0"
1143              y="0"
1144              h="0"
1145              posref="TL TL"></group>
1146       <group id="header_opened"
1147              x="0"
1148              y="0"
1149              w="100"
1150              h="28"
1151              posref="TL TL"
1152              group_onclick_r="select_chat_source">
1153         <group type="tab"
1154                id="channel_select"
1155                child_resize_w="true"
1156                h="24"
1157                posref="TL TL"
1158                x="0"
1159                y="-4">
1160           <ctrl style="tab_button_new"
1161                 id="tab0"
1162                 x="0"
1163                 posref="TL TL"
1164                 group="content:cb:around"
1165                 hardtext="uitabChatAround"
1166                 onclick_r="set"
1167                 params_r="dblink=UI:SAVE:ISDETACHED:AROUND_ME|value=1"
1168                 onclick_l="chat_group_filter"
1169                 params_l="around"
1170                 tooltip="uittChatAround"
1171                 tooltip_parent="win" />
1172           <ctrl style="tab_button_new"
1173                 id="tab1"
1174                 posparent="tab0"
1175                 group="content:cb:region"
1176                 hardtext="uitabChatRegion"
1177                 onclick_r="set"
1178                 params_r="dblink=UI:SAVE:ISDETACHED:REGION_CHAT|value=1"
1179                 onclick_l="chat_group_filter"
1180                 params_l="region"
1181                 tooltip="uittChatRegion"
1182                 tooltip_parent="win" />
1183           <ctrl style="tab_button_new"
1184                 id="tab2"
1185                 posparent="tab1"
1186                 group="content:cb:team"
1187                 hardtext="uitabChatTeam"
1188                 onclick_r="set"
1189                 params_r="dblink=UI:SAVE:ISDETACHED:TEAM_CHAT|value=1"
1190                 onclick_l="chat_group_filter"
1191                 params_l="team"
1192                 tooltip="uittChatTeam"
1193                 tooltip_parent="win" />
1194           <ctrl style="tab_button_new"
1195                 id="tab3"
1196                 posparent="tab2"
1197                 group="content:cb:guild"
1198                 hardtext="uitabChatGuild"
1199                 onclick_r="set"
1200                 params_r="dblink=UI:SAVE:ISDETACHED:GUILD_CHAT|value=1"
1201                 onclick_l="chat_group_filter"
1202                 params_l="guild"
1203                 tooltip="uittChatGuild"
1204                 tooltip_parent="win" />
1205           <!-- Yes order is strange, but don't want to modify all the ugly hardcoded code -->
1206           <ctrl style="tab_button_new"
1207                 id="tab6"
1208                 posparent="tab3"
1209                 group="content:cb:universe"
1210                 hardtext="uitabChatUniverse"
1211                 onclick_r="set"
1212                 params_r="dblink=UI:SAVE:ISDETACHED:UNIVERSE_CHAT|value=1"
1213                 onclick_l="chat_group_filter"
1214                 params_l="universe"
1215                 tooltip="uittChatUniverse"
1216                 tooltip_parent="win" />
1217           <ctrl style="tab_button_new"
1218                 id="tab4"
1219                 posparent="tab6"
1220                 group="content:cb:sysinfo"
1221                 hardtext="uitabChatSysInfo"
1222                 onclick_r="set"
1223                 params_r="dblink=UI:SAVE:ISDETACHED:SYSTEM_INFO|value=1"
1224                 onclick_l="chat_group_filter"
1225                 params_l="sysinfo"
1226                 tooltip="uittChatSysInfo"
1227                 tooltip_parent="win" />
1228           <ctrl style="tab_button_new"
1229                 id="tab5"
1230                 posparent="tab4"
1231                 group="content:cb:user"
1232                 hardtext="uitabChatUser"
1233                 onclick_l="chat_group_filter"
1234                 params_l="user"
1235                 tooltip="uittChatUser"
1236                 tooltip_parent="win" />
1237           <!-- Fixed number of dynamic chat allowed. force  _firstpos and _nextpos to have correctly aligned tab-->
1238           <vector template="temp_tab_dyn_chat"
1239                   _size="%max_dyn_chan_per_player"
1240                   id="tab_array0_$i"
1241                   nb="$i"
1242                   posparent="tab5"
1243                   _firstpos="TR TL"
1244                   _nextpos="TR TL" />
1245           <!-- Show or hide tabs : a tab is visible if it is not filtered into the user chat AND not detached -->
1246           <link expr="and(@UI:SAVE:ISENABLED:AROUND_ME,
1247                                                                 not(@UI:SAVE:ISDETACHED:AROUND_ME))"
1248                 target="tab0:active" />
1249           <link expr="and(@UI:SAVE:ISENABLED:REGION_CHAT,
1250                                                                 not(@UI:SAVE:ISDETACHED:REGION_CHAT))"
1251                 target="tab1:active" />
1252           <link expr="and(@UI:SAVE:ISENABLED:UNIVERSE_CHAT,
1253                                                                 not(@UI:SAVE:ISDETACHED:UNIVERSE_CHAT))"
1254                 target="tab6:active" />
1255           <link expr="and (and(%is_team_present, @UI:SAVE:ISENABLED:TEAM_CHAT),
1256                                                                 not(@UI:SAVE:ISDETACHED:TEAM_CHAT))"
1257                 target="tab2:active" />
1258           <link expr="and (and(%is_guild_present,@UI:SAVE:ISENABLED:GUILD_CHAT),
1259                                                                 not(@UI:SAVE:ISDETACHED:GUILD_CHAT))"
1260                 target="tab3:active" />
1261           <link expr="and(@UI:SAVE:ISENABLED:SYSTEM_INFO,
1262                                                                 not(@UI:SAVE:ISDETACHED:SYSTEM_INFO))"
1263                 target="tab4:active" />
1264           <link expr="not(@UI:SAVE:ISDETACHED:USER_CHAT)"
1265                 target="tab5:active" />
1266           <!-- Show individual chat windows if needed -->
1267           <link expr="and (@UI:SAVE:ISENABLED:AROUND_ME, 
1268                                                                 @UI:SAVE:ISDETACHED:AROUND_ME)"
1269                 target="ui:interface:around_me:active" />
1270           <link expr="and (@UI:SAVE:ISENABLED:REGION_CHAT,
1271                                                                 @UI:SAVE:ISDETACHED:REGION_CHAT)"
1272                 target="ui:interface:region_chat:active" />
1273           <link expr="and (@UI:SAVE:ISENABLED:UNIVERSE_CHAT,
1274                                                                 @UI:SAVE:ISDETACHED:UNIVERSE_CHAT)"
1275                 target="ui:interface:universe_chat:active" />
1276           <link expr="and (and(%is_team_present, @UI:SAVE:ISENABLED:TEAM_CHAT),
1277                                                                 @UI:SAVE:ISDETACHED:TEAM_CHAT)"
1278                 target="ui:interface:team_chat:active" />
1279           <link expr="and (and(%is_guild_present,@UI:SAVE:ISENABLED:GUILD_CHAT),
1280                                                                 @UI:SAVE:ISDETACHED:GUILD_CHAT)"
1281                 target="ui:interface:guild_chat:active" />
1282           <link expr="and (@UI:SAVE:ISENABLED:SYSTEM_INFO,
1283                                                                 @UI:SAVE:ISDETACHED:SYSTEM_INFO)"
1284                 target="ui:interface:system_info:active" />
1285           <link expr="@UI:SAVE:ISDETACHED:USER_CHAT"
1286                 target="ui:interface:user_chat:active" />
1287         </group>
1288         <view type="bitmap"
1289               id="sep"
1290               posparent="channel_select"
1291               posref="BR BL"
1292               sizeparent="parent"
1293               sizeref="w"
1294               w="0"
1295               h="1"
1296               scale="true"
1297               texture="blank.tga"
1298               color="166 166 166 255" />
1299       </group>
1300       <group id="content"
1301              x="0"
1302              y="0"
1303              h="100"
1304              posref="TL TL">
1305         <group id="cb"
1306                posref="TL TL"
1307                sizeref="wh"
1308                y="-4"
1309                w="0"
1310                h="-32">
1311           <instance template="chat_box_mainchat"
1312                     id="around"
1313                     posref="TL TL"
1314                     sizeref="wh"
1315                     y="0"
1316                     w="0"
1317                     h="0" />
1318           <instance template="chat_box_mainchat"
1319                     id="region"
1320                     posref="TL TL"
1321                     sizeref="wh"
1322                     y="0"
1323                     w="0"
1324                     h="0" />
1325           <instance template="chat_box_mainchat"
1326                     id="team"
1327                     posref="TL TL"
1328                     sizeref="wh"
1329                     y="0"
1330                     w="0"
1331                     h="0" />
1332           <instance template="chat_box_mainchat"
1333                     id="guild"
1334                     posref="TL TL"
1335                     sizeref="wh"
1336                     y="0"
1337                     w="0"
1338                     h="0" />
1339           <instance template="chat_box_mainchat"
1340                     id="universe"
1341                     posref="TL TL"
1342                     sizeref="wh"
1343                     y="0"
1344                     w="0"
1345                     h="0" />
1346           <instance template="chat_box_mainchat"
1347                     id="sysinfo"
1348                     posref="TL TL"
1349                     sizeref="wh"
1350                     y="0"
1351                     w="0"
1352                     h="0" />
1353           <instance template="chat_box_mainchat"
1354                     id="user"
1355                     posref="TL TL"
1356                     sizeref="wh"
1357                     y="0"
1358                     w="0"
1359                     h="0" />
1360           <!-- Fixed number of dynamic chat allowed -->
1361           <vector template="chat_box_mainchat"
1362                   id="dyn_chat$i"
1363                   _size="%max_dyn_chan_per_player"
1364                   posref="TL TL"
1365                   sizeref="wh"
1366                   y="0"
1367                   w="0"
1368                   h="0" />
1369         </group>
1370         <instance template="edit_box_widget"
1371                   id="ebw"
1372                   posref="BL TL"
1373                   posparent="cb"
1374                   y="-4"
1375                   child_resize_h="true"
1376                   sizeref="w"
1377                   w="60"
1378                   onenter="chat_box_entry"
1379                   reset_focus_on_hide="false"
1380                   backup_father_container_pos="true" />
1381         <ctrl style="text_button_16"
1382               id="but_user"
1383               posref="BL TL"
1384               posparent="cb"
1385               x="0"
1386               y="-6"
1387               hardtext="uiFilterAround"
1388               tooltip="uittFilterChat"
1389               tooltip_parent="win"
1390               onclick_l="select_chat_target"
1391               params_l="menu=ui:interface:user_chat_target_menu|party_chats=false"
1392               case_mode="%case_normal" />
1393         <ctrl style="text_button_16"
1394               id="but_emote"
1395               posref="BR TR"
1396               posparent="cb"
1397               x="0"
1398               y="-6"
1399               hardtext="uiEmoteTitle"
1400               tooltip="uittEmote"
1401               tooltip_parent="win"
1402               active="false"
1403               onclick_l="active_menu"
1404               params_l="menu=ui:interface:user_chat_emote_menu" />
1405         <view type="text"
1406               id="cant_write_ebw"
1407               posref="BL TL"
1408               posparent="cb"
1409               y="-8"
1410               hardtext="uiCannotWriteDynChat"
1411               global_color="true"
1412               fontsize="10"
1413               shadow="true" />
1414         <!-- if dynamic chat, show the edit box only if write enabled -->
1415         <link expr="%canWriteToMainChat"
1416               target="ebw:active" />
1417         <link expr="%canWriteToMainChat"
1418               target="ebw:eb:enter_recover_focus" />
1419         <!-- important else if press enter, then the edit box is reactivated! -->
1420         <link expr="not(%canWriteToMainChat)"
1421               target="cant_write_ebw:active" />
1422       </group>
1423     </group>
1424   </template>
1425   <!-- each time the chat colors are changed, must reset the chat group prompt -->
1426   <link expr="@UI:SAVE:CHAT:COLORS"
1427         action="chat_group_update_prompt" />
1428   <!-- ************************ -->
1429   <!-- * SYSTEM INFO TEMPLATE * -->
1430   <!-- ************************ -->
1431   <template name="system_info_id"
1432             keep="true"
1433             w="256"
1434             h="16"
1435             title=""
1436             title_opened="uiInfosSystem">
1437     <group type="container"
1438            id="#id"
1439            w="#w"
1440            h="#h"
1441            title="#title"
1442            title_opened="#title_opened"
1443            resizer="true"
1444            openable="false"
1445            popable="false"
1446            open_when_popup="true"
1447            pop_min_w="256"
1448            pop_min_h="96"
1449            pop_max_w="2000"
1450            pop_max_h="1600"
1451            lockable="true"
1452            header_color="UI:SAVE:WIN:COLORS:COM"
1453            global_color="false"
1454            global_color_over="true">
1455       <group id="header_closed"
1456              x="0"
1457              y="0"
1458              w="176"
1459              h="16"
1460              posref="TL TL"></group>
1461       <group id="header_opened"
1462              x="0"
1463              y="0"
1464              w="176"
1465              h="16"
1466              posref="TL TL"></group>
1467       <group id="content"
1468              x="0"
1469              y="0"
1470              w="0"
1471              h="0"
1472              posref="TL TL">
1473         <instance template="chat_box"
1474                   chat="true"
1475                   id="cb"
1476                   posref="TL TL"
1477                   sizeref="wh"
1478                   y="0"
1479                   w="0"
1480                   h="0" />
1481       </group>
1482     </group>
1483   </template>
1484   <!-- ************* -->
1485   <!-- * TEAM_CHAT * -->
1486   <!-- ************* -->
1487   <proc id="team_chat_proc_close">
1488     <action handler="set"
1489             params="dblink=UI:SAVE:ISDETACHED:TEAM_CHAT|value=0" />
1490   </proc>
1491   <!-- ************* -->
1492   <!-- * AROUND_ME * -->
1493   <!-- ************* -->
1494   <proc id="around_me_chat_proc_close">
1495     <action handler="set"
1496             params="dblink=UI:SAVE:ISDETACHED:AROUND_ME|value=0" />
1497   </proc>
1498   <!-- *************** -->
1499   <!-- * REGION CHAT * -->
1500   <!-- *************** -->
1501   <proc id="region_chat_proc_close">
1502     <action handler="set"
1503             params="dblink=UI:SAVE:ISDETACHED:REGION_CHAT|value=0" />
1504   </proc>
1505   <!-- ***************** -->
1506   <!-- * UNIVERSE CHAT * -->
1507   <!-- ***************** -->
1508   <proc id="universe_chat_proc_close">
1509     <action handler="set"
1510             params="dblink=UI:SAVE:ISDETACHED:UNIVERSE_CHAT|value=0" />
1511   </proc>
1512   <!-- When the universe chat is activated, we must display a warning the first time 
1513         Must do it on the variable manipulation, not when the window is shown (because it is always shown/hid at start of game)
1515   <link expr="@UI:SAVE:ISDETACHED:UNIVERSE_CHAT"
1516         cond="eq(@UI:SAVE:ISDETACHED:UNIVERSE_CHAT,1)"
1517         action="set"
1518         params="dblink=UI:VARIABLES:UNIVERSE_CHANEL_WARNING_WANTED|value=1" />
1519   <!-- *************** -->
1520   <!-- * SYSTEM INFO * -->
1521   <!-- *************** -->
1522   <proc id="sysinfo_chat_proc_close">
1523     <action handler="set"
1524             params="dblink=UI:SAVE:ISDETACHED:SYSTEM_INFO|value=0" />
1525   </proc>
1526   <!-- ************* -->
1527   <!-- * AROUND_ME * -->
1528   <!-- ************* -->
1529   <proc id="around_me_chat_proc_active"></proc>
1530   <proc id="around_me_chat_proc_deactive">
1531     <action handler="set"
1532             params="dblink=UI:SAVE:ISDETACHED:AROUND_ME|value=0" />
1533   </proc>
1534   <!-- *************** -->
1535   <!-- * REGION CHAT * -->
1536   <!-- *************** -->
1537   <proc id="region_chat_proc_active"></proc>
1538   <proc id="region_chat_proc_deactive">
1539     <action handler="set"
1540             params="dblink=UI:SAVE:ISDETACHED:REGION_CHAT|value=0" />
1541   </proc>
1542   <!-- *************** -->
1543   <!-- * SYSTEM INFO * -->
1544   <!-- *************** -->
1545   <proc id="sysinfo_chat_proc_active"></proc>
1546   <proc id="sysinfo_chat_proc_deactive">
1547     <action handler="set"
1548             params="dblink=UI:SAVE:ISDETACHED:SYSTEM_INFO|value=0" />
1549   </proc>
1550   <!-- ************* -->
1551   <!-- * TEAM_LIST * -->
1552   <!-- ************* -->
1553   <!-- team_list container is defined in code -->
1554   <proc id="team_list_proc_active">
1555     <action handler="set"
1556             params="dblink=UI:VARIABLES:ISACTIVE:TEAM_LIST|value=1" />
1557     <action handler="set"
1558             cond="not(%is_team_present)"
1559             params="target='ui:interface:team_list:active'|value=0" />
1560   </proc>
1561   <proc id="team_list_proc_deactive">
1562     <action handler="set"
1563             params="dblink=UI:VARIABLES:ISACTIVE:TEAM_LIST|value=0" />
1564   </proc>
1565   <!-- To Open/Close the Team window auto (but the user is allowed to close it) -->
1566   <variable entry="UI:VARIABLES:IS_TEAM_PRESENT"
1567             type="sint32"
1568             value="0" />
1569   <link expr="%is_team_present"
1570         action="set"
1571         params="dblink=UI:VARIABLES:IS_TEAM_PRESENT|value=%is_team_present" />
1572   <!-- ************* -->
1573   <!-- * TEAM CHAT * -->
1574   <!-- ************* -->
1575   <link expr="%is_team_present"
1576         action="leave_team_chat" />
1577   <!-- ********************** -->
1578   <!-- * TEAM_MATE TEMPLATE * -->
1579   <!-- ********************** -->
1580   <template name="mate_id"
1581             keep="true"
1582             posparent="parent"
1583             w="256"
1584             h="64"
1585             title=""
1586             leader="0"
1587             team_mate_index="">
1588     <group type="container"
1589            id="#id"
1590            w="#w"
1591            h="#h"
1592            posparent="#posparent"
1593            title="#title"
1594            title_opened="#title"
1595            popable="false"
1596            openable="false"
1597            open_when_popup="true"
1598            pop_min_w="246"
1599            pop_min_h="96"
1600            pop_max_w="2000"
1601            pop_max_h="1600"
1602            global_color="false"
1603            global_color_over="true"
1604            lockable="true">
1605       <group id="header_closed"
1606              x="0"
1607              y="0"
1608              h="14"
1609              posref="TL TL">
1610         <view type="bar3"
1611               id="jauges"
1612               posref="MR MR"
1613               mini="true"
1614               x="-16"
1615               color1="%sta_color"
1616               value1="UI:VARIABLES:BARS:TEAM:#team_mate_index:STA"
1617               range1="UI:CONST:127"
1618               color2="%sap_color"
1619               value2="UI:VARIABLES:BARS:TEAM:#team_mate_index:SAP"
1620               range2="UI:CONST:127"
1621               color3="%hp_color"
1622               color3_negative="%hp_color_neg"
1623               value3="UI:VARIABLES:BARS:TEAM:#team_mate_index:HP"
1624               range3="UI:CONST:127" />
1625         <view type="bitmap"
1626               id="lead"
1627               posparent="jauges"
1628               posref="ML MR"
1629               x="-4"
1630               y="1"
1631               texture="w_leader.tga"
1632               global_color="false"
1633               active="false" />
1634         <view type="bitmap"
1635               id="successor"
1636               posparent="jauges"
1637               posref="ML MR"
1638               x="-4"
1639               y="1"
1640               texture="w_leader.tga"
1641               color="255 255 255 128"
1642               global_color="false"
1643               active="false" />
1644         <ctrl type="tooltip"
1645               id="ttlead"
1646               tooltip="uittLead"
1647               instant_help="true"
1648               posparent="lead"
1649               posref="TL TL"
1650               x="0"
1651               y="0"
1652               sizeref="wh"
1653               w="0"
1654               h="0" />
1655         <ctrl type="tooltip"
1656               id="ttsucc"
1657               tooltip="uittSuccessor"
1658               instant_help="true"
1659               posparent="successor"
1660               posref="TL TL"
1661               x="0"
1662               y="0"
1663               sizeref="wh"
1664               w="0"
1665               h="0" />
1666         <!-- BIG TRANSPARENT BUTTON TO TARGET THE TEAM MEMBER. w="-16" to let the "popup" button work -->
1667         <ctrl type="button"
1668               id="stop_button"
1669               button_type="push_button"
1670               posref="ML ML"
1671               sizeref="wh"
1672               w="-16"
1673               h="0"
1674               scale="true"
1675               tx_normal="blank.tga"
1676               tx_pushed="blank.tga"
1677               tx_over="blank.tga"
1678               color="0 0 0 0"
1679               col_pushed="0 0 0 0"
1680               col_over="255 255 255 32"
1681               onclick_l="team_target"
1682               params_l="#team_mate_index" />
1683         <!-- Button to activate the chat -->
1684         <ctrl type="button"
1685               id="chat_button"
1686               button_type="push_button"
1687               posref="MR MR"
1688               tx_normal="contact_chat.tga"
1689               tx_pushed="contact_chat.tga"
1690               tx_over="W_button_14_over.tga"
1691               global_color_normal="false"
1692               global_color_over="true"
1693               global_color_pushed="false"
1694               onclick_l="contact_direct_chat" />
1695         <!-- links to display lead or successor -->
1696         <link expr="eq(@SERVER:GROUP:LEADER_INDEX, #team_mate_index)"
1697               target="lead:active" />
1698         <link expr="eq(@SERVER:GROUP:SUCCESSOR_INDEX, #team_mate_index)"
1699               target="successor:active" />
1700         <link expr="eq(@SERVER:GROUP:LEADER_INDEX, #team_mate_index)"
1701               target="ttlead:active" />
1702         <link expr="eq(@SERVER:GROUP:SUCCESSOR_INDEX, #team_mate_index)"
1703               target="ttsucc:active" />
1704       </group>
1705       <!--            
1706                 <group id="header_opened" x="0" y="0" w="160" child_resize_h="true" child_resize_hmargin="4" posref="TL TL" >
1707                         <view type="bar3" id="jauges" posref="TR TR" y="0" mini="true" x="-16"
1708                                                                 color1="%sta_color" value1="UI:VARIABLES:BARS:TEAM:#team_mate_index:STA"        range1="UI:CONST:127" 
1709                                                                 color2="%sap_color"     value2="UI:VARIABLES:BARS:TEAM:#team_mate_index:SAP"            range2="UI:CONST:127"
1710                                                                 color3="%hp_color" color3_negative="%hp_color_neg" value3="UI:VARIABLES:BARS:TEAM:#team_mate_index:HP"  range3="UI:CONST:127" />
1711                         <view type="bitmap" id="lead" posparent="jauges" posref="ML MR" x="-4" y="1" texture="w_leader.tga" global_color="false" />
1712                         <view type="bitmap" id="successor" posparent="jauges" posref="ML MR" x="-4" y="1" texture="w_leader.tga" global_color="false" color="255 255 255 128" active="false"/>
1713                         
1714                         <ctrl type="tooltip" id="ttlead" tooltip="uittLead" instant_help="true" posparent="lead" posref="TL TL" x="0" y="0" sizeref="wh" w="0" h="0" />
1715                         <ctrl type="tooltip" id="ttsucc" tooltip="uittSuccessor" instant_help="true" posparent="successor" posref="TL TL" x="0" y="0" sizeref="wh" w="0" h="0" />
1716                                                 
1717                         <! - chat box - >
1718                         <instance template="chat_box" id="cb" posref="TR TR" sizeref="w" y="-8" w="0" h="64" min_height="64" max_height="1600"/>
1719                         <instance template="edit_box_widget" id="ebw" posref="BR TR" y="0" posparent="cb" child_resize_h="true" sizeref="w" w="-10" onenter="contact_entry" backup_father_container_pos="true"/>
1720                                                 
1721                         <! - links to display lead or successor - >
1722                         <link expr="eq(@SERVER:GROUP:LEADER_INDEX, #team_mate_index)" target="lead:active"/>
1723                         <link expr="eq(@SERVER:GROUP:SUCCESSOR_INDEX, #team_mate_index)" target="successor:active"/>
1724                         
1725                         <link expr="eq(@SERVER:GROUP:LEADER_INDEX, #team_mate_index)" target="ttlead:active"/>
1726                         <link expr="eq(@SERVER:GROUP:SUCCESSOR_INDEX, #team_mate_index)" target="ttsucc:active"/>
1727                         
1728                 </group>                                        
1729                 -->
1730       <!-- link to display the group when the team member is present -->
1731       <link expr="ne(@SERVER:GROUP:#team_mate_index:NAME, 0)"
1732             target="active" />
1733       <!-- links to display the name of the team mate -->
1734       <link expr="depends(@SERVER:GROUP:#team_mate_index:NAME)"
1735             action="set_server_id"
1736             params="value=@SERVER:GROUP:#team_mate_index:NAME|target=uc_title|remove_title=1" />
1737       <!-- links to change the name color if it is the target -->
1738       <link expr="ifthenelse(eq(@SERVER:GROUP:#team_mate_index:UID,@UI:VARIABLES:TARGET:UID),
1739                                                                 '255 0 0 255',
1740                                                                 '255 255 255 255')"
1741             target="title_color" />
1742       <!-- links to Open a Quick Help when a new team member comes. Only if the team_list window is not opeded -->
1743       <link expr="depends(@SERVER:GROUP:#team_mate_index:PRESENT)"
1744             action="context_help_html"
1745             params="team_list"
1746             cond="and(@SERVER:GROUP:#team_mate_index:PRESENT,eq(@UI:VARIABLES:ISACTIVE:TEAM_LIST,0))" />
1747     </group>
1748   </template>
1749   <!-- ******************** -->
1750   <!-- * CONTACT TEMPLATE * -->
1751   <!-- ******************** -->
1752   <!-- a contact of the ignore list -->
1753   <template name="contact_id_ignore"
1754             keep="true"
1755             posparent="parent"
1756             w="160"
1757             h="64"
1758             title="">
1759     <group type="container"
1760            id="#id"
1761            w="#w"
1762            posparent="#posparent"
1763            title="#title"
1764            title_opened="#title"
1765            openable="false"
1766            popable="false"
1767            movable_in_parent_list="true"
1768            header_color="UI:SAVE:WIN:COLORS:COM">
1769       <group id="header_closed"
1770              x="0"
1771              y="0"
1772              h="12"
1773              posref="TL TL">
1774         <view type="bitmap"
1775               id="blocked"
1776               posref="MR MR"
1777               x="-20"
1778               y="0"
1779               texture="w_answer_16_cancel.tga"
1780               global_color="false"
1781               active="false" />
1782       </group>
1783     </group>
1784   </template>
1785   <!-- a contact of the friend list -->
1786   <template name="contact_id_friend"
1787             keep="true"
1788             posparent="parent"
1789             w="256"
1790             h="64"
1791             title="">
1792     <group type="container"
1793            id="#id"
1794            w="#w"
1795            posparent="#posparent"
1796            title="#title"
1797            openable="false"
1798            popable="false"
1799            open_when_popup="true"
1800            pop_min_w="216"
1801            pop_min_h="96"
1802            pop_max_w="2000"
1803            pop_max_h="1600"
1804            header_color="UI:SAVE:WIN:COLORS:COM"
1805            global_color="false"
1806            global_color_over="true"
1807            lockable="true"
1808            movable_in_parent_list="true">
1809       <group id="header_closed"
1810              x="0"
1811              y="0"
1812              h="12"
1813              posref="TL TL"
1814              group_onclick_l="tell_contact">
1815         <ctrl type="button"
1816               id="chat_button"
1817               button_type="push_button"
1818               posref="MR MR"
1819               x="-4"
1820               tx_normal="contact_chat.tga"
1821               tx_pushed="contact_chat.tga"
1822               tx_over="W_button_14_over.tga"
1823               global_color_normal="false"
1824               global_color_over="true"
1825               global_color_pushed="false"
1826               onclick_l="contact_direct_chat"
1827               tooltip="uittTell"
1828               tooltip_parent="win" />
1829         <view type="bitmap"
1830               id="online"
1831               posref="MR MR"
1832               x="-20"
1833               texture="w_online.tga"
1834               global_color="false" />
1835         <ctrl type="tooltip"
1836               id="tt_online"
1837               posparent="online"
1838               posref="MR MR"
1839               x="0"
1840               y="0"
1841               sizeref="wh"
1842               w="0"
1843               h="0"
1844               tooltip="uittFriendsOnline"
1845               tooltip_parent="win" />
1846         <ctrl type="button"
1847               id="profile_button"
1848               button_type="push_button"
1849               posref="MR MR"
1850               x="-36"
1851               tx_normal="inf.tga"
1852               tx_pushed="inf.tga"
1853               tx_over="info.tga"
1854               global_color_normal="false"
1855               global_color_over="false"
1856               global_color_pushed="false"
1857               onclick_l="open_title_help"
1858               params_l="a teamInvite contact"
1859               tooltip="uittContactInfo"
1860               tooltip_parent="win" />
1861                 <!-- add team invite button -->
1862                 <ctrl type="button"
1863               id="invite_button"
1864               button_type="push_button"
1865               posref="MR MR"
1866               x="-52"
1867               tx_normal=""
1868               tx_pushed="invt.tga"
1869               tx_over="invto.tga"
1870               global_color_normal="false"
1871               global_color_over="false"
1872               global_color_pushed="false"
1873               onclick_l="lua:game:teamInvite('#id')"
1874               tooltip="uimGcmInvit"
1875               tooltip_parent="win" />
1876                 <link expr="depends(@UI:VARIABLES:PING)" action="lua" params="game:updateFLinvB('#id')" />
1877         <view type="bitmap"
1878               id="blocked"
1879               posref="MR MR"
1880               x="-50"
1881               y="0"
1882               texture="w_answer_16_cancel.tga"
1883               global_color="false"
1884               active="false" />
1885       </group>
1886     </group>
1887   </template>
1889   <!-- when you want to directly chat with a friend -->
1890   <template name="contact_chat_friend"
1891             keep="true"
1892             posparent="parent"
1893             w="256"
1894             h="64"
1895             title="">
1896     <group type="container"
1897            id="#id"
1898            x="64"
1899            y="128"
1900            w="#w"
1901            h="64"
1902            posparent="#posparent"
1903            title="#title"
1904            resizer="true"
1905            openable="true"
1906            opened="true"
1907            popable="false"
1908            movable="true"
1909            pop_min_w="286"
1910            pop_min_h="186"
1911            pop_max_w="2000"
1912            pop_max_h="1600"
1913            header_color="UI:SAVE:WIN:COLORS:COM"
1914            global_color="false"
1915            global_color_over="true">
1916       <group id="header_closed"
1917              x="0"
1918              y="0"
1919              h="12"
1920              posref="TL TL"
1921              on_active="lua"
1922              on_active_params="game:closeTellHeader('#id')">
1923              </group>
1924       <group id="header_opened"
1925              x="0"
1926              y="0"
1927              w="200"
1928              h="16"
1929              posref="TL TL"
1930              on_active="lua"
1931              on_active_params="game:openTellHeader('#id')">
1932         <ctrl style="button_ok"
1933               id="ignore"
1934               active="true"
1935               x="-16"
1936               y="0"
1937               posref="MR MR"
1938               posparent="parent"
1939               text_y="0"
1940               onclick_l="lua"
1941               params_l="validMessageBox(i18n.get('uiAddTellerToIgnoreListWarning'), 'add_teller_to_ignore_list', 'id=ui:interface:#id', '', '' ,'ui:interface')"
1942               hardtext="uiAddTellerToIgnoreList"
1943               fontsize="10"
1944               tooltip="uiAddTellerToIgnoreListTooltip"
1945               tooltip_parent="win" />
1946         <ctrl style="button_ok"
1947               id="new_friend"
1948               active="true"
1949               x="-2"
1950               y="0"
1951               posref="ML MR"
1952               posparent="ignore"
1953               text_y="0"
1954               onclick_l="add_teller_to_friend_list"
1955               params_l=""
1956               hardtext="uiAddTellerToFriends"
1957               fontsize="10"
1958               tooltip="uiAddTellerToFriendsToolip"
1959               tooltip_parent="win" />
1960         <ctrl style="button_ok"
1961               id="invite"
1962               active="true"
1963               x="-2"
1964               y="0"
1965               posref="ML MR"
1966               posparent="new_friend"
1967               text_y="0"
1968               onclick_l="lua:game:teamInvite('#id')"
1969               params_l=""
1970               hardtext="uiInviteToRingSession"
1971               fontsize="10"
1972               tooltip="uimGcmInvit"
1973               tooltip_parent="win" />
1974       </group>
1975       <group id="content"
1976              x="0"
1977              y="0"
1978              w="0"
1979              h="0"
1980              posref="TL TL">
1981         <instance template="chat_box"
1982                   id="cb"
1983                   posref="TR TR"
1984                   sizeref="wh"
1985                   y="0"
1986                   w="0"
1987                   h="-24" />
1988         <instance template="edit_box_widget"
1989                   id="ebw"
1990                   posref="BR TR"
1991                   y="0"
1992                   posparent="cb"
1993                   child_resize_h="true"
1994                   sizeref="w"
1995                   w="-10"
1996                   onenter="contact_entry"
1997                   backup_father_container_pos="true" />
1998       </group>
1999     </group>
2000   </template>
2001   <!-- *************************** -->
2002   <!-- *  BASE MENU FOR CHAT BOX * -->
2003   <!-- *************************** -->
2004   <!-- allow to create a party chat from any chat box -->
2005   <group type="menu"
2006          id="base_chat_box_menu"
2007          extends="base_menu_with_color">
2008     <separator />
2009   </group>
2010   <!-- allow to create a party chat from any chat box & to hide / show the edit box -->
2011   <group type="menu"
2012          id="base_chat_box_menu_with_eb_toggle"
2013          extends="base_chat_box_menu">
2014     <action id="toggle_chat_eb_vis"
2015             name="uimToggleChatEBVis"
2016             handler="toggle_chat_eb_vis"
2017             params="" />
2018     <separator />
2019   </group>
2020   <!-- MainChat Group menu. Code appends entries for selecting chat source (if tab is user chat) -->
2021   <template name="chat_menu_button"
2022             id="but"
2023             chat_db="AROUND_ME"
2024             keep="true">
2025     <group id="#id"
2026            posref="TL TL"
2027            x="0"
2028            y="0"
2029            w="16"
2030            h="16">
2031       <ctrl type="button"
2032             id="button"
2033             button_type="toggle_button"
2034             posref="ML ML"
2035             x="0"
2036             y="0"
2037             pushed="false"
2038             tx_normal="w_slot_on.tga"
2039             tx_pushed="w_opacity_on.tga"
2040             tx_over="w_slot_on.tga"
2041             color="255 255 255 255"
2042             col_pushed="255 255 255 255"
2043             col_over="255 255 255 0"
2044             onclick_l="lua:game:switchChatTab('#chat_db')" />
2045       <link expr="@UI:SAVE:ISENABLED:#chat_db"
2046             target="button:pushed" />
2047     </group>
2048   </template>
2049   <group type="menu"
2050          id="main_chat_source_menu"
2051          extends="base_menu_with_color">
2052     <separator />
2053       <action id="tab"
2054               name="uimChatTab">
2055         <action id="around"
2056                 name="uiAroundMe"
2057                 usergroup_l="chat_menu_button"
2058                 usergroup_params_l="chat_db=AROUND_ME" />
2059         <action id="region"
2060                 name="uiREGION"
2061                 usergroup_l="chat_menu_button"
2062                 usergroup_params_l="chat_db=REGION_CHAT" />
2063         <action id="team"
2064                 name="uiTeam"
2065                 usergroup_l="chat_menu_button"
2066                 usergroup_params_l="chat_db=TEAM_CHAT" />
2067         <action id="guild"
2068                 name="uimGuild"
2069                 usergroup_l="chat_menu_button"
2070                 usergroup_params_l="chat_db=GUILD_CHAT" />
2071         <action id="universe"
2072                 name="uiUNIVERSE"
2073                 usergroup_l="chat_menu_button"
2074                 usergroup_params_l="chat_db=UNIVERSE_CHAT" />
2075         <action id="system"
2076                 name="uiSystemInfo"
2077                 usergroup_l="chat_menu_button"
2078                 usergroup_params_l="chat_db=SYSTEM_INFO" />
2079         <!-- Bit of a hack as vector is not supported inside a submenu -->
2080         <action id="dyn0"
2081                 name="0"
2082                 usergroup_l="chat_menu_button"
2083                 usergroup_params_l="chat_db=DYNAMIC_CHAT0" />
2084         <action id="dyn1"
2085                 name="1"
2086                 usergroup_l="chat_menu_button"
2087                 usergroup_params_l="chat_db=DYNAMIC_CHAT1" />
2088         <action id="dyn2"
2089                 name="2"
2090                 usergroup_l="chat_menu_button"
2091                 usergroup_params_l="chat_db=DYNAMIC_CHAT2" />
2092         <action id="dyn3"
2093                 name="3"
2094                 usergroup_l="chat_menu_button"
2095                 usergroup_params_l="chat_db=DYNAMIC_CHAT3" />
2096         <action id="dyn4"
2097                 name="4"
2098                 usergroup_l="chat_menu_button"
2099                 usergroup_params_l="chat_db=DYNAMIC_CHAT4" />
2100         <action id="dyn5"
2101                 name="5"
2102                 usergroup_l="chat_menu_button"
2103                 usergroup_params_l="chat_db=DYNAMIC_CHAT5" />
2104         <action id="dyn6"
2105                 name="6"
2106                 usergroup_l="chat_menu_button"
2107                 usergroup_params_l="chat_db=DYNAMIC_CHAT6" />
2108         <action id="dyn7"
2109                 name="7"
2110                 usergroup_l="chat_menu_button"
2111                 usergroup_params_l="chat_db=DYNAMIC_CHAT7" />
2112       </action>
2113     <separator />
2114   </group>
2115   <!-- User Chat menu. Code append entries for selecting chat source -->
2116   <group type="menu"
2117          id="user_chat_source_menu"
2118          extends="base_menu_with_color">
2119     <separator />
2120   </group>
2121   <!-- Standard Chat menu (used for region, team, etc..) -->
2122   <group type="menu"
2123          id="std_chat_source_menu"
2124          extends="base_menu_with_color">
2125     <separator />
2126   </group>
2127   <!-- ****************** -->
2128   <!-- * AROUND ME CHAT * -->
2129   <!-- ****************** -->
2130   <!-- Menu to select the target -->
2131   <group type="menu"
2132          id="around_me_target_menu"
2133          extends="base_menu">
2134     <action id="team_target"
2135             name="uiSAY"
2136             handler="chat_target_selected"
2137             params="say" />
2138     <action id="team_target"
2139             name="uiSHOUT"
2140             handler="chat_target_selected"
2141             params="shout" />
2142   </group>
2143   <template name="around_me_id"
2144             keep="true"
2145             posparent="parent"
2146             w="256"
2147             h="64"
2148             title="">
2149     <group type="container"
2150            id="#id"
2151            w="#w"
2152            posparent="#posparent"
2153            title="#title"
2154            openable="false"
2155            popable="false"
2156            open_when_popup="true"
2157            pop_min_w="216"
2158            pop_min_h="96"
2159            pop_max_w="2000"
2160            pop_max_h="1600"
2161            header_color="UI:SAVE:WIN:COLORS:COM"
2162            global_color="false"
2163            global_color_over="true"
2164            lockable="true">
2165       <group id="header_closed"
2166              x="0"
2167              y="0"
2168              h="12"
2169              posref="TL TL"
2170              group_onclick_r="active_menu"
2171              group_params_r="menu=ui:interface:base_chat_box_menu_with_eb_toggle">
2172       </group>
2173       <group id="header_opened"
2174              x="0"
2175              y="0"
2176              w="160"
2177              h="13"
2178              posref="TL TL"
2179              group_onclick_r="active_menu"
2180              group_params_r="menu=ui:interface:base_chat_box_menu_with_eb_toggle">
2181       </group>
2182       <group id="content"
2183              x="0"
2184              y="0"
2185              h="100"
2186              posref="TL TL">
2187         <instance template="chat_box"
2188                   id="cb"
2189                   posref="TR TR"
2190                   sizeref="wh"
2191                   y="-8"
2192                   w="0"
2193                   h="-100" />
2194         <!-- display of filters -->
2195         <ctrl type="button"
2196               id="target_button"
2197               button_type="push_button"
2198               posparent="cb"
2199               posref="BL TL"
2200               y="-4"
2201               x="8"
2202               tx_normal="W_arrow_up_0.tga"
2203               tx_pushed="W_arrow_up_0.tga"
2204               tx_over="W_button_16_over.tga"
2205               color="255 255 255 128"
2206               col_pushed="255 255 255 255"
2207               onclick_l="select_chat_target"
2208               params_l="menu=ui:interface:around_me_target_menu|party_chats=false" />
2209         <instance template="edit_box_widget"
2210                   id="ebw"
2211                   posref="BR TR"
2212                   y="0"
2213                   posparent="cb"
2214                   child_resize_h="true"
2215                   sizeref="w"
2216                   w="-26"
2217                   onenter="chat_box_entry"
2218                   backup_father_container_pos="true" />
2219       </group>
2220     </group>
2221   </template>
2222   <!-- ************** -->
2223   <!-- *  TEAM MENU * -->
2224   <!-- ************** -->
2225   <!-- menu on a member of the team for the leader -->
2226   <group type="menu"
2227          id="team_member_menu"
2228          extends="base_menu_with_color">
2229     <action id="dismiss"
2230             name="uimDismiss"
2231             handler="dismiss_member"
2232             params="" />
2233     <action id="leader"
2234             name="uimSetTeamLeader"
2235             handler="set_team_leader"
2236             params=""/>
2237     <action id="successor"
2238             name="uimSetSuccesor"
2239             handler="set_successor"
2240             params=""/>
2241     <!--            <action id="emote" name="uimEmotes" hanlder="" params="">
2242                         <action id="emote1"  name="uimEmote1" handler="emote" params="emote_id=0"/>     
2243                         <action id="emote2"  name="uimEmote2" handler="emote" params="emote_id=1"/>     
2244                         <action id="emote3"  name="uimEmote3" handler="emote" params="emote_id=2"/>     
2245                         <action id="emote4"  name="uimEmote4" handler="emote" params="emote_id=3"/>     
2246                         <action id="emote5"  name="uimEmote5" handler="emote" params="emote_id=4"/>
2247                         <action id="emote6"  name="uimEmote6" handler="emote" params="emote_id=5"/>
2248                         <action id="emote7"  name="uimEmote7" handler="emote" params="emote_id=6"/>
2249                 </action>-->
2250     <!--            <action id="commands" name="uimCommands" hanlder="" params="">
2251                         <action id="command1"  name="uimCommand1" handler="" params=""/>        
2252                         <action id="command2"  name="uimCommand2" handler="" params=""/>        
2253                         <action id="command3"  name="uimCommand3" handler="" params=""/>        
2254                         <action id="command4"  name="uimCommand4" handler="" params=""/>        
2255                         <action id="command5"  name="uimCommand5" handler="" params=""/>
2256                         <action id="command6"  name="uimCommand6" handler="" params=""/>                        
2257                 </action>-->
2258     <action id="target"
2259             name="uimTarget"
2260             handler="team_target"
2261             params="" />
2262     <action id="compass"
2263             name="uimTeamCompass"
2264             handler="set_team_compas"
2265             params="compass=ui:interface:compass" />
2266     <separator />
2267   </group>
2268   <!-- links to enable leader options -->
2269   <link expr="eq(band(@SERVER:GROUP:LEADER_INDEX, 15), 15)"
2270         target="ui:interface:team_member_menu:dismiss:active" />
2271   <link expr="eq(band(@SERVER:GROUP:LEADER_INDEX, 15), 15)"
2272         target="ui:interface:team_member_menu:leader:active" />
2273   <link expr="eq(band(@SERVER:GROUP:LEADER_INDEX, 15), 15)"
2274         target="ui:interface:team_member_menu:successor:active" />
2275   <!-- menu on the chat of the team for the leader -->
2276   <group type="menu"
2277          id="team_chat_leader_menu"
2278          extends="base_chat_box_menu_with_eb_toggle">
2279     <action id="quit"
2280             name="uimQuitTeam"
2281             handler="quit_team"
2282             params="" />
2283     <action id="share_seeds"
2284             name="uimSeedsSharing"
2285             hanlder="share_seeds"
2286             params="" />
2287     <separator />
2288   </group>
2289   <group type="menu"
2290          id="team_chat_member_menu"
2291          extends="base_chat_box_menu_with_eb_toggle">
2292     <action id="quit"
2293             name="uimQuitTeam"
2294             handler="quit_team"
2295             params="" />
2296     <separator />
2297   </group>
2298   <!-- ***************** -->
2299   <!-- *  CONTACT_MENU * -->
2300   <!-- ***************** -->
2301   <group type="menu"
2302          id="friend_list_menu"
2303                  value="#value"
2304          extends="base_chat_box_menu_with_eb_toggle">
2305     <action id="remove"
2306             name="uimRemove"
2307             handler="remove_contact"
2308             params="" />
2309     <action id="move"
2310             name="uimMoveToIgnoreList"
2311             handler="move_contact"
2312             params="list=0" />
2313     <separator />
2314   </group>
2315   <group type="menu"
2316          id="friend_list_menu_offline_unblocked"
2317          extends="friend_list_menu">
2318     <!-- <action id="block"   name="uimBlock"        handler="block_contact" params=""/> -->
2319   </group>
2320   <group type="menu"
2321          id="friend_list_menu_online_unblocked"
2322          extends="friend_list_menu">
2323     <action id="remove"
2324             name="uimTell"
2325             handler="menu_tell_contact"
2326             params="" />
2327     <!-- <action id="block"   name="uimBlock"        handler="block_contact" params=""/> -->
2328   </group>
2329   <group type="menu"
2330          id="friend_list_menu_online_abroad_unblocked"
2331          extends="friend_list_menu">
2332     <action id="remove"
2333             name="uimTell"
2334             handler="menu_tell_contact"
2335             params="" />
2336     <!-- <action id="block"   name="uimBlock"        handler="block_contact" params=""/> -->
2337   </group>
2338   <group type="menu"
2339          id="friend_list_menu_offline_blocked"
2340          extends="friend_list_menu">
2341     <!-- <action id="block"   name="uimUnBlock"      handler="block_contact" params=""/> -->
2342   </group>
2343   <group type="menu"
2344          id="friend_list_menu_online_blocked"
2345          extends="friend_list_menu">
2346     <action id="remove"
2347             name="uimTell"
2348             handler="tell_contact"
2349             params="" />
2350     <!-- <action id="block"   name="uimUnBlock"      handler="block_contact" params=""/> -->
2351   </group>
2352   <group type="menu"
2353          id="friend_list_menu_online_abroad_blocked"
2354          extends="friend_list_menu">
2355     <action id="remove"
2356             name="uimTell"
2357             handler="tell_contact"
2358             params="" />
2359     <!-- <action id="block"   name="uimUnBlock"      handler="block_contact" params=""/> -->
2360   </group>
2361   <group type="menu"
2362          id="ignore_list_menu"
2363          extends="base_menu_with_color">
2364     <action id="remove"
2365             name="uimRemove"
2366             handler="remove_contact"
2367             params="" />
2368     <action id="move"
2369             name="uimMoveToFriendList"
2370             handler="move_contact"
2371             params="list=1" />
2372     <separator />
2373   </group>
2374   <!-- menu for sorting -->
2375   <group type="menu"
2376          id="sort_menu"
2377          extends="base_chat_box_menu">
2378     <action id="sort"
2379             name="uimSort"
2380             handler="sort_contacts"
2381             params="" />
2382     <separator />
2383   </group>
2384   <!-- ******************** -->
2385   <!-- *  PARTY CHAT MENU * -->
2386   <!-- ******************** -->
2387   <group type="menu"
2388          id="party_chat_menu"
2389          extends="base_chat_box_menu_with_eb_toggle">
2390     <action id="remove_party_chat"
2391             name="uimRemovePartyChat"
2392             handler="remove_party_chat"
2393             params="" />
2394     <action id="invite_party_chat"
2395             name="uimInvite"
2396             handler="party_chat_invite"
2397             params="" />
2398     <separator />
2399   </group>
2400   <!-- ************************************ -->
2401   <!-- *  PARTY CHAT MENU FOR GUILD CHIEF * -->
2402   <!-- ************************************ -->
2403   <group type="menu"
2404          id="guild_chief_party_chat_menu"
2405          extends="party_chat_menu">
2406     <action id="add_all_guild_members"
2407             name="uimAddAllGM"
2408             handler="add_all_guild_members"
2409             params="" />
2410     <action id="remove_all_guild_members"
2411             name="uimRemoveAllGM"
2412             handler="remove_all_guild_members"
2413             params="" />
2414     <separator />
2415   </group>
2416   <!-- ************************************ -->
2417   <!-- *  PARTY CHAT MENU FOR TEAM CHIEF  * -->
2418   <!-- ************************************ -->
2419   <group type="menu"
2420          id="team_chief_party_chat_menu"
2421          extends="party_chat_menu">
2422     <action id="add_all_team_members"
2423             name="uimAddAllTM"
2424             handler="add_all_team_members"
2425             params="" />
2426     <action id="remove_all_team_members"
2427             name="uimRemoveAllTM"
2428             handler="remove_all_team_members"
2429             params="" />
2430     <separator />
2431   </group>
2432   <!-- ******************************************* -->
2433   <!-- *  PARTY CHAT MENU FOR GUILD & TEAM CHIEF * -->
2434   <!-- ******************************************* -->
2435   <group type="menu"
2436          id="team_and_guild_chief_party_chat_menu"
2437          extends="team_chief_party_chat_menu">
2438     <action id="add_all_guild_members"
2439             name="uimAddAllGM"
2440             handler="add_all_guild_members"
2441             params="" />
2442     <action id="remove_all_guild_members"
2443             name="uimRemoveAllGM"
2444             handler="remove_all_guild_members"
2445             params="" />
2446     <separator />
2447   </group>
2448   <!-- ****************************************************** -->
2449   <!-- * WINDOW TO ASK IF A PLAYER WANT TO JOIN A TEAM      * -->
2450   <!-- ****************************************************** -->
2451   <!-- the modal. WARNING: change the "line_maxw" below if change the container w -->
2452   <group style="container_proposal"
2453          id="join_team_proposal"
2454          on_close_button="lua:game:teamInvitationRefuse()"
2455          title_opened="uiJoinTeamProposal">
2456     <group id="content"
2457            child_resize_h="true"
2458            child_resize_hmargin="10">
2459       <group id="inside"
2460              sizeref="w"
2461              posref="TL TL"
2462              y="-4"
2463              child_resize_h="true"
2464              child_resize_hmargin="6">
2465         <view type="text_id"
2466               id="invitor_name"
2467               posref="MM MM"
2468               x="0"
2469               y="0"
2470               color="255 255 255 255"
2471               fontsize="12"
2472               shadow="true"
2473               multi_line="true"
2474               multi_line_space="0"
2475               line_maxw="250" />
2476       </group>
2477       <instance template="button_ok_cancel"
2478                 posparent="inside"
2479                 posref="BR TR"
2480                 x="-4"
2481                 y="-4"
2482                 ok_text="uiAccept"
2483                 cancel_text="uiDecline"
2484                 onclick_ok="lua:game:teamInvitationAccept()"
2485                 onclick_ok_param=""
2486                 onclick_cancel="lua:game:teamInvitationRefuse()"
2487                 onclick_cancel_param="" />
2488     </group>
2489   </group>
2490   <tree node="join_team_proposal" />
2491   <!-- ****************************************************** -->
2492   <!-- * WINDOW TO ASK IF A PLAYER WANT TO JOIN A GUILD     * -->
2493   <!-- ****************************************************** -->
2494   <!-- the modal dont mess up with ids they are used in code -->
2495   <group style="container_proposal"
2496          id="join_guild_proposal"
2497          on_close_button="refuse_guild_invitation"
2498          title_opened="uiJoinGuildProposal">
2499     <group id="content"
2500            child_resize_h="true"
2501            child_resize_hmargin="10">
2502       <group id="inside"
2503              sizeref="w"
2504              posref="TL TL"
2505              y="-4"
2506              child_resize_h="true"
2507              child_resize_hmargin="6">
2508         <view type="text"
2509               id="phrase"
2510               posref="MM MM"
2511               x="0"
2512               y="0"
2513               color="255 255 255 255"
2514               fontsize="12"
2515               shadow="true"
2516               multi_line="true"
2517               multi_line_space="0"
2518               line_maxw="250" />
2519       </group>
2520       <instance template="button_ok_cancel"
2521                 posparent="inside"
2522                 posref="BR TR"
2523                 x="-4"
2524                 y="-4"
2525                 ok_text="uiAccept"
2526                 cancel_text="uiDecline"
2527                 onclick_ok="accept_guild_invitation"
2528                 onclick_ok_param=""
2529                 onclick_cancel="refuse_guild_invitation"
2530                 onclick_cancel_param="" />
2531     </group>
2532   </group>
2533   <tree node="join_guild_proposal" />
2534   <!-- ************************************************************** -->
2535   <!-- * WINDOW TO ASK IF A PLAYER WANT TO DUEL WITH ANOTHER PLAYER * -->
2536   <!-- ************************************************************** -->
2537   <!-- the modal. WARNING: change the "line_maxw" below if change the container w -->
2538   <group style="container_proposal"
2539          id="join_duel_proposal"
2540          w="310"
2541          right_button="false"
2542          on_close_button="refuse_duel_invitation"
2543          header_active="false">
2544     <view type="text"
2545           id="text"
2546           posref="TM TM"
2547           color="233 197 42 255"
2548           x="10"
2549           y="-10"
2550           fontsize="14"
2551           global_color="false"
2552           shadow="true"
2553           hardtext="uiJoinDuelProposal" />
2554     <view type="bitmap"
2555           id="warning"
2556           posparent="text"
2557           posref="ML MR"
2558           y="4"
2559           x="-4"
2560           global_color="false"
2561           texture="w_warning.tga" />
2562     <group id="content"
2563            child_resize_h="true"
2564            child_resize_hmargin="10">
2565       <group id="inside"
2566              sizeref="w"
2567              posref="TL TL"
2568              y="-4"
2569              child_resize_h="true"
2570              child_resize_hmargin="6">
2571         <view type="text_id"
2572               id="invitor_name"
2573               posref="MM MM"
2574               x="0"
2575               y="0"
2576               color="255 255 255 255"
2577               fontsize="12"
2578               shadow="true"
2579               multi_line="true"
2580               multi_line_space="0"
2581               line_maxw="290" />
2582       </group>
2583       <instance template="button_ok_cancel"
2584                 posparent="inside"
2585                 posref="BR TR"
2586                 x="-4"
2587                 y="-4"
2588                 ok_text="uiAccept"
2589                 cancel_text="uiDecline"
2590                 onclick_ok="accept_duel_invitation"
2591                 onclick_ok_param=""
2592                 onclick_cancel="refuse_duel_invitation"
2593                 onclick_cancel_param="" />
2594     </group>
2595   </group>
2596   <tree node="join_duel_proposal" />
2597   <!-- ***************************************** -->
2598   <!-- * WINDOW TO ASK IF A PLAYER WANT TO PVP * -->
2599   <!-- ***************************************** -->
2600   <!-- the modal. WARNING: change the "line_maxw" below if change the container w -->
2601   <group style="container_proposal"
2602          id="join_pvp_challenge_proposal"
2603          w="290"
2604          right_button="false"
2605          on_close_button="refuse_duel_invitation"
2606          header_active="false">
2607     <view type="text"
2608           id="text"
2609           posref="TM TM"
2610           color="42 197 233 255"
2611           x="10"
2612           y="-10"
2613           fontsize="12"
2614           global_color="false"
2615           shadow="true"
2616           hardtext="uiJoinLeagueProposal" />
2617     <group id="content"
2618            child_resize_h="true"
2619            child_resize_hmargin="10">
2620       <group id="inside"
2621              sizeref="w"
2622              posref="TL TL"
2623              y="-4"
2624              child_resize_h="true"
2625              child_resize_hmargin="6">
2626         <view type="text_id"
2627               id="invitor_name"
2628               posref="MM MM"
2629               x="0"
2630               y="0"
2631               color="255 255 255 255"
2632               fontsize="12"
2633               shadow="true"
2634               multi_line="true"
2635               multi_line_space="0"
2636               line_maxw="250" />
2637       </group>
2638       <instance template="button_ok_cancel"
2639                 posparent="inside"
2640                 posref="BR TR"
2641                 x="-4"
2642                 y="-4"
2643                 ok_text="uiAccept"
2644                 cancel_text="uiDecline"
2645                 onclick_ok="accept_pvp_challenge_invitation"
2646                 onclick_ok_param=""
2647                 onclick_cancel="refuse_pvp_challenge_invitation"
2648                 onclick_cancel_param="" />
2649     </group>
2650   </group>
2651   <tree node="join_pvp_challenge_proposal" />
2652   <!-- *********************************************** -->
2653   <!-- * WINDOW TO ASK CLAN PLAYER WANT JOIN FOR PVP * -->
2654   <!-- *********************************************** -->
2655   <!-- the modal. WARNING: change the "line_maxw" below if change the container w -->
2656   <group style="container_proposal"
2657          id="join_pvp_clan_proposal"
2658          right_button="false"
2659          header_active="false">
2660     <view type="text"
2661           id="text"
2662           posref="TM TM"
2663           color="233 197 42 255"
2664           x="10"
2665           y="-10"
2666           fontsize="14"
2667           global_color="false"
2668           shadow="true"
2669           hardtext="uiJoinClanProposalTitle" />
2670     <view type="bitmap"
2671           id="warning"
2672           posparent="text"
2673           posref="ML MR"
2674           y="4"
2675           x="-4"
2676           global_color="false"
2677           texture="w_warning.tga" />
2678     <group id="content"
2679            child_resize_h="true"
2680            child_resize_hmargin="10">
2681       <group id="inside"
2682              sizeref="w"
2683              posref="TL TL"
2684              y="-4"
2685              child_resize_h="true"
2686              child_resize_hmargin="6">
2687         <view type="text"
2688               id="pvp_clan_desc"
2689               posref="MM MM"
2690               x="0"
2691               y="0"
2692               color="255 255 255 255"
2693               fontsize="12"
2694               shadow="true"
2695               multi_line="true"
2696               multi_line_space="0"
2697               line_maxw="250"
2698               hardtext="uiJoinClanProposalDesc" />
2699       </group>
2700       <ctrl style="text_button_16"
2701             id="neutral"
2702             posref="BL TL"
2703             posparent="inside"
2704             onclick_l="pvp_clan_join"
2705             params_l="neutral"
2706             hardtext="uiPvpClanNeutral" />
2707       <ctrl style="text_button_16"
2708             id="clan1"
2709             posref="BM TM"
2710             posparent="inside"
2711             onclick_l="pvp_clan_join"
2712             params_l="clan1" />
2713       <ctrl style="text_button_16"
2714             id="clan2"
2715             posref="BR TR"
2716             posparent="inside"
2717             onclick_l="pvp_clan_join"
2718             params_l="clan2" />
2719     </group>
2720   </group>
2721   <tree node="join_pvp_clan_proposal" />
2722   <!-- ****************************************************** -->
2723   <!-- * POPUP TO ASK IF A PLAYER WANT TO JOIN A PARTY CHAT * -->
2724   <!-- ****************************************************** -->
2725   <!-- TODO convert this to a container -->
2726   <group id="join_party_chat_dialog"
2727          type="modal"
2728          exit_click_out="true"
2729          mouse_pos="false"
2730          posref="MM MM"
2731          w="155"
2732          h="80"
2733          options="skin_modal">
2734     <view type="text"
2735           id="text"
2736           posref="TM TM"
2737           y="-4"
2738           color="255 255 255 255"
2739           fontsize="14"
2740           shadow="true"
2741           hardtext="uiJoinChatQuestion" />
2742     <group id="indent_middle"
2743            child_resize_w="true"
2744            child_resize_h="true"
2745            posref="BM BM"
2746            y="4">
2747       <instance template="button_ok_cancel"
2748                 posref="TR TR"
2749                 ok_text="uiAccept"
2750                 cancel_text="uiDecline"
2751                 onclick_ok=""
2752                 onclick_ok_param=""
2753                 onclick_cancel=""
2754                 onclick_cancel_param="" />
2755     </group>
2756   </group>
2757   <!-- ****************************************************************** -->
2758   <!-- * POPUP TO ASK IF A PLAYER WANT TO ENTER A MISSION CRITICAL ZONE * -->
2759   <!-- ****************************************************************** -->
2760   <group style="container_proposal"
2761          id="enter_crzone_proposal"
2762          right_button="false"
2763          header_active="false">
2764     <group id="content"
2765            child_resize_h="true"
2766            child_resize_hmargin="10">
2767       <group id="inside"
2768              sizeref="w"
2769              posref="TL TL"
2770              y="-4"
2771              child_resize_h="true"
2772              child_resize_hmargin="6">
2773         <view type="text_id"
2774               id="phrase"
2775               posref="MM MM"
2776               x="0"
2777               y="0"
2778               color="255 255 255 255"
2779               fontsize="12"
2780               shadow="true"
2781               multi_line="true"
2782               multi_line_space="0"
2783               line_maxw="250" />
2784       </group>
2785       <instance template="button_ok_cancel"
2786                 posparent="inside"
2787                 posref="BR TR"
2788                 x="-4"
2789                 y="-4"
2790                 ok_text="uiAccept"
2791                 cancel_text="uiDecline"
2792                 onclick_ok="enter_crzone"
2793                 onclick_ok_param="1"
2794                 onclick_cancel="enter_crzone"
2795                 onclick_cancel_param="0" />
2796     </group>
2797   </group>
2798   <tree node="enter_crzone_proposal" />
2799   <!-- *************************************************** -->
2800   <!-- * POPUP TO ASK THE PLAYER FOR A TELEPORT LOCATION * -->
2801   <!-- *************************************************** -->
2802   <proc id="proc_teleport">
2803     <action handler="ascensor_teleport" />
2804     <action handler="list_sheet_text_reset_selection"
2805             params="ui:interface:ascensor_teleport_list:header_opened:list_of_items:all_items" />
2806     <action handler="set"
2807             params="target_property=ui:interface:ascensor_teleport_list:active|value=0" />
2808     <action handler="set_compass_north"
2809             params="compass=ui:interface:compass" />
2810   </proc>
2811   <group id="ascensor_teleport_list"
2812          type="container"
2813          posref="BL TL"
2814          min_w="400"
2815          max_w="400"
2816          w="400"
2817          x="302"
2818          y="200"
2819          pop_max_h="700"
2820          max_h="2000"
2821          active="false"
2822          openable="false"
2823          opened="true"
2824          global_color="false"
2825          movable="true"
2826          resizer="false"
2827          savable="false"
2828          title="uiAscensorTeleportList"
2829          header_color="UI:SAVE:WIN:COLORS:BOT">
2830     <group id="header_opened"
2831            child_resize_h="true"
2832            w="388"
2833            x="16"
2834            y="-8"
2835            posref="TL TL">
2836       <!-- 2/ LIST OF ITEMS / BRICK / PACTS / SKILLS -->
2837       <group id="list_of_items"
2838              posref="TL TL"
2839              x="0"
2840              y="0"
2841              w="388"
2842              h="184">
2843         <view type="bitmap"
2844               id="sep"
2845               sizeref="w"
2846               w="0"
2847               h="2"
2848               posref="TL TL"
2849               x="0"
2850               y="0"
2851               scale="true"
2852               texture="W_line_hor.tga" />
2853         <!-- text depending on the type of items -->
2854         <view type="text"
2855               id="items_tobuy"
2856               posparent="sep"
2857               posref="BL TL"
2858               x="0"
2859               y="-4"
2860               color="255 255 255 255"
2861               fontsize="12"
2862               shadow="true"
2863               hardtext="uiTeleportLocation"
2864               global_color="false"
2865               active="false" />
2866         <!-- The H should be "32+hspace" * Number of rows. Setup list.max_h too below-->
2867         <group type="list_sheet_guild"
2868                sizeref="w"
2869                w="-10"
2870                h="152"
2871                id="all_items"
2872                posparent="sep"
2873                posref="BM TM"
2874                x="0"
2875                y="-24"
2876                xitem="2"
2877                yitem="-2"
2878                xtext="46"
2879                ytext="-16"
2880                hspace="4"
2881                array="false"
2882                value="LOCAL:ASCENSOR"
2883                selection_group="teleport_selection"
2884                dragable="false"
2885                nature="elevator_destination"
2886                onclick_l="proc"
2887                params_l="proc_teleport"
2888                onclick_r=""
2889                over_color="%bot_chat_sheet_selection_normal"
2890                over_col_pushed="%bot_chat_sheet_selection_pushed"
2891                over_col_over="%bot_chat_sheet_selection_over"
2892                color="255 255 255 255"
2893                fontsize="10"
2894                shadow="true"
2895                multi_line="true"
2896                multi_line_space="0">
2897           <!-- the scroll -->
2898           <ctrl style="skin_scroll"
2899                 id="scroll_row"
2900                 posref="TL TL" />
2901           <!-- the group to scroll -->
2902           <group id="list"
2903                  sizeref="w"
2904                  posref="TL TL"
2905                  max_h="152"
2906                  x="8"
2907                  y="0"
2908                  w="-8"
2909                  h="0" />
2910         </group>
2911       </group>
2912     </group>
2913   </group>
2914   <tree node="ascensor_teleport_list" />
2915   <!-- ******** -->
2916   <!-- * TEST * -->
2917   <!-- ******** -->
2918   <!--
2919 <instance template="chat_id" id="chat1" title="LEMUEL" />
2920 <instance template="chat_id" id="chat2" title="CYRIL" />
2922 <instance template="mate_id" id="mate1" title="NICOLAS" />
2923 <instance template="mate_id" id="mate2" title="MATTHIEU" />
2924 <instance template="mate_id" id="mate3" title="LIONEL" />
2926 <instance template="contact_id" id="contact1" title="CYRIL" />
2927 <instance template="contact_id" id="contact2" title="LEMUEL" />
2928 <instance template="contact_id" id="contact3" title="LIONEL" />
2929 <instance template="contact_id" id="contact4" title="MATTHIEU" />
2930 <instance template="contact_id" id="contact5" title="NICOLAS" />
2932 <instance template="contact_id" id="ignore1" title="DON'T" />
2933 <instance template="contact_id" id="ignore2" title="TALK" />
2934 <instance template="contact_id" id="ignore3" title="2 ME" />
2936   <!-- ******************* -->
2937   <!-- *  SYSTEM INFOS   * -->
2938   <!-- ******************* -->
2939   <!--
2940 <group type="container" id="system_info" x="0" y="0" w="176" posref="TL TL" title="" title_opened="uiSystemInfoTitle" > 
2942         <group id="header_closed" x="0" y="0" w="176" h="16" posref="TL TL" >
2943                 <group id="pipo" posref="MR MR"  sizeref="w" w="-24" h="16" >
2944                         <instance template="chat_box" id="cb" posref="BR BR" sizeref="w" w="12" h="28" min_height="28" max_height="28"/>
2945                 </group>
2946                 <view type="bitmap" id="logo" posparent="pipo" posref="TL TR" x="-2" texture="W_user_info.tga" />
2947         </group>
2948         
2949         <group id="header_opened" x="0" y="0" w="176" h="64" posref="TL TL" child_resize_h="true" child_resize_hmargin="8" >
2950                 <instance template="chat_box" id="cb" posref="TR TR" sizeref="w" y="-4" w="-8" h="64" min_height="64" max_height="256"/>
2951         </group>
2952         
2953         <group id="content" x="0" y="0" w="168" h="0" posref="TL TL"  >
2954         </group>
2956 </group>
2958   <!-- ********* -->
2959   <!-- * GUILD * -->
2960   <!-- ********* -->
2961   <!--
2962 <group type="container" id="guild" x="" y="" w="176" posref="TR TR" title="uiGuildChat" title_opened="uiGuildChat" >
2964         <group id="header_closed" x="0" y="0" h="16" posref="TL TL" >
2965         </group>
2966         
2967         <group id="header_opened" x="0" y="0" w="176" h="64" posref="TL TL" child_resize_h="true" child_resize_hmargin="8" >
2968                 <instance template="chat_box" id="cb" posref="TR TR" sizeref="w" y="-4" w="-8" h="64" min_height="64" max_height="256"/>
2969                 <instance template="edit_box_widget" id="ebw" posref="BR TR" y="-4" posparent="cb" child_resize_h="true" sizeref="w" w="-12" onenter="chat_box_entry" backup_father_container_pos="true"/>
2970         </group>
2972         <group id="content" x="0" y="0" h="0" posref="TL TL" >
2973         </group>
2975 </group>
2977   <!-- ******** -->
2978   <!-- * TEAM * -->
2979   <!-- ******** -->
2980   <!--
2981 <group type="container" id="team" x="" y="" w="176" posref="TR TR" title="uiTeamChatTitle" title_opened="uiTeamChatTitle" >
2983         <group id="header_closed" x="0" y="0" h="16" posref="TL TL" >
2984                 <view type="bitmap" id="lead" posref="TL TL" x="48" texture="w_leader.tga" global_color="false" />
2985         </group>
2986         
2987         <group id="header_opened" x="0" y="0" w="176" h="64" posref="TL TL" child_resize_h="true" child_resize_hmargin="8" >
2988                 <view type="bitmap" id="lead" posref="TL TL" x="48" texture="w_leader.tga" global_color="false" />
2989                 <instance template="chat_box" id="cb" posref="TR TR" sizeref="w" y="-4" w="-8" h="64" min_height="64" max_height="256"/>
2990                 <instance template="edit_box_widget" id="ebw" posref="BR TR" y="-4" posparent="cb" child_resize_h="true" sizeref="w" w="-12" onenter="chat_box_entry" backup_father_container_pos="true"/>
2991         </group>
2993         <group id="content" x="0" y="0" h="0" posref="TL TL" >
2994         </group>
2996 </group>
2998   <!-- ************** -->
2999   <!-- * PARTY CHAT * -->
3000   <!-- ************** -->
3001   <!--
3002 <group type="container" id="party" x="" y="" w="176" posref="TR TR" title="PARTY CHAT" title_opened="PARTY CHAT" >
3004         <group id="header_closed" x="0" y="0" h="16" posref="TL TL" >
3005         </group>
3006         
3007         <group id="header_opened" x="0" y="0" w="176" h="64" posref="TL TL" child_resize_h="true" child_resize_hmargin="8" >
3008                 <instance template="chat_box" id="cb" posref="TR TR" sizeref="w" y="-4" w="-8" h="64" min_height="64" max_height="256"/>
3009                 <instance template="edit_box_widget" id="ebw" posref="BR TR" y="-4" posparent="cb" child_resize_h="true" sizeref="w" w="-12" onenter="chat_box_entry" backup_father_container_pos="true"/>
3010         </group>
3012         <group id="content" x="0" y="0" h="0" posref="TL TL" >
3013         </group>
3015 </group>
3017   <!-- ************* -->
3018   <!-- * AROUND ME * -->
3019   <!-- ************* -->
3020   <!--
3021 <group type="container" id="around" x="" y="" w="176" posref="TR TR" title="uiAroundMeTitle" title_opened="uiAroundMeTitle" >
3023         <group id="header_closed" x="0" y="0" h="16" posref="TL TL" >
3024         </group>
3025         
3026         <group id="header_opened" x="0" y="0" w="176" h="64" posref="TL TL" child_resize_h="true" child_resize_hmargin="8" >
3027                 <instance template="chat_box" id="cb" posref="TR TR" sizeref="w" y="-4" w="-8" h="64" min_height="64" max_height="256"/>
3028         </group>
3030         <group id="content" x="0" y="0" h="0" posref="TL TL" >
3031         </group>
3033 </group>
3035   <!-- **************** -->
3036   <!-- * CONTACT LIST * -->
3037   <!-- **************** -->
3038   <group type="container"
3039          id="contact_list"
3040          w="260"
3041          title="uiContactListTitle"
3042          movable="true"
3043          active="false"
3044          opened="true"
3045          resizer="false"
3046          pop_min_h="89"
3047          openable="true"
3048          on_active="set"
3049          on_active_params="dblink=UI:VARIABLES:ISACTIVE:CONTACT_LIST|value=1"
3050          on_deactive="set"
3051          on_deactive_params="dblink=UI:VARIABLES:ISACTIVE:CONTACT_LIST|value=0"
3052          header_color="UI:SAVE:WIN:COLORS:COM"
3053          global_color="false"
3054          global_color_over="true">
3055     <group id="header_closed"
3056            x="0"
3057            y="0"
3058            h="16"
3059            posref="TL TL"></group>
3060     <group id="header_opened"
3061            x="0"
3062            y="0"
3063            w="176"
3064            h="16"
3065            posref="TL TL"></group>
3066     <group id="content"
3067            x="0"
3068            y="0"
3069            h="0"
3070            posref="TL TL"></group>
3071   </group>
3072   <tree node="contact_list">
3073     <!-- friend_list node created in code -->
3074     <!-- ignore_list node created in code -->
3075   </tree>
3076   <!-- *************** -->
3077   <!-- * IGNORE LIST * -->
3078   <!-- *************** -->
3079   <!--
3080 <group type="container" id="ignore" x="" y="" w="176" posref="TR TR" title="uiIgnoreList" title_opened="uiIgnoreList" >
3082         <group id="header_closed" x="0" y="0" h="16" posref="TL TL" >
3083         </group>
3084         
3085         <group id="header_opened" x="0" y="0" w="176" h="20" posref="TL TL" child_resize_h="true" child_resize_hmargin="8" >
3086         </group>
3088         <group id="content" x="0" y="0" h="0" posref="TL TL" >
3089         </group>
3091 </group>
3093   <!-- ****************************************************** -->
3094   <!-- * WINDOW TO ENTER THE NAME OF A NEW PARTY CHAT       * -->
3095   <!-- ****************************************************** -->
3096   <proc id="validate_party_chat_name_proc">
3097     <action handler="set"
3098             params="target_property=ui:interface:create_new_party_chat:active|value=0" />
3099     <action handler="validate_party_chat_name"
3100             params="" />
3101   </proc>
3102   <group id="create_new_party_chat"
3103          type="container"
3104          w="300"
3105          on_close_button="proc"
3106          on_close_button_params=""
3107          active="false"
3108          savable="false"
3109          openable="false"
3110          opened="true"
3111          movable="true"
3112          title_opened="uiCreateNewPartyChat"
3113          h="512"
3114          pop_max_h="512">
3115     <group id="header_opened"
3116            h="80">
3117       <group id="pc_name"
3118              child_resize_w="true"
3119              child_resize_h="true"
3120              posref="TM TM"
3121              y="-16">
3122         <!-- 'ADD' text -->
3123         <view type="text"
3124               id="add_text"
3125               posref="ML ML"
3126               color="255 255 255 255"
3127               fontsize="14"
3128               shadow="true"
3129               hardtext="uiChannel" />
3130         <!-- the edit box -->
3131         <instance template="edit_box_widget"
3132                   id="pc_name_eb"
3133                   posref="MR ML"
3134                   x="4"
3135                   posparent="add_text"
3136                   w="200"
3137                   onenter="proc"
3138                   params="validate_party_chat_name_proc"
3139                   entry_type="alpha" />
3140       </group>
3141       <group id="indent_middle"
3142              posparent="pc_name"
3143              child_resize_w="true"
3144              child_resize_h="true"
3145              posref="BM TM"
3146              y="-8">
3147         <instance template="button_ok_cancel"
3148                   posref="TR TR"
3149                   onclick_ok="proc"
3150                   onclick_ok_param="validate_party_chat_name_proc"
3151                   onclick_cancel="set"
3152                   onclick_cancel_param="target_property=ui:interface:create_new_party_chat:active|value=0" />
3153       </group>
3154     </group>
3155   </group>
3156   <tree node="create_new_party_chat" />
3157   <!-- ***************** -->
3158   <!-- * DEBUG CONSOLE * -->
3159   <!-- ***************** -->
3160   <!--
3161 <group type="container" id="debug_console" w="320" title="uiDebugConsole" global_color="false" open_button="false" force_open_out="true" header_color="UI:SAVE:WIN:COLORS:HELP"
3162  title_bar_open="false" min_w="216" min_h="64" max_w="2000"
3163  max_h="1600" pop_max_w="2000" pop_max_h="1600" lockable="true" openable="false" opened="true" movable="true" resizer="true" active="true">
3164         <group id="header_closed" x="0" y="0" h="12" posref="TL TL" >
3165         </group>
3167         <group id="header_opened" x="0" y="0" w="160" h="13" posref="TL TL" child_resize_h="true" child_resize_hmargin="8" >
3168                 <instance template="chat_box" id="cb" posref="TR TR" sizeref="w" y="-8" w="0" h="64" min_height="64" max_height="1600"/>
3169                 <instance template="edit_box_widget" id="ebw" posref="BR TR" y="0" posparent="cb" child_resize_h="true" sizeref="w" w="-10" onenter="debug_console_entry" backup_father_container_pos="true"/>
3170         </group>
3172         <group id="content" x="0" y="0" h="0" posref="TL TL" >
3173         </group>
3174 </group>        
3176 <tree node="debug_console">
3177 </tree>
3179   <!-- **************** -->
3180   <!-- * DYNAMIC CHAT * -->
3181   <!-- **************** -->
3182   <!-- fct to know if a dynamic channel is writable -->
3183   <define id="canWriteToDynChat"
3184           value="ne(@SERVER:DYN_CHAT:CHANNEL#dyn_chat_nb:WRITE_RIGHT,0)" />
3185   <!-- template for a popuped dynamic chat window -->
3186   <template name="dynamic_chat_id"
3187             keep="true"
3188             posparent="parent"
3189             w="256"
3190             h="64"
3191             title=""
3192             dyn_chat_nb="">
3193     <group type="container"
3194            id="#id"
3195            w="#w"
3196            h="#h"
3197            posparent="#posparent"
3198            title_class="text_dyn_string"
3199            title="SERVER:DYN_CHAT:CHANNEL#dyn_chat_nb:NAME"
3200            resizer="true"
3201            openable="false"
3202            popable="false"
3203            open_when_popup="true"
3204            header_color="UI:SAVE:WIN:COLORS:COM"
3205            global_color="false"
3206            global_color_over="true"
3207            lockable="true"
3208            pop_min_w="216"
3209            pop_min_h="96"
3210            pop_max_w="2000"
3211            pop_max_h="1600" >
3212       <group id="header_closed"
3213              x="0"
3214              y="0"
3215              h="12"
3216              posref="TL TL"></group>
3217       <group id="header_opened"
3218              x="0"
3219              y="0"
3220              w="160"
3221              h="13"
3222              posref="TL TL"></group>
3223       <group id="content"
3224              x="0"
3225              y="0"
3226              w="0"
3227              h="0"
3228              posref="TL TL">
3229         <instance template="chat_box"
3230                   id="cb"
3231                   posref="TR TR"
3232                   sizeref="wh"
3233                   y="0"
3234                   w="0"
3235                   h="-24" />
3236         <instance template="edit_box_widget"
3237                   id="ebw"
3238                   posref="BR TR"
3239                   y="0"
3240                   posparent="cb"
3241                   child_resize_h="true"
3242                   sizeref="w"
3243                   w="-10"
3244                   onenter="chat_box_entry"
3245                   backup_father_container_pos="true" />
3246         <view type="text"
3247               id="cant_write_ebw"
3248               posref="BL TL"
3249               posparent="cb"
3250               y="-6"
3251               hardtext="uiCannotWriteDynChat"
3252               global_color="true"
3253               fontsize="10"
3254               shadow="true" />
3255         <link expr="%canWriteToDynChat"
3256               target="ebw:active" />
3257         <link expr="%canWriteToDynChat"
3258               target="ebw:eb:enter_recover_focus" />
3259         <!-- important else if press enter, then the edit box is reactivated! -->
3260         <link expr="not(%canWriteToDynChat)"
3261               target="cant_write_ebw:active" />
3262       </group>
3263       <!-- Show this window if popuped and present -->
3264       <link expr="and(and(@UI:SAVE:ISENABLED:DYNAMIC_CHAT#dyn_chat_nb, ne(@SERVER:DYN_CHAT:CHANNEL#dyn_chat_nb:NAME,0)),
3265                       @UI:SAVE:ISDETACHED:DYNAMIC_CHAT#dyn_chat_nb)"
3266             target="active" />
3267     </group>
3268   </template>
3269   <!-- those proc have the index in db of the dyn_chat, in parameter @0 -->
3270   <proc id="dynamic_chat_proc_close">
3271     <!-- The window is closed by the user, change the associated DB flag -->
3272     <action handler="set"
3273             params="dblink=UI:SAVE:ISDETACHED:DYNAMIC_CHAT@0|value=0" />
3274   </proc>
3275 </interface_config>