comparison buy.pl @ 40:1ac1409ea68c laserkard

[svn r41] implemented dynamic text.
author rlm
date Mon, 25 Jan 2010 03:42:08 -0500
parents 021a9ab1ed5b
children ef8615de8a9c
comparison
equal deleted inserted replaced
39:8b3b5753ad41 40:1ac1409ea68c
82 82
83 sub template 83 sub template
84 { 84 {
85 85
86 $all = shift; 86 $all = shift;
87 $all =~ m/_(.*)/; 87 $all =~ m/([^_]*)_(.*)/;
88 88
89 $materialcolor = $1; 89 $materialcolor = $2;
90 $style = $1;
91 #here is where we handle important drawing commands relating to the cards.
92
90 93
91 94
92 $r = <<HERE; 95 $r = <<HERE;
93 <div id = "i_templates"><div class = 'ttyl'> <titletron>Select Style.</titletron></div> 96 <div id = "i_templates"><div class = 'ttyl'> <titletron>Select Style.</titletron></div>
94 <div id = 'stupid'> 97 <div id = 'stupid'>
95 <input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" onmouseover="pokedex(['args__big'],['pokedex']);" onclick="display(['template2'], ['display']); inputbox(['template2'], ['inputbox']);material(['template2'], ['materials']);" ID="template2" NAME="template2" VALUE="big_$materialcolor" > <br> 98
99
100 <input TYPE="image" src = "./images/templates/big_$materialcolor.jpg" onmouseover="pokedex(['args__big'],['pokedex']);" onclick="display(['template2'], ['display']); inputbox(['template2'], ['inputbox']);material(['template2'], ['materials']);redraw('bold');" ID="template2" NAME="template2" VALUE="big_$materialcolor" > <br>
101
96 102
97 <input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg" onmouseover="pokedex(['args__basic'],['pokedex']);" onclick="display(['template3'], ['display']); inputbox(['template3'], ['inputbox']);material(['template3'], ['materials']);" ID="template3" NAME="template3" VALUE="basic_$materialcolor" ><br> 103
98 104 <input TYPE="image" src = "./images/templates/basic_$materialcolor.jpg" onmouseover="pokedex(['args__basic'],['pokedex']);" onclick="display(['template3'], ['display']); inputbox(['template3'], ['inputbox']);material(['template3'], ['materials']);redraw('arrow');" ID="template3" NAME="template3" VALUE="basic_$materialcolor" ><br>
99 <input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg" onmouseover="pokedex(['args__classic'],['pokedex']);" onclick="display(['template1'], ['display']); inputbox(['template1'], ['inputbox']);material(['template1'], ['materials']);" ID="template1" NAME="template1" VALUE="classic_$materialcolor" ><br> 105
100 106
101 <input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg" onmouseover="pokedex(['args__lines'],['pokedex']);" onclick="display(['template4'], ['display']); inputbox(['template4'], ['inputbox']);material(['template4'], ['materials']);" ID="template4" NAME="template4" VALUE="lines_$materialcolor" > 107
108 <input TYPE="image" src = "./images/templates/classic_$materialcolor.jpg" onmouseover="pokedex(['args__classic'],['pokedex']);" onclick="display(['template1'], ['display']); inputbox(['template1'], ['inputbox']);material(['template1'], ['materials']);redraw('classic');" ID="template1" NAME="template1" VALUE="classic_$materialcolor" ><br>
109
110
111
112 <input TYPE="image" src = "./images/templates/lines_$materialcolor.jpg" onmouseover="pokedex(['args__lines'],['pokedex']);" onclick="display(['template4'], ['display']); inputbox(['template4'], ['inputbox']);material(['template4'], ['materials']);redraw('direct');" ID="template4" NAME="template4" VALUE="lines_$materialcolor" >
113
102 </div> 114 </div>
103 </div> 115 </div>
104 116
105 HERE 117 HERE
118
119
120 %shankHash =
121 (
122
123 big => template2,
124 basic => template3,
125 classic => template1,
126 lines => template4
127 );
128
129 $target = $shankHash{$style};
130
131
132
133
134 #$r =~ s/inputbox\(\['$target'\], \['inputbox'\]\)\;//;
135
136
137
106 138
107 139
108 return $r; 140 return $r;
109 } 141 }
110 142
155 sub display 187 sub display
156 { 188 {
157 $all = shift; 189 $all = shift;
158 190
159 191
160 192 #~
193 #~ $t = <<HERE;
194 #~ <image src = "./images/display/PERL::PIC.jpg" onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
195 #~
196 #~ <div id = overlay>
197 #~
198 #~
199 #~ </div>
200 #~
201 #~ HERE
202 #~
203 #~
204 #~
205 #~ $t =~ s/PERL::PIC/$all/g;
206
161 $t = <<HERE; 207 $t = <<HERE;
162 <image src = "./images/display/PERL::PIC.jpg" onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);"> 208 <image src = "./images/display/blank.jpg" onmouseover="pokedex(['args__PERL::PIC'],['pokedex']);">
163 209
164 <div id = overlay> 210 <div id = overlay>
165 211
166 212
167 </div> 213 </div>
168 214
169 HERE 215 HERE
170
171
172
173 $t =~ s/PERL::PIC/$all/g;
174
175
176 216
177 return $t; 217 return $t;
178 218
179 } 219 }
180 220
195 $b = <FH>; 235 $b = <FH>;
196 } 236 }
197 237
198 238
199 239
240
241
200 $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :) 242 $a =~ s/PERL-REPLACE::TOP_MENU/$b/; #equivalent to <?php include("top_menu.html"); ?>, but in perl and with more memory problems :)
201 $b = &material("void_acrylic_clear",1); 243 $b = &material("void_acrylic_clear",1);
202 $a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :) 244 $a =~ s/PERL-REPLACE::MATERIALS/$b/; #let's do it again!!! :)
203 $b = &template("big_acrylic_clear"); 245 $b = &template("big_acrylic_clear");
204 246
205 #$a =~ s/PERL-REPLACE::TEMPLATES//; 247
206 $a =~ s/PERL-REPLACE::TEMPLATES/$b/; #comment out one or the other! 248 $a =~ s/PERL-REPLACE::TEMPLATES/$b/;
207 249
208 $b = &display("big_acrylic_clear"); 250 $b = &display("big_acrylic_clear");
209 $a =~ s/PERL-REPLACE::DISPLAY/$b/; 251 $a =~ s/PERL-REPLACE::DISPLAY/$b/;
210 252
211 $b = &inputbox("big_acrylic_clear"); 253 $b = &inputbox("big_acrylic_clear");