73 lines
3.3 KiB
Python
73 lines
3.3 KiB
Python
|
|
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<State> $' + product_code[i] + '.Button </State> \r\n')
|
|
out_xml( '\t<Filename> "' + default_dir + ''+ bt_pic[i].replace('#','n') +'" </Filename>\r\n')
|
|
out_xml( '\t<FilenamePress> "' + default_dir_press + ''+ bt_pic[i].replace('#','n') +'" </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\tVar PriceShowValue = "Free"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')
|
|
|
|
for i in range( menu_count):
|
|
if True :
|
|
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<X> ' + str(x_button[i] + 182) + ' </X>\r\n')
|
|
out_xml( '\t<Y> ' + str(y_button[i] + 12) + ' </Y>\r\n')
|
|
out_xml( '\t<Align> "Hurr" </Align>\r\n')
|
|
out_xml( '\t<Width>150</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> $' + 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<Width>20</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> "฿"" </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<Align> "Hurr" </Align>\r\n')
|
|
out_xml( '\t<Size> 24 </Size>\r\n')
|
|
out_xml( '\t<Width>1080</Width>\r\n')
|
|
out_xml( '\t<Font> RobotoBlack </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')
|