checkout page gen from master

This commit is contained in:
Pakin 2023-11-16 13:09:43 +07:00
parent b4b7d89eab
commit c274dc981b

View file

@ -6,6 +6,11 @@
else:
touch_less_gen = False
if current_file_name == "page_catalog_group_pro_15THB.skt":
fixed_price = 15
else:
fixed_price = 0
print ("######################################################################################################")
idx_of_eng = 2
out_xml('<FrameScroll> \r\n')
@ -157,6 +162,18 @@
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_disable + '/'+ menu_img +'" </FilenameDisable>\r\n')
if len( spl) > 11:
if spl[4] != '-':
out_xml( '\t<OverlayImage> xmlpro( '+spl[4]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_%s_'+ spl[11] +'.png") </OverlayImage>\r\n')
menu_xml_var = 'xmlpro( '+spl[4]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
elif spl[6] != '-':
out_xml( '\t<OverlayImage> xmlpro( '+spl[6]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_%s_'+ spl[11] +'.png") </OverlayImage>\r\n')
menu_xml_var = 'xmlpro( '+spl[6]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
else:
out_xml( '\t<OverlayImage> xmlpro( '+spl[5]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_%s_'+ spl[11] +'.png") </OverlayImage>\r\n')
menu_xml_var = 'xmlpro( '+spl[5]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
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')
@ -188,6 +205,13 @@
out_xml( '\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\r\n')
out_xml( '\t\tVar OverlayMenuFilter !assigned ' + menu_xml_var + '\r\n')
out_xml( '\t\tDEBUGVAR OverlayMenuFilter\r\n')
out_xml( '\t\tVar SelectCountDrinkType = 0\r\n')
out_xml( '\t\tVar DefaultDrinkType = 0\r\n')
@ -248,6 +272,9 @@
out_xml( '\t\tDEBUGVAR PD_STAGE_2\r\n')
out_xml( '\t\tDEBUGVAR PD_STAGE_3\r\n')
out_xml( '\t\tVar SelectDrinkType = 0\r\n')
if fixed_price > 0:
out_xml( '\t\tVar From15THBPro = 1 \r\n')
out_xml( '\t\t\r\n')
@ -261,6 +288,10 @@
out_xml( '\t</EventOnClick>\r\n')
out_xml( '\t</Button>\r\n')
print("len= " + str(len( spl) ) )
menu_color_font = None
desc_color_font = None
@ -369,9 +400,15 @@
if "free" in param:
out_xml( '\t<Value> "Free" </Value>\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[4] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
if fixed_price > 0:
out_xml( '\t<Value> StringFmt( 15 , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[4] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
if fixed_price > 0:
out_xml( '\t<Value> "฿15" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
ice_tab_ice_show = True
@ -414,9 +451,15 @@
if "free" in param:
out_xml( '\t<Value> "Free" </Value>\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[5] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
if fixed_price > 0:
out_xml( '\t<Value> StringFmt( 15 , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[5] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[5] + '.Price ) </Value>\r\n')
if fixed_price > 0:
out_xml( '\t<Value> "฿15" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[5] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
ice_tab_blend_show = True
@ -461,9 +504,15 @@
if "free" in param:
out_xml( '\t<Value> "Free" </Value>\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[6] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
if fixed_price > 0:
out_xml( '\t<Value> StringFmt( 15 , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> StringFmt( $' + spl[6] + '.Price , DisplayFormat, PreScaleConvertShow) </Value>; test\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[6] + '.Price ) </Value>\r\n')
if fixed_price > 0:
out_xml( '\t<Value> "฿15" </Value>\r\n')
else:
out_xml( '\t<Value> Var( "฿" + $' + spl[6] + '.Price ) </Value>\r\n')
out_xml( '\t</Text>\r\n')
out_xml( '\t<Image>\r\n')
@ -566,6 +615,7 @@
out_xml( '</Block>\r\n')
###############################################################################
print("sp[2]" + spl[2])
out_xml( '\t; '+ spl[8] + ' ' + spl[9] + ' ' + spl[10]+ ' \r\n')
if spl[8] != '-' or spl[9] != '-' or spl[10] != '-':
menu_img = spl[7]
@ -626,6 +676,17 @@
out_xml( '\t<FilenameDisable> "' + new_default_dir_disable + '/'+ 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')
if len( spl) > 11:
if spl[8] != '-':
out_xml( '\t<OverlayImage> xmlpro( '+spl[8]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_%s_'+ spl[11] +'.png") </OverlayImage>\r\n')
menu_xml_var = 'xmlpro( '+spl[8]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
elif spl[10] != '-':
out_xml( '\t<OverlayImage> xmlpro( '+spl[10]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_%s_'+ spl[11] +'.png") </OverlayImage>\r\n')
menu_xml_var = 'xmlpro( '+spl[10]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
else:
out_xml( '\t<OverlayImage> xmlpro( '+spl[9]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_%s_'+ spl[11] +'.png") </OverlayImage>\r\n')
menu_xml_var = 'xmlpro( '+spl[9]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
out_xml( '\t<EventOnClick> \r\n')
# Default
@ -650,6 +711,13 @@
out_xml( '\t\tVar PD_STAGE_2 = ' + pd_stage2 + '\r\n')
out_xml( '\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\r\n')
out_xml( '\t\tVar OverlayMenuFilter !assigned ' + menu_xml_var + '\r\n')
out_xml( '\t\tDEBUGVAR OverlayMenuFilter\r\n')
out_xml( '\t\tVar SelectCountDrinkType = 0\r\n')
out_xml( '\t\tVar DefaultDrinkType = 0\r\n')
@ -722,7 +790,8 @@
out_xml( '\t</EventOnClick>\r\n')
out_xml( '\t</Button>\r\n')
out_xml( '\t<Text>\r\n')