SGP: fix blur 2x images, invisible img, wrong small image column

This commit is contained in:
Pakin 2024-07-16 14:15:05 +07:00
parent fdc9178397
commit 79583753c0
25 changed files with 1374 additions and 1256 deletions

View file

@ -4,12 +4,12 @@
"template": "/event/promotion_template.inc",
"product_code_key": "s2.52-21-01-0006.52-21-02-0003.52-21-03-0003",
"config": {
"normal_eng": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"normal_thai": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"press_eng": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"press_thai": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"disable_eng": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"disable_thai": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"normal_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_mocha.png",
"normal_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_mocha.png",
"press_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_mocha.png",
"press_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_mocha.png",
"disable_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_mocha.png",
"disable_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_mocha.png",
"event_on_click": "ROOT/taobin_project/xml/page_topping_select6.lxml"
}
},
@ -18,12 +18,12 @@
"template": "/event/promotion_template.inc",
"product_code_key": "s2.##-##-##-####.##-##-##-####.52-03-03-0049",
"config": {
"normal_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_iced_Milovalcocoa_smoothie.png",
"normal_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_iced_Milovalcocoa_smoothie.png",
"press_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_iced_Milovalcocoa_smoothie.png",
"press_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_iced_Milovalcocoa_smoothie.png",
"disable_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_iced_Milovalcocoa_smoothie.png",
"disable_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_iced_Milovalcocoa_smoothie.png",
"event_on_click": "ROOT/taobin_project/xml/page_topping_select6.lxml"
}
},
@ -32,12 +32,12 @@
"template": "/event/promotion_template.inc",
"product_code_key": "s2.52-02-01-0039.52-02-02-0039.52-02-03-0039",
"config": {
"normal_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_thai_milk_tea_SingPark.png",
"normal_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_thai_milk_tea_SingPark.png",
"press_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_thai_milk_tea_SingPark.png",
"press_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_thai_milk_tea_SingPark.png",
"disable_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_thai_milk_tea_SingPark.png",
"disable_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_thai_milk_tea_SingPark.png",
"event_on_click": "ROOT/taobin_project/xml/page_topping_select6.lxml"
}
}

View file

@ -4,12 +4,12 @@
"template": "/event/promotion_template.inc",
"product_code_key": "s3.52-21-01-0005.52-31-02-0002.52-31-03-0002",
"config": {
"normal_eng": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"normal_thai": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"press_eng": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"press_thai": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"disable_eng": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"disable_thai": "ROOT/taobin_project/inter/mys/image/event/pro_thai_tea/pro_thai_tea_big_btn.png",
"normal_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_cappuccino.png",
"normal_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_cappuccino.png",
"press_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_cappuccino.png",
"press_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_cappuccino.png",
"disable_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_cappuccino.png",
"disable_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_hot_cappuccino.png",
"event_on_click": "ROOT/taobin_project/xml/page_topping_select6.lxml"
}
},
@ -18,12 +18,12 @@
"template": "/event/promotion_template.inc",
"product_code_key": "s3.##-##-##-####.52-04-02-0002.##-##-##-####",
"config": {
"normal_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_protein_Chocolate.png",
"normal_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_protein_Chocolate.png",
"press_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_protein_Chocolate.png",
"press_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_protein_Chocolate.png",
"disable_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_protein_Chocolate.png",
"disable_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_protein_Chocolate.png",
"event_on_click": "ROOT/taobin_project/xml/page_topping_select6.lxml"
}
},
@ -32,12 +32,12 @@
"template": "/event/promotion_template.inc",
"product_code_key": "s3.##-##-##-####.##-##-##-####.52-03-03-0027",
"config": {
"normal_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"press_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_eng": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"disable_thai": "ROOT/taobin_project/inter/mys/image/event/pro_yuzu/pro_yuzu_big_btn.png",
"normal_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_StrawberrOreo_smoothie.png",
"normal_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_StrawberrOreo_smoothie.png",
"press_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_StrawberrOreo_smoothie.png",
"press_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_StrawberrOreo_smoothie.png",
"disable_eng": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_StrawberrOreo_smoothie.png",
"disable_thai": "ROOT/taobin_project/inter/sgp/image/event/season_pass/bn_StrawberrOreo_smoothie.png",
"event_on_click": "ROOT/taobin_project/xml/page_topping_select6.lxml"
}
}

