DO unify
This commit is contained in:
parent
922ae67bd3
commit
b7ad0d3ac8
85 changed files with 4360 additions and 5 deletions
183
xml/menu_new_layout_gen.py
Normal file
183
xml/menu_new_layout_gen.py
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
|
||||
out_xml('<FrameScroll> \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('<ScrollHeight> "auto" </ScrollHeight>\r\n')
|
||||
out_xml('<Scroll> "Vertical" </Scroll>\r\n')
|
||||
out_xml('<Column> 4 </Column>\r\n')
|
||||
|
||||
count_test = 0
|
||||
out_xml('; menu_new_list '+ str(len(menu_new_list))+'\r\n')
|
||||
for spl in menu_new_list:
|
||||
#product_code = s
|
||||
menu_img = spl[7]
|
||||
out_xml( '\t; '+ spl[4] + ' ' + spl[5] + ' ' + spl[6]+ ' \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> Flag( \" ' + spl[4] + '.Button,' + spl[5] + '.Button,' + spl[6] + '.Button\") </State> \r\n')
|
||||
|
||||
out_xml( '\t<Button>\r\n')
|
||||
out_xml( '\t<State> "Enable" </State> \r\n')
|
||||
out_xml( '\t<Filename> "' + new_default_dir + '/'+ menu_img +'" </Filename>\r\n')
|
||||
out_xml( '\t<FilenamePress> "' + new_default_dir_press + '/'+ menu_img +'" </FilenamePress>\r\n')
|
||||
out_xml( '\t<FilenameDisable> "' + new_default_dir + '/'+ menu_img +'" </FilenameDisable>\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<EventOnClick> \r\n')
|
||||
|
||||
|
||||
|
||||
out_xml( '\t</EventOnClick>\r\n')
|
||||
out_xml( '\t</Button>\r\n')
|
||||
|
||||
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 164 </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> "' + spl[0] + '" </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> 220 </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> "' + spl[2] + '" </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> 164 </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> "' + spl[1] + '" </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> 220 </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> "' + spl[3] + '" </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
shw = "Enable"
|
||||
if spl[4] == "-" :
|
||||
shw = "Invisible"
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 16 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "hot.png" ) </Filename>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 50 </X>\r\n')
|
||||
out_xml( '\t<Y> 265 </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> "' + shw + '" </State>\r\n')
|
||||
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
shw = "Enable"
|
||||
if spl[5] == "-" :
|
||||
shw = "Invisible"
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 81 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "cold.png" ) </Filename>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 115 </X>\r\n')
|
||||
out_xml( '\t<Y> 265 </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> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[5] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
shw = "Enable"
|
||||
if spl[6] == "-" :
|
||||
shw = "Invisible"
|
||||
|
||||
out_xml( '\t<Image>\r\n')
|
||||
out_xml( '\t<X> 146 </X>\r\n')
|
||||
out_xml( '\t<Y> 264 </Y>\r\n')
|
||||
out_xml( '\t<Filename> Var( DirImage2 + "blend.png" ) </Filename>\r\n')
|
||||
out_xml( '\t<State> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t</Image>\r\n')
|
||||
|
||||
out_xml( '\t<Text>\r\n')
|
||||
out_xml( '\t<X> 180 </X>\r\n')
|
||||
out_xml( '\t<Y> 265 </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> "' + shw + '" </State>\r\n')
|
||||
out_xml( '\t<Value> Var( "฿" + $' + spl[6] + '.Price ) </Value>\r\n')
|
||||
out_xml( '\t</Text>\r\n')
|
||||
|
||||
out_xml( '</Block>\r\n')
|
||||
count_test = count_test + 1
|
||||
#if count_test > 8 :
|
||||
# break
|
||||
|
||||
|
||||
|
||||
out_xml('</FrameScroll>\r\n')
|
||||
|
||||
|
||||
out_xml('; Cart\r\n')
|
||||
out_xml('<Button>\r\n')
|
||||
out_xml('<X> 915 </X>\r\n')
|
||||
out_xml('<Y> 1769 </Y>\r\n')
|
||||
out_xml('<State> showCart </State>\r\n')
|
||||
out_xml('<Filename> cart_image_bn </Filename>\r\n')
|
||||
out_xml('<FilenamePress> cart_image_bp </FilenamePress>\r\n')
|
||||
out_xml('<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>\r\n')
|
||||
out_xml('<Volume> SoundVolume </Volume>\r\n')
|
||||
out_xml('<EventClick> \r\n')
|
||||
out_xml('\tOpen "ROOT/taobin_project/xml/page_payment_multi.xml"\r\n')
|
||||
out_xml('</EventClick>\r\n')
|
||||
out_xml('</Button>\r\n')
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue