Do taobin
This commit is contained in:
parent
724f1a4f48
commit
dfa49d284a
170 changed files with 2983 additions and 777 deletions
53
xml/menu_gen.py
Normal file
53
xml/menu_gen.py
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
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( '\t<Filename> "' + default_dir + ''+ bt_pic[i].replace('#','n') +'" </Filename>\r\n')
|
||||
out_xml( '\t<FilenamePress> "' + default_dir + ''+ bt_pic[i].replace('#','p') +'" </FilenamePress>\r\n')
|
||||
out_xml( '\t<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>\r\n')
|
||||
out_xml( '\t<Volume> SoundVolume </Volume>\r\n')
|
||||
out_xml( '\t<EventClick> \r\n')
|
||||
|
||||
out_xml( '\t\tVar SelectDrink = "'+ product_code[i] +'"\r\n')
|
||||
out_xml( '\t\tVar NameDrink = $' + product_code[i] + '.Name2\r\n')
|
||||
out_xml( '\t\tVar NameDrinkTH = $' + product_code[i] + '.Name\r\n')
|
||||
out_xml( '\t\tVar PriceDrink = $' + product_code[i] + '.Price\r\n')
|
||||
out_xml( '\t\tVar PictureDrink = "' + default_dir2 + '/' + bt_pic[i].replace('#','n') + '"\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\tOpen "ROOT/taobin_project/xml/menu_topping_alter.xml"\r\n')
|
||||
|
||||
out_xml( '\t</EventClick>\r\n')
|
||||
out_xml( '\t</Button>\r\n')
|
||||
|
||||
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<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> $' + product_code[i] + '.Price </Value>\r\n')
|
||||
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<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> "฿"" </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] + 214) + ' </Y>\r\n')
|
||||
out_xml( '\t<Size> 24 </Size>\r\n')
|
||||
out_xml( '\t<Font> RobotoBold </Font>\r\n')
|
||||
out_xml( '\t<Color> 0x322B26 </Color>\r\n')
|
||||
out_xml( '\t<Value> $' + product_code[i] + '.Name2 </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
Loading…
Add table
Add a link
Reference in a new issue