View file

@ -1,5 +1,5 @@
; Singapore
Var CountEnablePromotion = 0
; Var CountEnablePromotion = 0
; ensure
Var CountSecureOpenPro = 0
@ -21,8 +21,10 @@ If SeasonPassMode = 1 Then
Var SeasonPassMode = 0
EndIf
EndIf
Var SeasonPassFile = CountryRootPath + "xml/event/season_pass/season_pass.ev"
TRY SeasonPassFile
EndIf
; zone promote
If OpenFromPageBoard = 1 Then

View file

@ -7,4 +7,18 @@ Var SeasonFile = CountryRootPath + "xml/event/triple_promotion_s2topleft_and_s2t
DEBUGVAR SeasonPass
DEBUGVAR SeasonFile
Var CountEnablePromotion = 0
If $Sum522101000652210200035221030003 = "Enable" Then
Var CountEnablePromotion = CountEnablePromotion + 1
EndIf
If $Sum5203030049 = "Enable" Then
Var CountEnablePromotion = CountEnablePromotion + 1
EndIf
If $Sum520201003952020200395202030039 = "Enable" Then
Var CountEnablePromotion = CountEnablePromotion + 1
EndIf
DEBUGVAR CountEnablePromotion

View file

@ -1,5 +1,5 @@
; Define
Var SeasonPass = 1
Var SeasonPass = 3
Var SeasonFile = CountryRootPath + "xml/event/triple_promotion_s3topleft_and_s3topright_and_s3botleft.lxml"
@ -7,4 +7,18 @@ Var SeasonFile = CountryRootPath + "xml/event/triple_promotion_s3topleft_and_s3t
DEBUGVAR SeasonPass
DEBUGVAR SeasonFile
Var CountEnablePromotion = 0
If $Sum522101000552310200025231030002 = "Enable" Then
Var CountEnablePromotion = CountEnablePromotion + 1
EndIf
If $Sum5204020002 = "Enable" Then
Var CountEnablePromotion = CountEnablePromotion + 1
EndIf
If $Sum5203030027 = "Enable" Then
Var CountEnablePromotion = CountEnablePromotion + 1
EndIf
DEBUGVAR CountEnablePromotion

View file

