-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtab_environment.dat
265 lines (221 loc) · 7.07 KB
/
tab_environment.dat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- This file contains the definition of the "Skills" tab panel. This tab is where
the user selects and adjusts the skills for the character.
All public visual elements used with this tab panel start with the prefix "sk"
to associate them with the tab.
-->
<document signature="Hero Lab Data">
<template
id="enEnvTemp"
name="Environment Template"
compset="Environ"
marginhorz="3"
marginvert="2">
<portal
id="enEnvTitle"
style="lblTitle">
<label>
<labeltext><![CDATA[
@text = "Description"
]]></labeltext>
</label>
</portal>
<portal
id="enEnvDesc"
style="lblBrdLeft">
<label
field="descript"
ismultiline="yes">
</label>
</portal>
<position><![CDATA[
~set up our dimensions, with a width that we dictate; our width can vary
portal[enEnvTitle].height = 20
~position the description on the left and let it use all available space
portal[enEnvTitle].top = 0
portal[enEnvTitle].left = 0
portal[enEnvTitle].width = width
portal[enEnvDesc].top = portal[enEnvTitle].bottom + 5
portal[enEnvDesc].left = 0
portal[enEnvDesc].width = width
portal[enEnvDesc].height = height
]]></position>
</template>
<template
id="enEnvMenus"
name="Environment Menus"
compset="UserSelect"
marginhorz="3"
marginvert="2">
<portal
id="lblmenu1"
style="lblBrdLeft">
<label>
<labeltext><![CDATA[
@text = "+1 to Attribute:"
]]></labeltext>
</label>
</portal>
<portal
id="lblmenu2"
style="lblBrdLeft">
<label>
<labeltext><![CDATA[
if (#is2ndedition[] <> 0) then
@text = "+1 to Department:"
else
@text = "+1 to Discipline:"
endif
]]></labeltext>
</label>
</portal>
<portal
id="lblmenu3"
style="lblBrdLeft">
<label>
<labeltext><![CDATA[
@text = "Select Species:"
]]></labeltext>
</label>
</portal>
<portal
id="menu1"
style="menuNormal">
<menu_things
field="usrChosen1"
namefield="asName"
component="none"
maxvisible="10"
usepicksfield="usrSource1"
candidatefield="usrCandid1">
</menu_things>
</portal>
<portal
id="menu2"
style="menuNormal">
<menu_things
field="usrChosen2"
namefield="ddName"
component="none"
maxvisible="10"
usepicksfield="usrSource2"
candidatefield="usrCandid2">
</menu_things>
</portal>
<portal
id="menu3"
style="menuNormal">
<menu_things
field="usrChosen3"
component="none"
maxvisible="10"
usepicksfield="usrSource3"
candidatefield="usrCandid3">
</menu_things>
</portal>
<position><![CDATA[
~position our labels on the left
portal[lblmenu3].top = 0
portal[lblmenu3].height = portal[menu1].height
portal[lblmenu3].left = portal[lblmenu1].left
portal[lblmenu3].width = portal[lblmenu1].width
portal[menu3].top = 0
portal[menu3].left = portal[menu1].left
portal[menu3].width = portal[menu1].width
portal[lblmenu3].top = portal[lblmenu3].bottom + 10
portal[lblmenu1].height = portal[menu1].height
portal[lblmenu1].left = portal[lblmenu3].left
portal[lblmenu1].width = width / 4
portal[menu1].left = portal[lblmenu1].right + 5
portal[menu1].width = width / 4
portal[lblmenu2].top = portal[lblmenu1].bottom + 10
portal[lblmenu2].height = portal[menu1].height
portal[lblmenu2].left = portal[lblmenu1].left
portal[lblmenu2].width = portal[lblmenu1].width
portal[menu2].top = portal[menu1].bottom + 10
portal[menu2].left = portal[menu1].left
portal[menu2].width = portal[menu1].width
portal[lblmenu3].top = portal[lblmenu2].bottom + 10
portal[lblmenu3].height = portal[menu1].height
portal[lblmenu3].left = portal[lblmenu1].left
portal[lblmenu3].width = portal[lblmenu1].width
portal[menu3].top = portal[menu2].bottom + 10
portal[menu3].left = portal[menu1].left
portal[menu3].width = portal[menu1].width
~determine whether our portals are visible; we only show them if requested
~Note: Remember that a non-empty tagexpr field indicates menu selection is used.
if (field[usrCandid1].isempty <> 0) then
portal[lblmenu1].visible = 0
portal[menu1].visible = 0
endif
if (field[usrCandid2].isempty <> 0) then
portal[lblmenu2].visible = 0
portal[menu2].visible = 0
endif
if (field[usrCandid3].isempty <> 0) then
portal[lblmenu3].visible = 0
portal[menu3].visible = 0
endif
portal[lblmenu1].visible = portal[menu1].visible
portal[lblmenu2].visible = portal[menu2].visible
portal[lblmenu3].visible = portal[menu3].visible
~if a menu is visible, make sure it has a selection
if (portal[menu1].visible <> 0) then
if (field[usrChosen1].ischosen = 0) then
perform portal[menu1].setstyle[menuError]
endif
endif
if (portal[menu2].visible <> 0) then
if (field[usrChosen2].ischosen = 0) then
perform portal[menu2].setstyle[menuError]
endif
endif
if (portal[menu3].visible <> 0) then
if (field[usrChosen3].ischosen = 0) then
perform portal[menu3].setstyle[menuError]
endif
endif
]]></position>
</template>
<!-- species layout
This layout orchestrates the display of the visual elements that comprise
the Skills tab. This amounts to a title at the top and a dynamic table below
where the user can add and adjust the skills he wants.
The logic for this layout is similar to (albeit much simpler than) the
logic for the Basics tab. So please refer to the Basics tab for more details.
-->
<layout
id="environ">
<templateref template="enEnvTemp" useagent="yes"/>
<templateref template="enEnvMenus" useagent="yes"/>
<!-- This script sizes and positions the layout and its child visual elements. -->
<position><![CDATA[
~both tables span the full width
template[enEnvTemp].width = width
template[enEnvTemp].height = height/2
template[enEnvTemp].visible = 1
template[enEnvMenus].top = template[enEnvTemp].bottom + 30
template[enEnvMenus].width = width
template[enEnvMenus].height = (height - 10)/2
template[enEnvMenus].visible = 1
]]></position>
</layout>
<!-- sorcery panel
This is the "Sorcery" panel shown within Hero Lab.
-->
<panel
id="environ"
name="Environment"
marginhorz="5"
marginvert="5"
order="20"
agentcompset="Environ"
agentlive="HasEnviron"
agentname="name"
>
<live>!HideTab.environ</live>
<layoutref layout="environ"/>
<position><![CDATA[
]]></position>
</panel>
</document>