Mercurial > MadButterfly
comparison examples/dynamic/button.svg @ 221:ad4f8a956505
Implement a workaround for the button class. However, this won't solve all issues. We can use this as example to fix the mouse out event issue. When we move the curosr over the text inside the button. The upper layer group will receive MOUSE_OUT events. This is absolute incorrect.
author | wycc |
---|---|
date | Sun, 14 Dec 2008 12:35:13 +0800 |
parents | 8d9d717c9300 |
children | b24d7889cbda |
comparison
equal
deleted
inserted
replaced
219:1eb9ee5ae4f2 | 221:ad4f8a956505 |
---|---|
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | 6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
7 xmlns:svg="http://www.w3.org/2000/svg" | 7 xmlns:svg="http://www.w3.org/2000/svg" |
8 xmlns="http://www.w3.org/2000/svg" | 8 xmlns="http://www.w3.org/2000/svg" |
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | 9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | 10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
11 width="744.09448819" | 11 width="720" |
12 height="1052.3622047" | 12 height="480" |
13 id="svg2" | 13 id="svg2" |
14 sodipodi:version="0.32" | 14 sodipodi:version="0.32" |
15 inkscape:version="0.46" | 15 inkscape:version="0.46" |
16 sodipodi:docname="button.svg" | 16 sodipodi:docname="button.svg" |
17 inkscape:output_extension="org.inkscape.output.svg.inkscape"> | 17 inkscape:output_extension="org.inkscape.output.svg.inkscape" |
18 version="1.0"> | |
18 <sodipodi:namedview | 19 <sodipodi:namedview |
19 id="base" | 20 id="base" |
20 pagecolor="#ffffff" | 21 pagecolor="#ffffff" |
21 bordercolor="#666666" | 22 bordercolor="#666666" |
22 borderopacity="1.0" | 23 borderopacity="1.0" |
24 guidetolerance="10" | 25 guidetolerance="10" |
25 objecttolerance="10" | 26 objecttolerance="10" |
26 inkscape:pageopacity="0.0" | 27 inkscape:pageopacity="0.0" |
27 inkscape:pageshadow="2" | 28 inkscape:pageshadow="2" |
28 inkscape:zoom="0.7" | 29 inkscape:zoom="0.7" |
29 inkscape:cx="239.91999" | 30 inkscape:cx="257.06285" |
30 inkscape:cy="667.92389" | 31 inkscape:cy="365.06674" |
31 inkscape:document-units="px" | 32 inkscape:document-units="px" |
32 inkscape:current-layer="g2430" | 33 inkscape:current-layer="layer1" |
33 showgrid="false" | 34 showgrid="false" |
34 inkscape:window-width="1400" | 35 inkscape:window-width="1400" |
35 inkscape:window-height="978" | 36 inkscape:window-height="978" |
36 inkscape:window-x="0" | 37 inkscape:window-x="0" |
37 inkscape:window-y="25" /> | 38 inkscape:window-y="25" /> |
38 <defs | 39 <defs |
39 id="defs4"> | 40 id="defs4"> |
40 <linearGradient | 41 <linearGradient |
41 id="linearGradient4066"> | 42 id="linearGradient4066"> |
42 <stop | 43 <stop |
43 style="stop-color:#000000;stop-opacity:0;" | 44 id="stop4068" |
44 offset="0" | 45 offset="0" |
45 id="stop4068" /> | 46 style="stop-color:#000000;stop-opacity:0;" /> |
46 <stop | 47 <stop |
47 style="stop-color:#000000;stop-opacity:1" | 48 id="stop4070" |
48 offset="1" | 49 offset="1" |
49 id="stop4070" /> | 50 style="stop-color:#000000;stop-opacity:1" /> |
50 </linearGradient> | 51 </linearGradient> |
51 <linearGradient | 52 <linearGradient |
52 id="linearGradient4026"> | 53 id="linearGradient4026"> |
53 <stop | 54 <stop |
54 style="stop-color:#000000;stop-opacity:1;" | 55 id="stop4028" |
55 offset="0" | 56 offset="0" |
56 id="stop4028" /> | 57 style="stop-color:#000000;stop-opacity:1;" /> |
57 <stop | 58 <stop |
58 style="stop-color:#ffffff;stop-opacity:0;" | 59 id="stop4030" |
59 offset="1" | 60 offset="1" |
60 id="stop4030" /> | 61 style="stop-color:#ffffff;stop-opacity:0;" /> |
61 </linearGradient> | 62 </linearGradient> |
62 <linearGradient | 63 <linearGradient |
63 id="linearGradient4018"> | 64 id="linearGradient4018"> |
64 <stop | 65 <stop |
65 style="stop-color:#000000;stop-opacity:1;" | 66 id="stop4020" |
66 offset="0" | 67 offset="0" |
67 id="stop4020" /> | 68 style="stop-color:#000000;stop-opacity:1;" /> |
68 <stop | 69 <stop |
69 style="stop-color:#0000ff;stop-opacity:0;" | 70 id="stop4022" |
70 offset="1" | 71 offset="1" |
71 id="stop4022" /> | 72 style="stop-color:#0000ff;stop-opacity:0;" /> |
72 </linearGradient> | 73 </linearGradient> |
73 <inkscape:perspective | 74 <inkscape:perspective |
74 id="perspective10" | 75 sodipodi:type="inkscape:persp3d" |
76 inkscape:vp_x="0 : 526.18109 : 1" | |
77 inkscape:vp_y="0 : 1000 : 0" | |
78 inkscape:vp_z="744.09448 : 526.18109 : 1" | |
75 inkscape:persp3d-origin="372.04724 : 350.78739 : 1" | 79 inkscape:persp3d-origin="372.04724 : 350.78739 : 1" |
76 inkscape:vp_z="744.09448 : 526.18109 : 1" | 80 id="perspective10" /> |
77 inkscape:vp_y="0 : 1000 : 0" | |
78 inkscape:vp_x="0 : 526.18109 : 1" | |
79 sodipodi:type="inkscape:persp3d" /> | |
80 </defs> | 81 </defs> |
81 <metadata | 82 <metadata |
82 id="metadata7"> | 83 id="metadata7"> |
83 <rdf:RDF> | 84 <rdf:RDF> |
84 <cc:Work | 85 <cc:Work |
88 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | 89 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
89 </cc:Work> | 90 </cc:Work> |
90 </rdf:RDF> | 91 </rdf:RDF> |
91 </metadata> | 92 </metadata> |
92 <g | 93 <g |
93 id="layer1" | 94 style="display:inline" |
95 inkscape:label="bg" | |
94 inkscape:groupmode="layer" | 96 inkscape:groupmode="layer" |
95 inkscape:label="bg" | 97 id="layer1"> |
96 style="display:inline"> | |
97 <text | 98 <text |
98 xml:space="preserve" | 99 id="text4380" |
100 y="282.36218" | |
101 x="235.71429" | |
99 style="font-size:30px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" | 102 style="font-size:30px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" |
100 x="235.71429" | 103 xml:space="preserve"><tspan |
101 y="282.36218" | 104 y="282.36218" |
102 id="text4380"><tspan | 105 x="235.71429" |
103 sodipodi:role="line" | |
104 id="tspan4382" | 106 id="tspan4382" |
105 x="235.71429" | 107 sodipodi:role="line" /></text> |
106 y="282.36218" /></text> | |
107 <g | 108 <g |
108 transform="translate(20.000001,42.857139)" | 109 mbname="btn" |
109 id="btn" | 110 transform="translate(148.57143,98.571429)" |
110 frame="click" | 111 id="btn"> |
111 mbname="btn"> | |
112 <g | 112 <g |
113 id="g2430" | 113 style="display:none" |
114 mbname="btn" | 114 mbname="btn_normal" |
115 transform="translate(-78.571429,44.285714)"> | 115 transform="translate(148.57143,98.571429)" |
116 <g | 116 id="btn_normal" |
117 frame="normal" | 117 frame="normal"> |
118 id="btn_normal" | 118 <rect |
119 mbname="btn_normal" | 119 style="fill:#0000ff" |
120 transform="translate(1.4285713e-7,-60)"> | 120 id="rect2651" |
121 <rect | 121 width="122.85714" |
122 style="fill:#0000ff" | 122 height="47.142857" |
123 id="rect2493" | 123 x="-1.4285715" |
124 width="82.85714" | 124 y="1.4285747" |
125 height="42.857143" | 125 rx="6.0995407" |
126 x="220" | 126 ry="5.0559778" /> |
127 y="69.505035" | 127 <text |
128 rx="5.4543843" | 128 xml:space="preserve" |
129 ry="7.1427469" /> | 129 style="font-size:24px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" |
130 <text | 130 x="10.000002" |
131 xml:space="preserve" | 131 y="32.85714" |
132 style="font-size:24px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" | 132 id="text2653"><tspan |
133 x="232.85715" | 133 sodipodi:role="line" |
134 y="99.505043" | 134 id="tspan2655" |
135 id="text2495"><tspan | 135 x="10.000002" |
136 sodipodi:role="line" | 136 y="32.85714">Click Me</tspan></text> |
137 id="tspan2497" | 137 </g> |
138 x="232.85715" | 138 <g |
139 y="99.505043">Rect</tspan></text> | 139 style="" |
140 </g> | 140 mbname="btn_active" |
141 <g | 141 transform="translate(148.57143,98.571429)" |
142 frame="active" | 142 id="btn_active" |
143 id="btn_active" | 143 frame="active"> |
144 mbname="btn_active" | 144 <rect |
145 transform="translate(-1.4285757,30.000005)"> | 145 style="fill:#00ffff" |
146 <rect | 146 id="rect2727" |
147 style="fill:#00ffff" | 147 width="122.85714" |
148 id="rect2481" | 148 height="47.142857" |
149 width="82.85714" | 149 x="-1.4285715" |
150 height="42.857143" | 150 y="1.4285747" |
151 x="220" | 151 rx="6.0995407" |
152 y="69.505035" | 152 ry="5.0559778" /> |
153 rx="5.4543843" | 153 <text |
154 ry="7.1427469" /> | 154 xml:space="preserve" |
155 <text | 155 style="font-size:24px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" |
156 xml:space="preserve" | 156 x="10.000002" |
157 style="font-size:24px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" | 157 y="32.85714" |
158 x="232.85715" | 158 id="text2729"><tspan |
159 y="99.505043" | 159 sodipodi:role="line" |
160 id="text2483"><tspan | 160 id="tspan2731" |
161 sodipodi:role="line" | 161 x="10.000002" |
162 id="tspan2485" | 162 y="32.85714">Click Me</tspan></text> |
163 x="232.85715" | 163 </g> |
164 y="99.505043">Rect</tspan></text> | 164 <g |
165 </g> | 165 style="display:none" |
166 <g | 166 mbname="btn_click" |
167 frame="click" | 167 transform="translate(148.57143,98.571429)" |
168 id="btn_click" | 168 id="btn_click" |
169 mbname="btn_click" | 169 frame="click"> |
170 transform="translate(-1.4285715,117.14286)"> | 170 <rect |
171 <rect | 171 style="fill:#0000ff" |
172 style="fill:#0000ff" | 172 id="rect2734" |
173 id="rect2488" | 173 width="122.85714" |
174 width="82.85714" | 174 height="47.142857" |
175 height="42.857143" | 175 x="-1.4285715" |
176 x="220" | 176 y="1.4285747" |
177 y="69.505035" | 177 rx="6.0995407" |
178 rx="5.4543843" | 178 ry="5.0559778" /> |
179 ry="7.1427469" /> | 179 <text |
180 <text | 180 xml:space="preserve" |
181 xml:space="preserve" | 181 style="font-size:24px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" |
182 style="font-size:24px;font-style:normal;font-weight:normal;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" | 182 x="10.000002" |
183 x="232.85715" | 183 y="32.85714" |
184 y="99.505043" | 184 id="text2736"><tspan |
185 id="text2490"><tspan | 185 sodipodi:role="line" |
186 sodipodi:role="line" | 186 id="tspan2738" |
187 id="tspan2492" | 187 x="10.000002" |
188 x="232.85715" | 188 y="32.85714">Click Me</tspan></text> |
189 y="99.505043">Rect</tspan></text> | |
190 </g> | |
191 </g> | 189 </g> |
192 </g> | 190 </g> |
193 </g> | 191 </g> |
194 <g | 192 <g |
195 inkscape:groupmode="layer" | 193 style="display:inline" |
194 inkscape:label="text" | |
196 id="layer2" | 195 id="layer2" |
197 inkscape:label="text" | 196 inkscape:groupmode="layer" /> |
198 style="display:inline" /> | |
199 </svg> | 197 </svg> |