@ -36,7 +36,7 @@
"append": appendValueInMap
}
def cloneTextExport(key: str | list, mods=None, remove=None, replace=None):
def cloneTextExport(key: str | list, mods=None, remove=None, replace=None, block_output=False, block_append=False):
return {
"source": season_pass_menu_big_btn_ui,
"key": key,
@ -45,7 +45,9 @@
"remove": removePartOfText,
"remove_target": remove,
"replace_by": replace,
"modifiers": mods
"modifiers": mods,
"no_output": block_output,
"no_append": block_append
}
@ -188,6 +190,7 @@
if "sm" in spl[idx_img][8]:
is_sm = True
if pd_code_1.startswith('52-01') or pd_code_2.startswith('52-01') or pd_code_3.startswith('52-01'):
is_v1 = True
@ -494,12 +497,22 @@
out_xml( '\t<X> 16 </X>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<Y> 264 </Y>\r\n',export_to=cloneTextExport(menu_key, lambda y_pos: y_pos * 2 + 10))
if multi_pro_gen and gen_ss and not is_sm:
if gen_ss and (not is_sm or ", " in spl[idx_img][8]):
# expect season mode
out_xml('\t<Width> 390 </Width>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Width> 390 </Width>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
else:
if gen_ss:
print("use normal: caused by multi_pro_gen=",multi_pro_gen,",is_sm=", is_sm )
out_xml( '\t<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key, block_append=True))
if gen_ss and (not is_sm or ", " in spl[idx_img][8]):
out_xml('\t<Filename> "ROOT/taobin_project/inter/sgp/image/event/season_pass/drink_option_en/option_deactive.png" </Filename>\r\n', export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t</Image>\r\n',export_to=cloneTextExport(menu_key))
ice_tab_hot_show = True
@ -518,15 +531,20 @@
menu_key,
lambda y_pos: y_pos * 2 + 10))
if multi_pro_gen and gen_ss and not is_sm:
if gen_ss and (not is_sm or ", " in spl[idx_img][8]):
# expect season mode
out_xml('\t<Width> 134 </Width>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Width> 134 </Width>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<State> ' + shw + ' </State>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<Filename> Var( DirImage2 + "hot.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<Filename> Var( DirImage2 + "hot.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key, block_append=True))
out_xml( '\t<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key, block_append=True))
if gen_ss and (not is_sm or "," in spl[idx_img][8]):
out_xml( '\t<Filename> "ROOT/taobin_project/inter/sgp/image/event/season_pass/drink_option_en/hot.png" </Filename>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<FilenameDisable> "ROOT/taobin_project/inter/sgp/image/event/season_pass/drink_option_en/hot_db.png" </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t</Image>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<Text>\r\n',export_to=cloneTextExport(menu_key))
@ -585,17 +603,22 @@
menu_key,
lambda y_pos: y_pos * 2 + 10))
if multi_pro_gen and gen_ss and not is_sm:
if gen_ss and (not is_sm or ", " in spl[idx_img][8]):
# expect season mode
out_xml('\t<Width> 134 </Width>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Width> 134 </Width>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
if pd_code_2 == "51-05-02-0016":
out_xml( '\t<Filename> Var( DirImage2 + "normal.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key))
else:
out_xml( '\t<Filename> Var( DirImage2 + "cold.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<Filename> Var( DirImage2 + "cold.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key, block_append=True))
out_xml( '\t<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key, block_append=True))
if gen_ss and (not is_sm or "," in spl[idx_img][8]):
out_xml( '\t<Filename> "ROOT/taobin_project/inter/sgp/image/event/season_pass/drink_option_en/cold.png" </Filename>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<FilenameDisable> "ROOT/taobin_project/inter/sgp/image/event/season_pass/drink_option_en/cold_db.png" </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<State> ' + shw + ' </State>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t</Image>\r\n',export_to=cloneTextExport(menu_key))
@ -653,13 +676,18 @@
mods=lambda y_pos: y_pos * 2 + 10
))
if multi_pro_gen and gen_ss and not is_sm:
if gen_ss and (not is_sm or ", " in spl[idx_img][8]):
# expect season mode
out_xml('\t<Width> 134 </Width>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key))
out_xml('\t<Width> 134 </Width>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml('\t<Height> 44 </Height>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<Filename> Var( DirImage2 + "blend.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<Filename> Var( DirImage2 + "blend.png" ) </Filename>\r\n',export_to=cloneTextExport(menu_key, block_append=True))
out_xml( '\t<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key, block_append=True))
if gen_ss and (not is_sm or "," in spl[idx_img][8]):
out_xml( '\t<Filename> "ROOT/taobin_project/inter/sgp/image/event/season_pass/drink_option_en/blend.png" </Filename>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<FilenameDisable> "ROOT/taobin_project/inter/sgp/image/event/season_pass/drink_option_en/blend_db.png" </FilenameDisable>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<State> ' + shw + ' </State>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t</Image>\r\n',export_to=cloneTextExport(menu_key))
@ -801,13 +829,13 @@
out_xml( '\t<Mode> "disable-show" </Mode>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<State> $Sum' + str_con_var +' </State> \r\n',export_to=cloneTextExport(menu_key))
if multi_pro_gen and gen_ss and not is_sm:
out_xml('\t<Color> 0x322B26 </Color>',export_to=cloneTextExport(menu_key))
out_xml( '\t<Value> \"UNAVAILABLE\" </Value>\r\n',export_to=cloneTextExport(menu_key))
else:
out_xml( '\t<Language>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t\t<ID> 000013 </ID> \r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t</Language>\r\n',export_to=cloneTextExport(menu_key))
# if gen_ss and not is_sm:
# out_xml('\t<Color> 0x322B26 </Color>',export_to=cloneTextExport(menu_key, block_output=True))
# out_xml( '\t<Value> \"UNAVAILABLE\" </Value>\r\n',export_to=cloneTextExport(menu_key, block_output=True))
out_xml( '\t<Language>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t\t<ID> 000013 </ID> \r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t</Language>\r\n',export_to=cloneTextExport(menu_key))
out_xml( '\t<Align> center-vertical-horizontal </Align>\r\n',export_to=cloneTextExport(menu_key))

View file

@ -77,7 +77,7 @@
Var DisplayPrompt = "Invisible"
Var DisplayQR = "Enable"
Var Timeout = 18
Var Timeout = 15
</EventClick>
</Button>