This commit is contained in:
kong 2020-12-21 21:24:08 +07:00
parent 06a3e648ca
commit 9a768cf571
17 changed files with 6487 additions and 5912 deletions

View file

@ -1,26 +1,24 @@
if menu_count >= 16:
scroll_height = 1670
else:
scroll_height = 1400
out_xml('<FrameScroll> \r\n')
out_xml('<X> 0 </X>\r\n')
out_xml('<X> 10 </X>\r\n')
out_xml('<Y> 497 </Y>\r\n')
out_xml('<Width> 1080 </Width>\r\n')
out_xml('<Height> 1500 </Height>\r\n')
out_xml('<ScrollHeight> ' + str(scroll_height) + ' </ScrollHeight>\r\n')
out_xml('<ScrollHeight> "auto" </ScrollHeight>\r\n')
out_xml('<Scroll> "Vertical" </Scroll>\r\n')
out_xml('<Column> 4 </Column>\r\n')
for i in range( menu_count):
i_str = str(i + 1)
out_xml( '\t; button i='+ i_str + ' ' + product_code[i]+ ' \r\n')
out_xml( '\t<Button>\r\n')
out_xml( '\t<X> ' + str(x_button[i]) + ' </X> \r\n')
out_xml( '\t<Y> ' + str(y_button[i]) + ' </Y> \r\n')
out_xml( '<Block>\r\n')
out_xml('\t<MarginLeft> 33 </MarginLeft>\r\n')
out_xml('\t<MarginTop> 22 </MarginTop>\r\n')
out_xml('\t<Width> 225 </Width>\r\n')
out_xml('\t<Height> 296 </Height>\r\n')
out_xml( '\t<State> $' + product_code[i] + '.Button </State> \r\n')
out_xml( '\t<Button>\r\n')
out_xml( '\t<Filename> Var( "' + default_dir + '" + $'+ product_code[i] +'.image ) </Filename>\r\n')
out_xml( '\t<FilenamePress> Var( "' + default_dir_press + '" + $'+ product_code[i] +'.image ) " </FilenamePress>\r\n')
out_xml( '\t<FilenameDisable> Var( "' + default_dir_disable + '" + $'+ product_code[i] +'.image ) " </FilenameDisable>\r\n')
@ -36,30 +34,17 @@
out_xml( '\t\tVar PriceDrink = $' + product_code[i] + '.Price\r\n')
out_xml( '\t\tVar PictureDrink = "' + default_dir2 + '" + $'+ product_code[i] +'.image\r\n')
out_xml( '\t\tTopping "Load" SelectDrink\r\n')
#out_xml( '\t\tSAVELOG NameDrink\r\n')
out_xml( '\t\tVar PriceShowValue = charOfBaht + PriceDrink\r\n')
out_xml( '\t\tSAVELOG NameDrink\r\n')
out_xml( '\t\tVar PriceShowValue = charOfBaht + PriceDrink\r\n')
#out_xml( '\t\tVar PriceShowValue = "Free"\r\n')
out_xml( '\t\tOpen "ROOT/taobin_project/xml/page_topping_alter.xml"\r\n')
out_xml( '\t</EventOnClick>\r\n')
out_xml( '\t</Button>\r\n')
for i in range( menu_count):
if RoadShow :
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> ' + str(x_button[i] + 164) + ' </X>\r\n')
out_xml( '\t<Y> ' + str(y_button[i] + 12) + ' </Y>\r\n')
out_xml( '\t<Width>200</Width>\r\n')
out_xml( '\t<Size> 27 </Size>\r\n')
out_xml( '\t<Font> KanitTTF </Font>\r\n')
out_xml( '\t<Color> 0xB78F24 </Color>\r\n')
out_xml( '\t<Value> "Free!" </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
else:
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> ' + str(x_button[i] + 182) + ' </X>\r\n')
out_xml( '\t<Y> ' + str(y_button[i] + 12) + ' </Y>\r\n')
out_xml( '\t<X> 182 </X>\r\n')
out_xml( '\t<Y> 12 </Y>\r\n')
out_xml( '\t<State> ShowPrice </State>\r\n')
out_xml( '\t<Align> "Hurr" </Align>\r\n')
out_xml( '\t<Width>150</Width>\r\n')
@ -70,8 +55,8 @@
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> ' + str(x_button[i] + 164) + ' </X>\r\n')
out_xml( '\t<Y> ' + str(y_button[i] + 12) + ' </Y>\r\n')
out_xml( '\t<X> 164 </X>\r\n')
out_xml( '\t<Y> 12 </Y>\r\n')
out_xml( '\t<State> ShowPrice </State>\r\n')
out_xml( '\t<Width>20</Width>\r\n')
out_xml( '\t<Size> 27 </Size>\r\n')
@ -79,54 +64,55 @@
out_xml( '\t<Color> 0xB78F24 </Color>\r\n')
out_xml( '\t<Value> "฿"" </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> 16 </X>\r\n')
out_xml( '\t<Y> 190 </Y>\r\n')
out_xml( '\t<Size> 24 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
out_xml( '\t<State> showthaiText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.Name </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> 16 </X>\r\n')
out_xml( '\t<Y> 246 </Y>\r\n')
out_xml( '\t<Size> 14 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
out_xml( '\t<State> showthaiText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.description </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> 16 </X>\r\n')
out_xml( '\t<Y> 190 </Y>\r\n')
out_xml( '\t<Size> 22 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
out_xml( '\t<State> showengText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.NameE </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> 16 </X>\r\n')
out_xml( '\t<Y> 246 </Y>\r\n')
out_xml( '\t<Size> 14 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
out_xml( '\t<State> showengText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.descriptionE </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> ' + str(x_button[i] + 16) + ' </X>\r\n')
out_xml( '\t<Y> ' + str(y_button[i] + 190) + ' </Y>\r\n')
out_xml( '\t<Size> 24 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
out_xml( '\t<State> showthaiText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.Name </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> ' + str(x_button[i] + 16) + ' </X>\r\n')
out_xml( '\t<Y> ' + str(y_button[i] + 246) + ' </Y>\r\n')
out_xml( '\t<Size> 14 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
out_xml( '\t<State> showthaiText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.description </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> ' + str(x_button[i] + 16) + ' </X>\r\n')
out_xml( '\t<Y> ' + str(y_button[i] + 190) + ' </Y>\r\n')
out_xml( '\t<Size> 22 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Mode> "multi2" </Mode>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
out_xml( '\t<State> showengText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.NameE </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> ' + str(x_button[i] + 16) + ' </X>\r\n')
out_xml( '\t<Y> ' + str(y_button[i] + 246) + ' </Y>\r\n')
out_xml( '\t<Size> 14 </Size>\r\n')
out_xml( '\t<Width>220</Width>\r\n')
out_xml( '\t<Font> KanitMediumTTF </Font>\r\n')
out_xml( '\t<Color> 0x6F5F51 </Color>\r\n')
out_xml( '\t<State> showengText </State>\r\n')
out_xml( '\t<Value> $' + product_code[i] + '.descriptionE </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '</Block>\r\n')
out_xml('</FrameScroll>\r\n')