Subversion Repositories wimsdev

Rev

Rev 8287 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8287 Rev 15409
Line 13... Line 13...
13
!distribute items $wims_read_parm into slib_text,slib_color,slib_width,slib_height,slib_option,slib_speaker
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;
19
!else
19
!else
20
    !reset slib_width
20
  !reset slib_width
21
!endif
21
!endif
22
!if $slib_height>0
22
!if $slib_height>0
23
    slib_height=height:$(slib_height)px;
23
  slib_height=height:$(slib_height)px;
24
!else
24
!else
25
    !reset slib_height
25
  !reset slib_height
26
!endif
26
!endif
27
!if $slib_width$slib_height!=$empty
27
!if $slib_width$slib_height!=$empty
28
   slib_hw=style="$slib_width$slib_height"
28
  slib_hw=style="$slib_width$slib_height"
29
!endif
29
!endif
30
 
30
 
31
!default slib_color=antiquewhite
31
!default slib_color=antiquewhite
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
Line 35... Line 35...
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
slib_speaker=!declosing $slib_speaker
38
 
38
 
39
!if rectangle notwordof $slib_option
39
!if rectangle notwordof $slib_option
40
 bubbleOpts=$bubbleOpts round
40
  bubbleOpts=$bubbleOpts round
41
 !if btm-right iswordof $slib_tripos
41
  !if btm-right iswordof $slib_tripos
42
    slib_tripos=btm-right-in
42
    slib_tripos=btm-right-in
43
 !endif
43
 !endif
44
!endif
44
!endif
45
 
45
 
46
!if border iswordof $slib_option
46
!if border iswordof $slib_option
47
 bubbleOpts=$bubbleOpts border
47
  bubbleOpts=$bubbleOpts border
48
!endif
48
!endif
49
 
49
 
50
!if thought iswordof $slib_option
50
!if thought iswordof $slib_option
51
 bubbleOpts=$bubbleOpts thought
51
  bubbleOpts=$bubbleOpts thought
52
!else 
52
!else
53
 bubbleOpts=$bubbleOpts triangle
53
  bubbleOpts=$bubbleOpts triangle
54
!endif
54
!endif
55
 
55
 
56
!if noshadow notwordof $slib_option
56
!if noshadow notwordof $slib_option
57
 bubbleOpts=$bubbleOpts shadow
57
  bubbleOpts=$bubbleOpts shadow
58
!endif
58
!endif
59
 
59
 
60
slib_stylesheet = <style type="text/css">\
60
slib_stylesheet = <style>\
61
#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;}\
62
#bubble_$slib_num.thought:before, #bubble_$slib_num.thought:after{background-color: $slib_color;}\
63
#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;}\
64
#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;}\
65
#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;}\
Line 69... Line 69...
69
#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;}\
70
</style>
70
</style>
71
 
71
 
72
slib_out=$slib_stylesheet\
72
slib_out=$slib_stylesheet\
73
<div id="bubble_$slib_num" class="talk-bubble inline $slib_tripos $bubbleOpts" $slib_hw>\
73
<div id="bubble_$slib_num" class="talk-bubble inline $slib_tripos $bubbleOpts" $slib_hw>\
74
    <div class="talktext">\
74
  <div class="talktext">\
75
     <p>$slib_text</p>\
75
    <p>$slib_text</p>\
76
    </div>\
76
  </div>\
77
 </div>
77
 </div>
78
 
78
 
79
!if left- isin $slib_tripos and -left notin $slib_tripos
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>
80
  slib_out = <div class="inline"><span class="bubble_speaker $slib_tripos">$slib_speaker</span>$slib_out</div>
81
!else
81
!else
82
    !if right- isin $slib_tripos and -right notin $slib_tripos
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>
83
    slib_out = <div class="inline">$slib_out <span class="bubble_speaker $slib_tripos">$slib_speaker</span></div>
84
    !else
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>
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
86
  !endif
87
!endif
87
!endif