Add infos into target window
[ryzomcore.git] / ryzom / client / data / gamedev / interfaces_v3 / haircut.xml
blobe9b555d799dc0f05a2df2e146b659ab9353e54a2
1 <interface_config>
2 <root id="interface" x="0" y="0" w="800" h="600" active="true" />
4 <!-- ***************** -->
5 <!-- *   COSMETICS   * -->
6 <!-- ***************** -->
8 <template name="but_slider" posref="TL TL" x="0" y="0" w="122" h="32"  id="" posparent="parent" sizeref="" keep="true" value="" max="" >
9   <group id="#id" posparent="#posparent" posref="#posref" w="#w" h="#h" x="#x" y="#y" sizeref="#sizeref" value="#value" max="#max" >
11     <instance template="box_widget" id="back" posref="TM TM" sizeref="w" w="-38" h="22" x="0" y="0" inherit_gc_alpha="true"/>
12     <view type="bitmap" id="black" posparent="back" posref="MM MM" sizeref="wh" w="-2" h="-2" inherit_gc_alpha="true" scale="true" texture="blank.tga" color="0 0 0 128"/>
15     <view type="bitmap" id="bk" posref="BM BM" scale="true" y="4" sizeref="w" w="-38" h="2" texture="W_line_hor2.tga" />
16     <view type="bitmap" id="bk_prev" posref="ML ML" y="5" texture="W_arrow_left_0.tga" />
17     <view type="bitmap" id="bk_next" posref="MR MR" y="5" texture="W_arrow_right_0.tga" />
18        
19     <ctrl type="button" button_type="push_button" id="but_back" posref="ML ML" x="0" y="5"
20     tx_normal="W_arrow_left_0.tga" tx_pushed="W_arrow_left_0.tga" tx_over="W_button_16_over.tga" 
21     color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0"
22     onclick_l="set" params_l="dblink=#value|value=max(sub(@#value,1),0)" />
23     
24     <ctrl type="button" button_type="push_button" id="but_next" posref="MR MR" x="0" y="5"
25     tx_normal="W_arrow_right_0.tga" tx_pushed="W_arrow_right_0.tga" tx_over="W_button_16_over.tga" 
26     color="255 255 255 0" col_over="255 255 255 255" col_pushed="255 255 255 0"
27     onclick_l="set" params_l="dblink=#value|value=min(add(@#value,1),0)" />
28      
29   </group>
30 </template>
34 <proc id="cosmetics_active">
35   <action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:COSMETICS|value=1" />
36   <action handler="proc" params="cosmetics_update" />
37         <action handler="set" params="target_property=ui:interface:cosmetics:char3d:char:anim|value=0" />
38   <action handler="set" params="target_property=ui:interface:cosmetics:char3d:cam:posz|value=add(0.11,getprop('ui:interface:cosmetics:char3d:char:headz'))" />
39   <action handler="set" params="target_property=ui:interface:cosmetics:char3d:cam:tgtz|value=add(0.11,getprop('ui:interface:cosmetics:char3d:char:headz'))" />
40   <action handler="anim_start" params="anim=anim_refresh_cosmetics" />
41 </proc>
43 <proc id="cosmetics_update">
44   <action handler="convert_server_entities" params="entity=0|dest=UI:TEMP:CHAR3D" />
45   <action handler="set" params="dblink=UI:TEMP:HAIRCUT|value=0" />
46   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPA:HATCOLOR|value=0" />
47   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:TATTOO|value=0" />
48   
49   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET1|value=4" />
50   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET2|value=4" />
51   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET3|value=4" />
52   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET4|value=4" />
53   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET5|value=4" />
54   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET6|value=4" />
55   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET7|value=4" />
56   <action handler="set" params="dblink=UI:TEMP:CHAR3D:VPC:MORPHTARGET8|value=4" />
57   
58   <action handler="proc" params="proc_change_haircut" />
59 </proc>
62 <proc id="cosmetics_deactive">
63   <action handler="set" params="dblink=UI:VARIABLES:ISACTIVE:COSMETICS|value=0" />
64 </proc>
68 <proc id="cosmetics_cam_position">
69       <action handler="set" params="target_property=ui:interface:cosmetics:char3d:cam:posz|value=add(0.11,getprop('ui:interface:cosmetics:char3d:char:headz'))" />
70       <action handler="set" params="target_property=ui:interface:cosmetics:char3d:cam:tgtz|value=add(0.11,getprop('ui:interface:cosmetics:char3d:char:headz'))" />
71 </proc>
74 <anim id="anim_refresh_cosmetics" duration="0.1" disable_buttons="false" on_finish="proc" on_finish_params="cosmetics_cam_position">
75 </anim>
78 <!--**************-->
79 <!-- PROC HAIRCUT -->
80 <!--**************-->
82 <proc id="proc_change_haircut">
83         <action handler="proc" params="cosmetics_cam_position" />
84         <!--
85         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,0)" params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm, 'shave01.sitem'),'HEAD')" />
86         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,1)" params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm, 'short01.sitem'),'HEAD')" />
87         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,2)" params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm, 'short02.sitem'),'HEAD')" />
88         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,3)" params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm, 'medium01.sitem'),'HEAD')" />
89         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,4)" params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm, 'medium02.sitem'),'HEAD')" />
90         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,5)" params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm, 'medium03.sitem'),'HEAD')" />
91         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,6)" params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm, 'long01.sitem'),'HEAD')" />
92         
93         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,0)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm, 'shave01.sitem'))" />
94         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,1)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm, 'short01.sitem'))" />
95         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,2)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm, 'short02.sitem'))" />
96         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,3)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm, 'medium01.sitem'))" />
97         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,4)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm, 'medium02.sitem'))" />
98         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,5)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm, 'medium03.sitem'))" />
99         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,6)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm, 'long01.sitem'))" />
100         -->
101         
102         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,0)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_basic01.sitem'),'HEAD')" />
103         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,1)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_basic02.sitem'),'HEAD')" />
104         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,2)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_basic03.sitem'),'HEAD')" />
105         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,3)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_basic04.sitem'),'HEAD')" />
106         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,4)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_style01.sitem'),'HEAD')" />
107         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,5)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_style02.sitem'),'HEAD')" />
108         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,6)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_style03.sitem'),'HEAD')" />
109         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,7)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_style04.sitem'),'HEAD')" />
110         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,8)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_artistic01.sitem'),'HEAD')" />
111         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,9)"     params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_artistic02.sitem'),'HEAD')" />
112         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,10)"    params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_artistic03.sitem'),'HEAD')" />
113         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,11)"    params="dblink=UI:TEMP:CHAR3D:VPA:HATMODEL|value=getVSIndex(str( %cosm1, %cosm2, 'hair_artistic04.sitem'),'HEAD')" />
115         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,0)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_basic01.sitem'))" />
116         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,1)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_basic02.sitem'))" />
117         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,2)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_basic03.sitem'))" />
118         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,3)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_basic04.sitem'))" />
119         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,4)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_style01.sitem'))" />
120         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,5)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_style02.sitem'))" />
121         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,6)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_style03.sitem'))" />
122         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,7)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_style04.sitem'))" />
123         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,8)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_artistic01.sitem'))" />
124         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,9)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_artistic02.sitem'))" />
125         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,10)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_artistic03.sitem'))" />
126         <action handler="set" cond="eq(@UI:TEMP:HAIRCUT,11)" params="target_property=ui:interface:cosmetics:txt_hair:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'hair_artistic04.sitem'))" />
127         
128 </proc>
131 <!--****************-->
132 <!-- PROC HAIRCOLOR -->
133 <!--****************-->
135 <proc id="proc_change_haircolor">
136         <action handler="set" params="target_property=ui:interface:cosmetics:txt_haircolor:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'haircolor', @UI:TEMP:CHAR3D:VPA:HATCOLOR, '.sitem'))" />
137 </proc>
140 <!--************-->
141 <!-- PROC TATOO -->
142 <!--************-->
144 <proc id="proc_change_tatoo">
145         <action handler="set" params="target_property=ui:interface:cosmetics:txt_tatoo:hardtext|value=getItemTranslatedName(str( %cosm1, %cosm2, 'tatoo', @UI:TEMP:CHAR3D:VPC:TATTOO, '.sitem'))" />
146 </proc>
149 <!-- ************************ -->
150 <!-- *   COSMETICS WINDOW   * -->
151 <!-- ************************ -->
154 <group id="cosmetics" type="container" w="296" h="440" global_color="false" resizer="false" right_button="true"
155         movable="true" locked="true" openable="false" win_priority="%win_priority_lowest" savable="true"
156   title="uimwCosmetics" header_color="UI:SAVE:WIN:COLORS:OPT"
157         on_deactive="proc"      on_deactive_params="cosmetics_deactive" on_active="proc" on_active_params="cosmetics_active">
159     <group id="header_closed" x="0" y="0" child_resize_w="true" h="440" posref="TL TL" 
160          group_onclick_r="active_menu" group_params_r="menu=ui:interface:base_menu_with_color">
161         </group>
162         
163         <group id="header_opened" x="0" y="0" child_resize_w="true" h="16" posref="TL TL"
164          group_onclick_r="active_menu" group_params_r="menu=ui:interface:base_menu_with_color">
165         </group>
168     <!-- SCENE 3D -->
169     <instance template="box_widget" id="back" posref="TM TM" w="288" h="304" x="0" y="-26" inherit_gc_alpha="true"/>
170     <view type="bitmap" id="black" posparent="back" posref="MM MM" sizeref="wh" w="-2" h="-2" inherit_gc_alpha="true" scale="true" texture="blank.tga" color="0 0 0 80"/>
172     <scene3d id="char3d" sizeref="wh" w="-2" h="-2" posparent="back" posref="TL TL" x="1" y="-1" curcam="cam"
173       ambient="128 96 64" sun_ambient="0 0 0" sun_diffuse="255 255 196" sun_specular="0 0 0" sun_direction="-1.0 1.0 -1.0" 
174       user_interaction="true" rotz_factor="0.017"
175       roty_factor="0.005" roty_limit_min="-20" roty_limit_max="15"
176       dist_factor="0.005" dist_limit_min="4.0" dist_limit_max="6.0">
178       <character3d id="char" dblink="UI:TEMP:CHAR3D" pos="0.0 0.0 -1.75" rot="0.0 0.0 0.0" />
179       <camera id="cam" fov="5" pos="0.0 -5.0 0.0" target="0.0 0.0 0" roll="0" />
180       
181       <light id="back" pos="0.0 28.2 1.6" color="96 64 32" near="1.0" far="4.0" />
182       <light id="lgt" pos="0.0 25.3 2.48" color="255 255 255" near="1.0" far="4.0" />
183     </scene3d>
184                 
185        
186     <!-- HAIRCUT -->
187     <group id="haircutgrp" posparent="back" posref="BM TM" x="0" y="-4" w="276" h="32">
188       <instance template="but_slider" id="slider1" posref="TL TL" x="0" y="0" w="276" h="32" value="UI:TEMP:HAIRCUT" max="11" />
189       <ctrl type="scroll" id="slider2" posparent="slider1" posref="BM BM" x="0" y="0" sizeref="w" w="-38" h="8"
190                                                         vertical="false" align="L" min="0" max="11" tracksize="8" value="UI:TEMP:HAIRCUT"
191                                                         tx_topright="w_scroll_R.tga" tx_middle="w_scroll_l123_m.tga" tx_bottomleft="w_scroll_L.tga" />
192     </group>
193     <view type="text" id="txt_hair" posparent="haircutgrp" posref="TM MM" x="0" y="-12" hardtext="" color="255 255 255 255"
194       global_color="false" fontsize="11" line_maxw="236" multi_line="false" multi_line_space="0" />
195                
196     <!-- HAIR COLOR -->
197      <group id="haircolorgrp" posparent="haircutgrp" posref="BL TL" x="0" y="-8" w="276" h="32">
198       <instance template="but_slider" id="slider1" posref="TL TL" x="0" y="0" w="276" h="32" value="UI:TEMP:CHAR3D:VPA:HATCOLOR" max="5"/>
199       <ctrl type="scroll" id="slider2" posparent="slider1" posref="BM BM" x="0" y="0" sizeref="w" w="-38" h="8"
200                                                         vertical="false" align="L" min="0" max="5" tracksize="8" value="UI:TEMP:CHAR3D:VPA:HATCOLOR"
201                                                         tx_topright="w_scroll_R.tga" tx_middle="w_scroll_l123_m.tga" tx_bottomleft="w_scroll_L.tga" />
202     </group>
203     <view type="text" id="txt_haircolor" posparent="haircolorgrp" posref="TM MM" x="0" y="-12" hardtext="uiCosmColor" color="255 255 255 255"
204       global_color="false" fontsize="11" line_maxw="236" multi_line="false" multi_line_space="0" />
205     
206     <!-- TATOOS -->
207     <group id="tatoogrp" posparent="haircolorgrp" posref="BL TL" x="0" y="-8" w="276" h="32">
208       <instance template="but_slider" id="slider1" posref="TL TL" x="0" y="0" w="276" h="32" value="UI:TEMP:CHAR3D:VPC:TATTOO" max="63" />
209       <ctrl type="scroll" id="slider2" posparent="slider1" posref="BM BM" x="0" y="0" sizeref="w" w="-38" h="8"
210                                                         vertical="false" align="L" min="0" max="63" tracksize="8" value="UI:TEMP:CHAR3D:VPC:TATTOO"
211                                                         tx_topright="w_scroll_R.tga" tx_middle="w_scroll_l123_m.tga" tx_bottomleft="w_scroll_L.tga" />
212     </group>
213     <view type="text" id="txt_tatoo" posparent="tatoogrp" posref="TM MM" x="0" y="-12" hardtext="uiCosmTatoo" color="255 255 255 255"
214       global_color="false" fontsize="11" line_maxw="236" multi_line="false" multi_line_space="0" />
215    
216                 <link expr="depends(@UI:TEMP:HAIRCUT)" action="proc" params="proc_change_haircut" />
217                 <link expr="depends(@UI:TEMP:CHAR3D:VPA:HATCOLOR)" action="proc" params="proc_change_haircolor" />
218                 <link expr="depends(@UI:TEMP:CHAR3D:VPC:TATTOO)" action="proc" params="proc_change_tatoo" />
220 </group>
226 <tree node="cosmetics">
227 </tree>
231 </interface_config>