Support for sprites salt?

0 votes
asked Mar 31 in Wanted features by Chris38 (390 points)
Hi,
Is there anyway to use user defined sprites in salt? I was able to generate/encode a sprite that works great in uml diagram, but I fail to include it in my salt diagram. Is this not supported, or am I making a mistake?
 
With beta 16, I get a java.lang.illegralArgumentException, in saltUtils.createElement(salUtils.java:93) for the following code:
@startsalt
sprite $box [15x18/16] {
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
555555555555555
}
{
testing <$box>
}
@endsalt  
 
Thanks! 
Christophe

1 Answer

0 votes
answered Mar 31 by plantuml (134,570 points)
selected Apr 7 by Chris38
 
Best answer

Salt does not share much code with the other diagrams, this is really an independant stuff.

So you cannot define sprite as in other diagrams.

However, there is an undocumented feature that is close to sprite. Using << and >> you can define a sprite-like drawing and reusing it latter.

For example:

@startsalt
 {
 [X] checkbox|[] checkbox
 () radio
 (X) radio
 This is a text|[This is my button]|This is another text
 "A field"|"Another long Field"|[A button]
 <<folder
 ............
 .XXXXX......
 .X...X......
 .XXXXXXXXXX.
 .X........X.
 .X........X.
 .X........X.
 .X........X.
 .XXXXXXXXXX.
 ............
 >>|other|<<folder>>
^Droplist^
}
@endsalt

Maybe you can use it instead ?

 

commented Jun 10 by anonymous
Is it possible to scale such sprite-like thing?
...