@@ -30,6 +30,19 @@ UpdateElementStyle("external_person", $EXTERNAL_PERSON_BG_COLOR, $ELEMENT_FONT_C
3030UpdateElementStyle ("system" , $SYSTEM_BG_COLOR , $ELEMENT_FONT_COLOR , $SYSTEM_BORDER_COLOR )
3131UpdateElementStyle ("external_system" , $EXTERNAL_SYSTEM_BG_COLOR , $ELEMENT_FONT_COLOR , $EXTERNAL_SYSTEM_BORDER_COLOR )
3232
33+ ' shortcuts with default colors
34+ !unquoted procedure AddPersonTag ($tagStereo , $bgColor = $PERSON_BG_COLOR , $fontColor = $ELEMENT_FONT_COLOR , $borderColor = $PERSON_BORDER_COLOR , $shadowing = "", $shape = "", $sprite = "", $legendText = "", $legendSprite = "")
35+ AddElementTag ($tagStereo , $bgColor , $fontColor , $borderColor , $shadowing , $shape , $sprite , "" , $legendText , $legendSprite )
36+ !endprocedure
37+ !unquoted procedure AddExternalPersonTag ($tagStereo , $bgColor = $EXTERNAL_PERSON_BG_COLOR , $fontColor = $ELEMENT_FONT_COLOR , $borderColor = $EXTERNAL_PERSON_BORDER_COLOR , $shadowing = "", $shape = "", $sprite = "", $legendText = "", $legendSprite = "")
38+ AddElementTag ($tagStereo , $bgColor , $fontColor , $borderColor , $shadowing , $shape , $sprite , "" , $legendText , $legendSprite )
39+ !endprocedure
40+ !unquoted procedure AddSystemTag ($tagStereo , $bgColor = $SYSTEM_BG_COLOR , $fontColor = $ELEMENT_FONT_COLOR , $borderColor = $SYSTEM_BORDER_COLOR , $shadowing = "", $shape = "", $sprite = "", $legendText = "", $legendSprite = "")
41+ AddElementTag ($tagStereo , $bgColor , $fontColor , $borderColor , $shadowing , $shape , $sprite , "" , $legendText , $legendSprite )
42+ !endprocedure
43+ !unquoted procedure AddExternalSystemTag ($tagStereo , $bgColor = $EXTERNAL_SYSTEM_BG_COLOR , $fontColor = $ELEMENT_FONT_COLOR , $borderColor = $EXTERNAL_SYSTEM_BORDER_COLOR , $shadowing = "", $shape = "", $sprite = "", $legendText = "", $legendSprite = "")
44+ AddElementTag ($tagStereo , $bgColor , $fontColor , $borderColor , $shadowing , $shape , $sprite , "" , $legendText , $legendSprite )
45+ !endprocedure
3346
3447' Sprites
3548' ##################################
@@ -183,20 +196,20 @@ endlegend
183196' ##################################
184197
185198!function $getPerson ($label , $descr , $sprite )
186- !if ($sprite == "") && ($defaultPersonSprite ! = "")
199+ !if ($sprite == "") && ($defaultPersonSprite ! = "")
187200 !$sprite = $defaultPersonSprite
188201!endif
189202!if ($descr == "") && ($sprite == "")
190203 !return '== '+$label
191204!endif
192205!if ($descr == "") && ($sprite != "")
193- !return '<$'+ $sprite +'> \n == '+$label
206+ !return $ getSprite ( $sprite )+' \n == '+$label
194207!endif
195208!if ($descr != "") && ($sprite == "")
196209 !return '== '+$label +'\n \n '+$descr
197210!endif
198211!if ($descr != "") && ($sprite != "")
199- !return '<$'+ $sprite +'> \n == '+$label +'\n \n '+$descr
212+ !return $ getSprite ( $sprite )+' \n == '+$label +'\n \n '+$descr
200213!endif
201214!endfunction
202215
@@ -205,17 +218,18 @@ endlegend
205218!return '== '+$label
206219!endif
207220!if ($descr == "") && ($sprite != "")
208- !return '<$'+ $sprite +'> \n == '+$label
221+ !return $ getSprite ( $sprite )+' \n == '+$label
209222!endif
210223!if ($descr != "") && ($sprite == "")
211224!return '== '+$label +'\n \n '+$descr
212225!endif
213226!if ($descr != "") && ($sprite != "")
214- !return '<$'+ $sprite +'> \n == '+$label +'\n \n '+$descr
227+ !return $ getSprite ( $sprite )+' \n == '+$label +'\n \n '+$descr
215228!endif
216229!endfunction
217230
218231!unquoted procedure Person ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
232+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "person ")
219233!if ($portraitPerson == "portrait ") && ($sprite == "")
220234actor "$getPerson($label, $descr, $sprite)$getProps()" $toStereos ("person" , $tags ) as $alias $getLink ($link )
221235!else if ($portraitPerson == "outline ") && ($sprite == "")
@@ -226,6 +240,7 @@ rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("person",
226240!endprocedure
227241
228242!unquoted procedure Person_Ext ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
243+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "external_person ")
229244!if ($portraitPerson == "portrait ") && ($sprite == "")
230245actor "$getPerson($label, $descr, $sprite)$getProps()" $toStereos ("external_person" , $tags ) as $alias $getLink ($link )
231246!else if ($portraitPerson == "outline ") && ($sprite == "")
@@ -236,26 +251,32 @@ rectangle "$getPerson($label, $descr, $sprite)$getProps()" $toStereos("external_
236251!endprocedure
237252
238253!unquoted procedure System ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
254+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "system ")
239255rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos ("system" , $tags ) as $alias $getLink ($link )
240256!endprocedure
241257
242258!unquoted procedure System_Ext ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
259+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "external_system ")
243260rectangle "$getSystem($label, $descr, $sprite)$getProps()" $toStereos ("external_system" , $tags ) as $alias $getLink ($link )
244261!endprocedure
245262
246263!unquoted procedure SystemDb ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
264+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "system ")
247265database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos ("system" , $tags ) as $alias $getLink ($link )
248266!endprocedure
249267
250268!unquoted procedure SystemQueue ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
269+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "system ")
251270queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos ("system" , $tags ) as $alias $getLink ($link )
252271!endprocedure
253272
254273!unquoted procedure SystemDb_Ext ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
274+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "external_system ")
255275database "$getSystem($label, $descr, $sprite)$getProps()" $toStereos ("external_system" , $tags ) as $alias $getLink ($link )
256276!endprocedure
257277
258278!unquoted procedure SystemQueue_Ext ($alias , $label , $descr = "", $sprite = "", $tags = "", $link = "")
279+ !$sprite = $toElementArg ($sprite , $tags , "ElementTagSprite ", "external_system ")
259280queue "$getSystem($label, $descr, $sprite)$getProps()" $toStereos ("external_system" , $tags ) as $alias $getLink ($link )
260281!endprocedure
261282
0 commit comments