Rev 8280 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8280 | Rev 8287 | ||
---|---|---|---|
Line 7... | Line 7... | ||
7 | !exit |
7 | !exit |
8 | 8 | ||
9 | :proc |
9 | :proc |
10 | slib_out= |
10 | slib_out= |
11 | 11 | ||
12 | !reset |
12 | !reset slib_text,slib_color,slib_width,slib_height,slib_option,bubbleOpts,slib_stylesheet,slib_tripos,slib_hw,slib_speaker |
13 | !distribute items $wims_read_parm into |
13 | !distribute items $wims_read_parm into slib_text,slib_color,slib_width,slib_height,slib_option,slib_speaker |
14 | 14 | ||
15 | slib_width=$[$slib_width] |
15 | slib_width=$[$slib_width] |
16 | slib_height=$[$slib_height] |
16 | slib_height=$[$slib_height] |
17 | !if $slib_width>0 |
17 | !if $slib_width>0 |
18 | slib_width=width:$(slib_width)px; |
18 | slib_width=width:$(slib_width)px; |
Line 32... | Line 32... | ||
32 | slib_tripos=!getopt triangle in $slib_option |
32 | slib_tripos=!getopt triangle in $slib_option |
33 | !default slib_tripos=btm-left |
33 | !default slib_tripos=btm-left |
34 | slib_num=!getopt number in $slib_option |
34 | slib_num=!getopt number in $slib_option |
35 | !default slib_num=!randint 1,1000 |
35 | !default slib_num=!randint 1,1000 |
36 | slib_text=!declosing $slib_text |
36 | slib_text=!declosing $slib_text |
- | 37 | slib_speaker=!declosing $slib_speaker |
|
37 | 38 | ||
38 | !if rectangle notwordof $slib_option |
39 | !if rectangle notwordof $slib_option |
39 | bubbleOpts=$bubbleOpts round |
40 | bubbleOpts=$bubbleOpts round |
40 | !if btm-right iswordof $slib_tripos |
41 | !if btm-right iswordof $slib_tripos |
41 | slib_tripos=btm-right-in |
42 | slib_tripos=btm-right-in |
42 | !endif |
43 | !endif |
43 | !endif |
44 | !endif |
44 | 45 | ||
45 | !if border iswordof $slib_option |
46 | !if border iswordof $slib_option |
46 | bubbleOpts=$bubbleOpts border |
47 | bubbleOpts=$bubbleOpts border |
- | 48 | !endif |
|
- | 49 | ||
- | 50 | !if thought iswordof $slib_option |
|
- | 51 | bubbleOpts=$bubbleOpts thought |
|
- | 52 | !else |
|
- | 53 | bubbleOpts=$bubbleOpts triangle |
|
47 | !endif |
54 | !endif |
48 | 55 | ||
49 | !if noshadow notwordof $slib_option |
56 | !if noshadow notwordof $slib_option |
50 | bubbleOpts=$bubbleOpts shadow |
57 | bubbleOpts=$bubbleOpts shadow |
51 | !endif |
58 | !endif |
52 | 59 | ||
53 | slib_stylesheet = <style type="text/css">\ |
60 | slib_stylesheet = <style type="text/css">\ |
54 | #bubble_$slib_num{background-color: $slib_color;}\ |
61 | #bubble_$slib_num{background-color: $slib_color;}\ |
- | 62 | #bubble_$slib_num.thought:before, #bubble_$slib_num.thought:after{background-color: $slib_color;}\ |
|
55 | #bubble_$slib_num.triangle:not(.btm-left):after{border-top-color: $slib_color;}\ |
63 | #bubble_$slib_num.triangle:not(.btm-left):after{border-top-color: $slib_color;}\ |
56 | #bubble_$slib_num.triangle.left-in:after{ border-right-color: $slib_color;}\ |
64 | #bubble_$slib_num.triangle.left-in:after{ border-right-color: $slib_color;}\ |
57 | #bubble_$slib_num.triangle.btm-left:after{ border-left-color: $slib_color;}\ |
65 | #bubble_$slib_num.triangle.btm-left:after{ border-left-color: $slib_color;}\ |
58 | #bubble_$slib_num.triangle.btm-left-in:after{ border-left-color: $slib_color;}\ |
66 | #bubble_$slib_num.triangle.btm-left-in:after{ border-left-color: $slib_color;}\ |
59 | #bubble_$slib_num.triangle.btm-right-in:after{ border-right-color: $slib_color;}\ |
67 | #bubble_$slib_num.triangle.btm-right-in:after{ border-right-color: $slib_color;}\ |
60 | #bubble_$slib_num.triangle.btm-right:after{ border-right-color: $slib_color;}\ |
68 | #bubble_$slib_num.triangle.btm-right:after{ border-right-color: $slib_color;}\ |
61 | #bubble_$slib_num.triangle.right-in:after{ border-left-color: $slib_color;}\ |
69 | #bubble_$slib_num.triangle.right-in:after{ border-left-color: $slib_color;}\ |
62 | </style> |
70 | </style> |
63 | 71 | ||
64 | slib_out=$slib_stylesheet\ |
72 | slib_out=$slib_stylesheet\ |
65 | <div id="bubble_$slib_num" class=" |
73 | <div id="bubble_$slib_num" class="talk-bubble inline $slib_tripos $bubbleOpts" $slib_hw>\ |
66 | <div class="talktext">\ |
74 | <div class="talktext">\ |
67 | <p>$slib_text</p>\ |
75 | <p>$slib_text</p>\ |
68 | </div>\ |
76 | </div>\ |
69 | </div> |
77 | </div> |
70 | 78 | ||
- | 79 | !if left- isin $slib_tripos and -left notin $slib_tripos |
|
- | 80 | slib_out = <div class="inline"><span class="bubble_speaker $slib_tripos">$slib_speaker</span>$slib_out</div> |
|
71 | 81 | !else |
|
- | 82 | !if right- isin $slib_tripos and -right notin $slib_tripos |
|
- | 83 | slib_out = <div class="inline">$slib_out <span class="bubble_speaker $slib_tripos">$slib_speaker</span></div> |
|
- | 84 | !else |
|
- | 85 | slib_out = <div class="inline" style="position:relative;margin-bottom:1.5em;">$slib_out<span class="bubble_speaker $slib_tripos" style="position:absolute;bottom:-1em;">$slib_speaker</span></div> |
|
- | 86 | !endif |
|
72 | 87 | !endif |