DO menu mamin
This commit is contained in:
parent
546badbbac
commit
5441f975c3
8 changed files with 604 additions and 104 deletions
|
|
@ -1,3 +1,44 @@
|
|||
<?hurr
|
||||
|
||||
default_dir = 'ROOT/taobin_project/image/menu_drink/'
|
||||
|
||||
menu_count = 2
|
||||
x1 = 44
|
||||
x2 = 301
|
||||
x3 = 558
|
||||
x4 = 815
|
||||
|
||||
y1 = 571
|
||||
y1 = 571
|
||||
y1 = 571
|
||||
y1 = 571
|
||||
x_button = [
|
||||
x1,
|
||||
x2,
|
||||
x3,
|
||||
x4
|
||||
|
||||
]
|
||||
y_button = [
|
||||
y1,
|
||||
y1,
|
||||
y1,
|
||||
y1
|
||||
|
||||
]
|
||||
|
||||
|
||||
bt_pic = []
|
||||
bt_pic.append('b#_diy.png')
|
||||
bt_pic.append('b#_hot_espresso.png')
|
||||
|
||||
|
||||
product_code = []
|
||||
product_code.append('##-##-##-####')
|
||||
product_code.append('11-99-01-0010')
|
||||
|
||||
?>
|
||||
|
||||
<Popup>
|
||||
<Cache> "Enable" </Cache>
|
||||
<Width> 1080 </Width>
|
||||
|
|
@ -46,7 +87,7 @@
|
|||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Open "ROOT/taobin_project/xml/menu_back_to_main.xml"
|
||||
Open "ROOT/taobin_project/xml/menu_catalog.xml"
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
|
@ -74,7 +115,7 @@
|
|||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
; Open "ROOT/taobin_project/xml/menu_catalog_choose_drink1.xml"
|
||||
Open "ROOT/taobin_project/xml/menu_catalog_choose_drink1.xml"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
|
@ -128,52 +169,51 @@
|
|||
|
||||
|
||||
|
||||
<?hurr
|
||||
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] + '.Name\r\n')
|
||||
out_xml( '\t\tVar NameDrinkTH = ' + product_code[i] + '.Name2\r\n')
|
||||
out_xml( '\t\tVar PriceDrink = ' + product_code[i] + '.Price\r\n')
|
||||
out_xml( '\t\tVar PictureDrink = "' + default_dir + '/' + bt_pic[i].replace('#','p') + '"\r\n')
|
||||
out_xml( '\t\tTopping "Load" SelectDrink\r\n')
|
||||
out_xml( '\t\tSAVELOG SelectDrink\r\n')
|
||||
out_xml( '\t\tVar PriceShowValue = charOfBaht + "15"\r\n')
|
||||
out_xml( '\t\tOpen "ROOT/taobin_project/xml/menu_topping_alter.xml"\r\n')
|
||||
|
||||
<Button>
|
||||
<X> 44 </X>
|
||||
<Y> 571 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/menu_drink/bn_diy.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/menu_drink/bp_diy.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
out_xml( '\t</EventClick>\r\n')
|
||||
out_xml( '\t</Button>\r\n')
|
||||
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button>
|
||||
<X> 301 </X>
|
||||
<Y> 571 </Y>
|
||||
<Filename> "ROOT/taobin_project/image/menu_drink/bn_hot_espresso.png" </Filename>
|
||||
<FilenamePress> "ROOT/taobin_project/image/menu_drink/bp_hot_espresso.png" </FilenamePress>
|
||||
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
|
||||
<Volume> SoundVolume </Volume>
|
||||
<EventClick>
|
||||
Var SelectDrink = "11-99-01-0010"
|
||||
Var NameDrink = 11-99-01-0010.Name
|
||||
Var NameDrinkTH = 11-99-01-0010.Name2
|
||||
Var PriceDrink = 11-99-01-0010.Price
|
||||
Var PictureDrink = "ROOT/taobin_project/image/menu_drink/bn_hot_espresso.png"
|
||||
|
||||
Topping "Load" SelectDrink
|
||||
SAVELOG SelectDrink
|
||||
Var PriceShowValue = charOfBaht + "15"
|
||||
|
||||
Open "ROOT/taobin_project/xml/menu_topping_alter.xml"
|
||||
</EventClick>
|
||||
</Button>
|
||||
|
||||
<Text>
|
||||
<X> 164 </X>
|
||||
<Y> 12 </Y>
|
||||
<Size> 27 </Size>
|
||||
<Font> KanitTTF </Font>
|
||||
<Color> 0xB78F24 </Color>
|
||||
<Value> "10" </Value>
|
||||
</Text>
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> ' + str(x_button[i] + 184) + ' </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')
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue