This commit is contained in:
Kenta420 2024-03-20 17:46:08 +07:00
parent 488ccd06f3
commit 866f21d4e8
11 changed files with 1079 additions and 2366 deletions

View file

@ -60,6 +60,11 @@
else:
triple_pro_gen = False
if current_file_name == "page_catalog_group_recommend_multiple_pro.skt":
multi_pro_gen = True
else:
multi_pro_gen = False
if current_file_name == "page_catalog_group_pro_15THB.skt":
fixed_price = 15
else:
@ -169,24 +174,25 @@
out_xml('<FrameScroll> \r\n')
if touch_less_gen == True or double_pro_gen or triple_pro_gen:
out_xml('<Max> 16 </Max>\r\n')
elif multi_pro_gen:
out_xml('<Max> 4 </Max>\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')
if multi_pro_gen:
out_xml('<Column> 2 </Column>\r\n')
else:
out_xml('<Column> 4 </Column>\r\n')
out_xml('<Script>\r\n')
if "all" in verbose:
print("current_file_name " + current_file_name)
if triple_pro_gen == True:
out_xml('\t Var block_index_override = 0\r\n')
out_xml('\t Var block_index_move = 0\r\n')
elif double_pro_gen == True:
out_xml('\t Var block_index_override = 0\r\n')
out_xml('\t Var block_index_move = 0\r\n')
elif touch_less_gen == False:
if touch_less_gen == False or triple_pro_gen or double_pro_gen or multi_pro_gen:
out_xml('\t Var block_index_override = 0\r\n')
out_xml('\t Var block_index_move = 0\r\n')
@ -248,10 +254,9 @@
if double_pro_gen == True or triple_pro_gen:
out_xml(';dummy_layout.inc\r\n')
out_xml('; menu_new_list '+ str(len(menu_new_list))+'\r\n')
for spl in menu_new_list:
def GenListMenu():
for spl in menu_new_list:
#product_code = s
if spl[0] == "IGNORE":
continue
@ -277,14 +282,14 @@
str_con += spl[5] + '.Button,'
if spl[6] != '-':
str_con += spl[6] + '.Button,'
if spl[4] != '-':
str_con_var += spl[4] + '-'
if spl[5] != '-':
str_con_var += spl[5] + '-'
if spl[6] != '-':
str_con_var += spl[6] + '-'
str_con_var = str_con_var.replace("-", "")
if touch_less_gen == True or double_pro_gen == True or triple_pro_gen == True:
str_con += "Disable=Invisible,"
@ -495,8 +500,8 @@
if menu_white_color_catalog == True:
menu_color_font = '0xFFFFFF'
desc_color_font = '0xFFFFFF'
if spl[1] != "None":
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> 16 </X>\r\n')
@ -588,7 +593,7 @@
out_xml( '\t<State> ' + shw + ' </State>\r\n')
#out_xml( '\t<Value> Var( "฿" + $' + spl[4] + '.Price ) </Value>\r\n')
if "inter" in param:
if "free" in param:
out_xml( '\t<Value> "Free" </Value>\r\n')
@ -850,14 +855,14 @@
str_con += spl[9] + '.Button,'
if spl[6] != '-':
str_con += spl[10] + '.Button,'
if spl[8] != '-':
str_con_var += spl[8] + '-'
if spl[9] != '-':
str_con_var += spl[9] + '-'
if spl[10] != '-':
str_con_var += spl[10] + '-'
str_con_var = str_con_var.replace("-", "")
if touch_less_gen == True or double_pro_gen == True or triple_pro_gen == True:
str_con += "Disable=Invisible,"
@ -884,7 +889,7 @@
pd_code_3 = pd_code_available
pd_stage3 = '"Disable2"'
out_xml( '\t<Button>\r\n')
@ -1022,7 +1027,7 @@
out_xml( '\t<Text>\r\n')
out_xml( '\t<X> 16 </X>\r\n')
out_xml( '\t<Y> 164 </Y>\r\n')
@ -1319,7 +1324,23 @@
count_test = count_test + 1
#if count_test > 8 :
# break
if multi_pro_gen:
for i in range(1, 5):
out_put(';block'+i+'\r\n')
out_put('\t<Block>\r\n')
out_put('\t\t<State> ### </State> \r\n')
out_put('\t\t<MarginTop> 22 </MarginTop>\r\n')
out_put('\t\t<Width> 484 </Width>\r\n')
out_put('\t\t<Height> 602 </Height>\r\n')
GenListMenu()
out_put('\t\t</Block>')
out_put(';endblock'+i+'\r\n')
else:
out_xml('; menu_new_list '+ str(len(menu_new_list))+'\r\n')
GenListMenu()
out_xml('</FrameScroll>\r\n')
@ -1339,4 +1360,4 @@
out_xml('</EventClick>\r\n')
out_xml('</Button>\r\n')