This commit is contained in:
wanlop run 2025-04-09 16:02:36 +07:00
commit ce8ecd128e
59 changed files with 2275 additions and 310 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

@ -1,5 +1,5 @@
SAVELOG " select_drink_current.inc select_drink_current.inc "
SAVELOG " select_drink_current_multi select_drink_current_multi select_drink_current_multi select_drink_current_multi "
Topping "Select" Seeker.selected_a_drink
@ -25,7 +25,7 @@
Topping "ClearMultiTopping" "Current"
DEBUGVAR Seeker.orderFromNewTopping
If Seeker.orderFromNewTopping = 1 Then
Var Seeker.orderFromNewTopping = 0
Topping "Multiply6-ID" Seeker.strMulti6_5

View file

@ -853,3 +853,14 @@ ICED COCONUT PEPSI 51-05-02-0091 1 62 14 13 23 24 120 17:00 23
COCONUT PEPSI FRAPPE 51-05-03-0091 1 23 62 14 41 24 120 17:00 23
ICED COCONUT LYCHEE SODA 51-05-02-0093 1 62 11 13 23 24 120 17:00 23
ICED COCONUT PEPSI MAX 51-05-02-0117 1 62 14 13 23 24 120 17:00 23
Hot coconut latte 51-21-01-0081 1 2 3 4 5 62 6 24 120 17:00 23
Iced coconut latte 51-21-02-0081 1 2 3 4 5 62 6 23 24 120 17:00 23
Frappe coconut latte 51-21-03-0081 1 2 3 4 5 62 6 23 41 24 120 17:00 23
Cafe Mocha protein 51-04-02-0062 1 2 3 4 5 25 26 70 23 24 120 17:00 23
Hot Mint Matcha Latte 51-02-01-0050 1 8 9 59 70 24 120 17:00 23
Hot Coconut Matcha Latte 51-02-01-0060 1 8 9 62 70 24 120 17:00 23
Hot Coconut Matcha tea 51-02-01-0061 1 8 9 62 24 120 17:00 23
Frappe Vanilla Caramel Latte 51-21-03-0079 1 2 3 4 5 63 22 23 41 24 120 17:00 23
Hot strawberry matcha 51-02-01-0071 1 8 9 19 70 24 120 17:00 23
Frappe strawberry matcha latte 51-02-03-0071 1 8 9 19 70 23 41 24 120 17:00 23

Can't render this file because it has a wrong number of fields in line 220.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -23804,6 +23804,550 @@
</Language>
<Align> center-vertical-horizontal </Align>
</Text>
</Block>
; ==================> Len = 3
; 51-21-01-0081 51-21-02-0081 51-21-03-0081
<Block>
<MarginLeft> 33 </MarginLeft>
<MarginTop> 22 </MarginTop>
<Width> 225 </Width>
<Height> 296 </Height>
<State> Flag( 51-21-01-0081.Button,51-21-02-0081.Button,51-21-03-0081.Button,$Sum512101008151210200815121030081) </State>
<Button>
<State> $Sum512101008151210200815121030081 </State>
<Filename> "ROOT/taobin_project/inter/aus/image/page_drink_n//bn_COCONUT_AMERICANO.png" </Filename>
<FilenamePress> "ROOT/taobin_project/inter/aus/image/page_drink_press_n//bn_COCONUT_AMERICANO.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/inter/aus/image/page_drink_disable_n2//bn_COCONUT_AMERICANO.png" </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventOnClick>
Var PictureDrink = "ROOT/taobin_project/inter/aus/image/page_drink_picture2_n/" + "bn_COCONUT_AMERICANO.png"
Var OpenFromXML = CurrentXMLFileName2
Var PriceD1 = $51-21-01-0081.Price
Var PriceD2 = $51-21-02-0081.Price
Var PriceD3 = $51-21-03-0081.Price
Var PD_CODE1 = "51-21-01-0081"
Var PD_CODE2 = "51-21-02-0081"
Var PD_CODE3 = "51-21-03-0081"
; begin lang
Var aliasName[0] = "COCONUT\nLATTE"
Var aliasDesc[0] = "Espresso, Milk, Coconut Syrup,\nSugar, Water"
Var aliasName[1] = ""
Var aliasDesc[1] = ""
Var aliasName[2] = ""
Var aliasDesc[2] = ""
Var aliasName[3] = ""
Var aliasDesc[3] = ""
Var aliasName[4] = ""
Var aliasDesc[4] = ""
Var aliasName[5] = ""
Var aliasDesc[5] = ""
Var NameLang[0][0] = "HOT COCONUT LATTE"
Var NameLang[0][1] = ""
Var NameLang[0][2] = ""
Var NameLang[0][3] = ""
Var NameLang[0][4] = ""
Var NameLang[0][5] = ""
Var DescLang[0][0] = ""
Var DescLang[0][1] = ""
Var DescLang[0][2] = ""
Var DescLang[0][3] = ""
Var DescLang[0][4] = ""
Var DescLang[0][5] = ""
Var NameLang[1][0] = "ICED COCONUT LATTE"
Var NameLang[1][1] = ""
Var NameLang[1][2] = ""
Var NameLang[1][3] = ""
Var NameLang[1][4] = ""
Var NameLang[1][5] = ""
Var DescLang[1][0] = "Coconut, Coffee, Milk"
Var DescLang[1][1] = ""
Var DescLang[1][2] = ""
Var DescLang[1][3] = ""
Var DescLang[1][4] = ""
Var DescLang[1][5] = ""
Var NameLang[2][0] = "FRAPPE COCONUT LATTE"
Var NameLang[2][1] = ""
Var NameLang[2][2] = ""
Var NameLang[2][3] = ""
Var NameLang[2][4] = ""
Var NameLang[2][5] = ""
Var DescLang[2][0] = "Coconut, Coffee, Milk"
Var DescLang[2][1] = ""
Var DescLang[2][2] = ""
Var DescLang[2][3] = ""
Var DescLang[2][4] = ""
Var DescLang[2][5] = ""
; end lang
Var PD_STAGE_1 = $51-21-01-0081.Button
Var PD_STAGE_2 = $51-21-02-0081.Button
Var PD_STAGE_3 = $51-21-03-0081.Button
Var SelectCountDrinkType = 0
Var DefaultDrinkType = 0
If PD_STAGE_1 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 1
EndIf
If PD_STAGE_2 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 2
EndIf
If PD_STAGE_3 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 3
EndIf
If PD_STAGE_2 = "Enable" Then
Topping "Load" "51-21-02-0081"
Else
If PD_STAGE_1 = "Enable" Then
Topping "Load" "51-21-01-0081"
Else
Topping "Load" "51-21-03-0081"
EndIf
EndIf
DEBUGVAR PD_STAGE_1
DEBUGVAR PD_STAGE_2
DEBUGVAR PD_STAGE_3
Var SelectDrinkType = 0
Open "ROOT/taobin_project/xml/page_topping_select6.lxml"
</EventOnClick>
</Button>
<Text>
<X> 16 </X>
<Y> 164 </Y>
<Size> 22 </Size>
<Width>222</Width>
<Mode> "multi2" </Mode>
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<LanguageGroup>
<LanguageSlot1>COCONUT\nLATTE</LanguageSlot1>
<LanguageSlot2></LanguageSlot2>
<LanguageSlot3>COCONUT\nLATTE</LanguageSlot3>
<LanguageSlot4></LanguageSlot4>
<LanguageSlot5></LanguageSlot5>
<LanguageSlot6></LanguageSlot6>
</LanguageGroup>
</Text>
<Text>
<X> 16 </X>
<Y> 220 </Y>
<Size> 14 </Size>
<Width>222</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<LanguageGroup>
<LanguageSlot1>Espresso, Milk, Coconut Syrup,\nSugar, Water</LanguageSlot1>
<LanguageSlot2></LanguageSlot2>
<LanguageSlot3>Espresso, Milk, Coconut Syrup,\nSugar, Water</LanguageSlot3>
<LanguageSlot4></LanguageSlot4>
<LanguageSlot5></LanguageSlot5>
<LanguageSlot6></LanguageSlot6>
</LanguageGroup>
</Text>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>
</Image>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<State> $51-21-01-0081.Button </State>
<Filename> Var( DirImage2 + "hot.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>
</Image>
<Text>
<X> TextPriceMenuHotX </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> $51-21-01-0081.Button </State>
<Value> StringFmt( $51-21-01-0081.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "cold.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>
<State> $51-21-02-0081.Button </State>
</Image>
<Text>
<X> 113 </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> $51-21-02-0081.Button </State>
<Value> StringFmt( $51-21-02-0081.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 146 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "blend.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>
<State> $51-21-03-0081.Button </State>
</Image>
<Text>
<X> TextPriceMenuBlendX </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitRegularTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> $51-21-03-0081.Button </State>
<Value> StringFmt( $51-21-03-0081.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<State>
eval(
If ICE_PROCESS_STATUS = 2 Then
If $Sum512101008151210200815121030081 = "Disable" Then
Var ice_tab_process_show = "Disable"
Else
Var ice_tab_process_show = "Enable"
EndIf
Else
Var ice_tab_process_show = "Invisible"
EndIf
Var return = ice_tab_process_show
)
</State>
<Filename> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </Filename>
<FilenameDisable> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </FilenameDisable>
</Image>
<Image>
<X> 49 </X>
<Y> 117 </Y>
<State>
eval(
If $Sum512101008151210200815121030081 = "Disable" Then
STRCONTAIN "ERR" $51-21-01-0081.TAG tag1_is_disable
STRCONTAIN "ERR" $51-21-02-0081.TAG tag2_is_disable
STRCONTAIN "ERR" $51-21-03-0081.TAG tag3_is_disable
Var return = "Invisible"
If tag1_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag2_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag3_is_disable = "true" Then
Var return = "Enable"
EndIf
Else
Var return = "Invisible"
EndIf
)
</State>
<Filename> "ROOT/taobin_project/image//img_menu_err2.png" </Filename>
</Image>
<Text>
<X> 84 </X>
<Y> 266 </Y>
<Size> 10 </Size>
<Font> OpunMediumTTF </Font>
<Color> 0xDE794E </Color>
<State> ice_tab_process_show </State>
<Value> ice_show_open </Value>
</Text>
<Text>
<X> 48 </X>
<Y> 116 </Y>
<Size> 32 </Size>
<Width>128</Width>
<Height>64</Height>
<Mode> "disable-show" </Mode>
<State> $Sum512101008151210200815121030081 </State>
<Language>
<ID> 000013 </ID>
</Language>
<Align> center-vertical-horizontal </Align>
</Text>
</Block>
; ==================> Len = 3
; - - 51-21-03-0079
<Block>
<MarginLeft> 33 </MarginLeft>
<MarginTop> 22 </MarginTop>
<Width> 225 </Width>
<Height> 296 </Height>
<State> Flag( 51-21-03-0079.Button,$Sum5121030079) </State>
<Button>
<State> $Sum5121030079 </State>
<Filename> "ROOT/taobin_project/inter/aus/image/page_drink_n//bn_vanilla_caramel_latte.png" </Filename>
<FilenamePress> "ROOT/taobin_project/inter/aus/image/page_drink_press_n//bn_vanilla_caramel_latte.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/inter/aus/image/page_drink_disable_n2//bn_vanilla_caramel_latte.png" </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventOnClick>
Var PictureDrink = "ROOT/taobin_project/inter/aus/image/page_drink_picture2_n/" + "bn_vanilla_caramel_latte.png"
Var OpenFromXML = CurrentXMLFileName2
Var PriceD1 = $-.Price
Var PriceD2 = $-.Price
Var PriceD3 = $51-21-03-0079.Price
Var PD_CODE1 = "##-##-##-####"
Var PD_CODE2 = "##-##-##-####"
Var PD_CODE3 = "51-21-03-0079"
; begin lang
Var aliasName[0] = "VANILLA CARAMEL\nLATTE"
Var aliasDesc[0] = "Espresso, Caramel,Vanilla Syrup,\nSugar, Water"
Var aliasName[1] = ""
Var aliasDesc[1] = ""
Var aliasName[2] = ""
Var aliasDesc[2] = ""
Var aliasName[3] = ""
Var aliasDesc[3] = ""
Var aliasName[4] = ""
Var aliasDesc[4] = ""
Var aliasName[5] = ""
Var aliasDesc[5] = ""
Var NameLang[0][0] = ""
Var NameLang[0][1] = ""
Var NameLang[0][2] = ""
Var NameLang[0][3] = ""
Var NameLang[0][4] = ""
Var NameLang[0][5] = ""
Var DescLang[0][0] = ""
Var DescLang[0][1] = ""
Var DescLang[0][2] = ""
Var DescLang[0][3] = ""
Var DescLang[0][4] = ""
Var DescLang[0][5] = ""
Var NameLang[1][0] = ""
Var NameLang[1][1] = ""
Var NameLang[1][2] = ""
Var NameLang[1][3] = ""
Var NameLang[1][4] = ""
Var NameLang[1][5] = ""
Var DescLang[1][0] = ""
Var DescLang[1][1] = ""
Var DescLang[1][2] = ""
Var DescLang[1][3] = ""
Var DescLang[1][4] = ""
Var DescLang[1][5] = ""
Var NameLang[2][0] = "FRAPPE VANILLA CARAMEL LATTE"
Var NameLang[2][1] = ""
Var NameLang[2][2] = ""
Var NameLang[2][3] = ""
Var NameLang[2][4] = ""
Var NameLang[2][5] = ""
Var DescLang[2][0] = "Vanilla, Caramel, Milk, Coffee"
Var DescLang[2][1] = ""
Var DescLang[2][2] = ""
Var DescLang[2][3] = ""
Var DescLang[2][4] = ""
Var DescLang[2][5] = ""
; end lang
Var PD_STAGE_1 = "Disable2"
Var PD_STAGE_2 = "Disable2"
Var PD_STAGE_3 = $51-21-03-0079.Button
Var SelectCountDrinkType = 0
Var DefaultDrinkType = 0
If PD_STAGE_1 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 1
EndIf
If PD_STAGE_2 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 2
EndIf
If PD_STAGE_3 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 3
EndIf
If PD_STAGE_2 = "Enable" Then
Topping "Load" "-"
Else
If PD_STAGE_1 = "Enable" Then
Topping "Load" "-"
Else
Topping "Load" "51-21-03-0079"
EndIf
EndIf
DEBUGVAR PD_STAGE_1
DEBUGVAR PD_STAGE_2
DEBUGVAR PD_STAGE_3
Var SelectDrinkType = 0
Open "ROOT/taobin_project/xml/page_topping_select6.lxml"
</EventOnClick>
</Button>
<Text>
<X> 16 </X>
<Y> 164 </Y>
<Size> 22 </Size>
<Width>222</Width>
<Mode> "multi2" </Mode>
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<LanguageGroup>
<LanguageSlot1>VANILLA CARAMEL\nLATTE</LanguageSlot1>
<LanguageSlot2></LanguageSlot2>
<LanguageSlot3>VANILLA CARAMEL\nLATTE</LanguageSlot3>
<LanguageSlot4></LanguageSlot4>
<LanguageSlot5></LanguageSlot5>
<LanguageSlot6></LanguageSlot6>
</LanguageGroup>
</Text>
<Text>
<X> 16 </X>
<Y> 220 </Y>
<Size> 14 </Size>
<Width>222</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<LanguageGroup>
<LanguageSlot1>Espresso, Caramel,Vanilla Syrup,\nSugar, Water</LanguageSlot1>
<LanguageSlot2></LanguageSlot2>
<LanguageSlot3>Espresso, Caramel,Vanilla Syrup,\nSugar, Water</LanguageSlot3>
<LanguageSlot4></LanguageSlot4>
<LanguageSlot5></LanguageSlot5>
<LanguageSlot6></LanguageSlot6>
</LanguageGroup>
</Text>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>
</Image>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<State> "Invisible" </State>
<Filename> Var( DirImage2 + "hot.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>
</Image>
<Text>
<X> TextPriceMenuHotX </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> "Invisible" </State>
<Value> StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "cold.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>
<State> "Invisible" </State>
</Image>
<Text>
<X> 113 </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> "Invisible" </State>
<Value> StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 146 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "blend.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>
<State> $51-21-03-0079.Button </State>
</Image>
<Text>
<X> TextPriceMenuBlendX </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitRegularTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> $51-21-03-0079.Button </State>
<Value> StringFmt( $51-21-03-0079.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<State>
eval(
If ICE_PROCESS_STATUS = 2 Then
Var ice_tab_process_show = "Invisible"
Else
Var ice_tab_process_show = "Invisible"
EndIf
Var return = ice_tab_process_show
)
</State>
<Filename> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </Filename>
<FilenameDisable> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </FilenameDisable>
</Image>
<Image>
<X> 49 </X>
<Y> 117 </Y>
<State>
eval(
If $Sum5121030079 = "Disable" Then
STRCONTAIN "ERR" $##-##-##-####.TAG tag1_is_disable
STRCONTAIN "ERR" $##-##-##-####.TAG tag2_is_disable
STRCONTAIN "ERR" $51-21-03-0079.TAG tag3_is_disable
Var return = "Invisible"
If tag1_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag2_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag3_is_disable = "true" Then
Var return = "Enable"
EndIf
Else
Var return = "Invisible"
EndIf
)
</State>
<Filename> "ROOT/taobin_project/image//img_menu_err2.png" </Filename>
</Image>
<Text>
<X> 84 </X>
<Y> 266 </Y>
<Size> 10 </Size>
<Font> OpunMediumTTF </Font>
<Color> 0xDE794E </Color>
<State> ice_tab_process_show </State>
<Value> ice_show_open </Value>
</Text>
<Text>
<X> 48 </X>
<Y> 116 </Y>
<Size> 32 </Size>
<Width>128</Width>
<Height>64</Height>
<Mode> "disable-show" </Mode>
<State> $Sum5121030079 </State>
<Language>
<ID> 000013 </ID>
</Language>
<Align> center-vertical-horizontal </Align>
</Text>
</Block>
</FrameScroll>
; Cart

File diff suppressed because it is too large Load diff

View file

@ -5173,6 +5173,276 @@
</Language>
<Align> center-vertical-horizontal </Align>
</Text>
</Block>
; ==================> Len = 3
; - 51-04-02-0062 -
<Block>
<MarginLeft> 33 </MarginLeft>
<MarginTop> 22 </MarginTop>
<Width> 225 </Width>
<Height> 296 </Height>
<State> Flag( 51-04-02-0062.Button,$Sum5104020062) </State>
<Button>
<State> $Sum5104020062 </State>
<Filename> "ROOT/taobin_project/inter/aus/image/page_drink_n//bn_protein_Mocha.png" </Filename>
<FilenamePress> "ROOT/taobin_project/inter/aus/image/page_drink_press_n//bn_protein_Mocha.png" </FilenamePress>
<FilenameDisable> "ROOT/taobin_project/inter/aus/image/page_drink_disable_n2//bn_protein_Mocha.png" </FilenameDisable>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventOnClick>
Var PictureDrink = "ROOT/taobin_project/inter/aus/image/page_drink_picture2_n/" + "bn_protein_Mocha.png"
Var OpenFromXML = CurrentXMLFileName2
Var PriceD1 = $-.Price
Var PriceD2 = $51-04-02-0062.Price
Var PriceD3 = $-.Price
Var PD_CODE1 = "##-##-##-####"
Var PD_CODE2 = "51-04-02-0062"
Var PD_CODE3 = "##-##-##-####"
; begin lang
Var aliasName[0] = "MOCHA\nPROTEIN SHAKE"
Var aliasDesc[0] = "Whey protein, Espresso\n& Milk, Chocolate"
Var aliasName[1] = ""
Var aliasDesc[1] = ""
Var aliasName[2] = ""
Var aliasDesc[2] = ""
Var aliasName[3] = ""
Var aliasDesc[3] = ""
Var aliasName[4] = ""
Var aliasDesc[4] = ""
Var aliasName[5] = ""
Var aliasDesc[5] = ""
Var NameLang[0][0] = ""
Var NameLang[0][1] = ""
Var NameLang[0][2] = ""
Var NameLang[0][3] = ""
Var NameLang[0][4] = ""
Var NameLang[0][5] = ""
Var DescLang[0][0] = ""
Var DescLang[0][1] = ""
Var DescLang[0][2] = ""
Var DescLang[0][3] = ""
Var DescLang[0][4] = ""
Var DescLang[0][5] = ""
Var NameLang[1][0] = "CAFE MOCHA PROTEIN"
Var NameLang[1][1] = ""
Var NameLang[1][2] = ""
Var NameLang[1][3] = ""
Var NameLang[1][4] = ""
Var NameLang[1][5] = ""
Var DescLang[1][0] = "Coffee, Chocolate, Whey"
Var DescLang[1][1] = ""
Var DescLang[1][2] = ""
Var DescLang[1][3] = ""
Var DescLang[1][4] = ""
Var DescLang[1][5] = ""
Var NameLang[2][0] = ""
Var NameLang[2][1] = ""
Var NameLang[2][2] = ""
Var NameLang[2][3] = ""
Var NameLang[2][4] = ""
Var NameLang[2][5] = ""
Var DescLang[2][0] = ""
Var DescLang[2][1] = ""
Var DescLang[2][2] = ""
Var DescLang[2][3] = ""
Var DescLang[2][4] = ""
Var DescLang[2][5] = ""
; end lang
Var PD_STAGE_1 = "Disable2"
Var PD_STAGE_2 = $51-04-02-0062.Button
Var PD_STAGE_3 = "Disable2"
Var SelectCountDrinkType = 0
Var DefaultDrinkType = 0
If PD_STAGE_1 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 1
EndIf
If PD_STAGE_2 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 2
EndIf
If PD_STAGE_3 = "Enable" Then
Var SelectCountDrinkType = SelectCountDrinkType + 1
Var DefaultDrinkType = 3
EndIf
If PD_STAGE_2 = "Enable" Then
Topping "Load" "51-04-02-0062"
Else
If PD_STAGE_1 = "Enable" Then
Topping "Load" "-"
Else
Topping "Load" "-"
EndIf
EndIf
DEBUGVAR PD_STAGE_1
DEBUGVAR PD_STAGE_2
DEBUGVAR PD_STAGE_3
Var SelectDrinkType = 0
Open "ROOT/taobin_project/xml/page_topping_select6.lxml"
</EventOnClick>
</Button>
<Text>
<X> 16 </X>
<Y> 164 </Y>
<Size> 22 </Size>
<Width>222</Width>
<Mode> "multi2" </Mode>
<Font> KanitMediumTTF </Font>
<Color> 0x322B26 </Color>
<LanguageGroup>
<LanguageSlot1>MOCHA\nPROTEIN SHAKE</LanguageSlot1>
<LanguageSlot2></LanguageSlot2>
<LanguageSlot3>MOCHA\nPROTEIN SHAKE</LanguageSlot3>
<LanguageSlot4></LanguageSlot4>
<LanguageSlot5></LanguageSlot5>
<LanguageSlot6></LanguageSlot6>
</LanguageGroup>
</Text>
<Text>
<X> 16 </X>
<Y> 220 </Y>
<Size> 14 </Size>
<Width>222</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<LanguageGroup>
<LanguageSlot1>Whey protein, Espresso\n& Milk, Chocolate</LanguageSlot1>
<LanguageSlot2></LanguageSlot2>
<LanguageSlot3>Whey protein, Espresso\n& Milk, Chocolate</LanguageSlot3>
<LanguageSlot4></LanguageSlot4>
<LanguageSlot5></LanguageSlot5>
<LanguageSlot6></LanguageSlot6>
</LanguageGroup>
</Text>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "option_deactive.png" ) </Filename>
</Image>
<Image>
<X> 16 </X>
<Y> 264 </Y>
<State> "Invisible" </State>
<Filename> Var( DirImage2 + "hot.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "hot_db.png" ) </FilenameDisable>
</Image>
<Text>
<X> TextPriceMenuHotX </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> "Invisible" </State>
<Value> StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "cold.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "cold_db.png" ) </FilenameDisable>
<State> $51-04-02-0062.Button </State>
</Image>
<Text>
<X> 113 </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitMediumTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> $51-04-02-0062.Button </State>
<Value> StringFmt( $51-04-02-0062.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 146 </X>
<Y> 264 </Y>
<Filename> Var( DirImage2 + "blend.png" ) </Filename>
<FilenameDisable> Var( DirImage2 + "blend_db.png" ) </FilenameDisable>
<State> "Invisible" </State>
</Image>
<Text>
<X> TextPriceMenuBlendX </X>
<Y> TextPriceMenuY </Y>
<Size> TextPriceMenuSize </Size>
<Width>220</Width>
<Font> KanitRegularTTF </Font>
<Color> 0x6F5F51 </Color>
<ColorDisable> 0xEAE6E1 </ColorDisable>
<State> "Invisible" </State>
<Value> StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) </Value>; test
</Text>
<Image>
<X> 81 </X>
<Y> 264 </Y>
<State>
eval(
If ICE_PROCESS_STATUS = 2 Then
Var ice_tab_process_show = "Invisible"
Else
Var ice_tab_process_show = "Invisible"
EndIf
Var return = ice_tab_process_show
)
</State>
<Filename> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </Filename>
<FilenameDisable> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </FilenameDisable>
</Image>
<Image>
<X> 49 </X>
<Y> 117 </Y>
<State>
eval(
If $Sum5104020062 = "Disable" Then
STRCONTAIN "ERR" $##-##-##-####.TAG tag1_is_disable
STRCONTAIN "ERR" $51-04-02-0062.TAG tag2_is_disable
STRCONTAIN "ERR" $##-##-##-####.TAG tag3_is_disable
Var return = "Invisible"
If tag1_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag2_is_disable = "true" Then
Var return = "Enable"
EndIf
If tag3_is_disable = "true" Then
Var return = "Enable"
EndIf
Else
Var return = "Invisible"
EndIf
)
</State>
<Filename> "ROOT/taobin_project/image//img_menu_err2.png" </Filename>
</Image>
<Text>
<X> 84 </X>
<Y> 266 </Y>
<Size> 10 </Size>
<Font> OpunMediumTTF </Font>
<Color> 0xDE794E </Color>
<State> ice_tab_process_show </State>
<Value> ice_show_open </Value>
</Text>
<Text>
<X> 48 </X>
<Y> 116 </Y>
<Size> 32 </Size>
<Width>128</Width>
<Height>64</Height>
<Mode> "disable-show" </Mode>
<State> $Sum5104020062 </State>
<Language>
<ID> 000013 </ID>
</Language>
<Align> center-vertical-horizontal </Align>
</Text>
</Block>
</FrameScroll>
; Cart

View file

@ -205,7 +205,7 @@
Var menu_name_thai_blender = ""
Var menu_desc_thai_blender = ""
TRY "/mnt/sdcard/coffeevending/taobin_project/xml/event/tricker.ev"
TRY "/mnt/sdcard/coffeevending/taobin_project/inter/hkg/xml/multi/event/tricker.ev"
TRY "ROOT/taobin_project/xml/sometime/RoadShow.ev"

View file

@ -310,6 +310,33 @@
out_xml('\t\t</EventOnClick>\n')
out_xml('\t\t</Menu>\n\n')
def GenBanner(type, thai_media, eng_media, event_on_click_script, start_date_time, end_date_time, state_var):
str_con = []
if re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', start_date_time.strip()):
str_con.append(f'DateTimeStart="{start_date_time.strip()}"')
if re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', end_date_time.strip()):
str_con.append(f'DateTimeEnd="{end_date_time.strip()}"')
if re.match(r'^\w.*', state_var.strip()):
str_con.append(f'Var={state_var.strip()},')
out_xml('\t\t<Banner>\n')
out_xml('\t\t\t<State> Flag( '+ ",".join(str_con) + ' ) </State>\n')
out_xml('\t\t\t<Type> ' + type + ' </Type>\n')
out_xml('\t\t\t<Media>\n')
out_xml('\t\t\t\teval(\n')
out_xml('\t\t\t\t\tIf show_eng = "true" Then\n')
out_xml('\t\t\t\t\t\tVar return = ' + eng_media + '\n')
out_xml('\t\t\t\t\tElse\n')
out_xml('\t\t\t\t\t\tVar return = ' + thai_media + '\n')
out_xml('\t\t\t\t\tEndIf\n')
out_xml('\t\t\t\t)\n')
out_xml('\t\t\t</Media>\n')
out_xml('\t\t\t<EventOnClick>\n')
out_xml('\t\t\t\t' + event_on_click_script.replace('\\n', '\n').replace('\\t', '\t') + '\n')
out_xml('\t\t\t</EventOnClick>\n')
out_xml('\t\t</Banner>\n')
idx_lang_myanmar = 6
idx_lang_malay = 5
idx_lang_japan = 4
@ -409,26 +436,38 @@
out_xml( '\t;' + spl[0] + '\r\n')
continue
[hot_pd_v1, hot_pd_v2] = spl[ idx_name][ idx_hot_product_code].split(',')
[cold_pd_v1, cold_pd_v2] = spl[ idx_name][ idx_cold_product_code].split(',')
[blend_pd_v1, blend_pd_v2] = spl[ idx_name][ idx_blend_product_code].split(',')
if spl[idx_desc][idx_lang_eng].startswith("BANNER"):
date_time_start = spl[idx_name][idx_date_time_start]
date_time_end = spl[idx_name][idx_date_time_end]
state_var = spl[idx_name][idx_product_var]
date_time_start = spl[idx_name][idx_date_time_start]
date_time_end = spl[idx_name][idx_date_time_end]
product_var = spl[idx_name][idx_product_var]
try:
default_topping = spl[idx_name][idx_of_default_toppimg]
except:
default_topping = "0"
print(f"spl[{idx_name}] =", spl[idx_name])
print(f"Expected indices: date_time_start:{date_time_start}, date_time_end:{date_time_end}, product_var:{product_var} , default_topping={default_topping}")
type = spl[idx_desc][idx_lang_thai]
eng_media = spl[idx_img][idx_lang_eng]
thai_media = spl[idx_img][idx_lang_thai]
on_click_script = spl[idx_name][idx_lang_thai]
for [hot_pd, cold_pd, blend_pd] in [[hot_pd_v1, cold_pd_v1, blend_pd_v1], [hot_pd_v2, cold_pd_v2, blend_pd_v2]]:
if hot_pd == '-' and cold_pd == '-' and blend_pd == '-':
continue
else:
print(f"Gen ==> hot={hot_pd}, cold={cold_pd}, blend={blend_pd}")
GenMenuV3(hot_pd, cold_pd, blend_pd, date_time_start, date_time_end, product_var, default_topping)
GenBanner(type, thai_media, eng_media, on_click_script, date_time_start, date_time_end, state_var)
else:
[hot_pd_v1, hot_pd_v2] = spl[ idx_name][ idx_hot_product_code].split(',')
[cold_pd_v1, cold_pd_v2] = spl[ idx_name][ idx_cold_product_code].split(',')
[blend_pd_v1, blend_pd_v2] = spl[ idx_name][ idx_blend_product_code].split(',')
date_time_start = spl[idx_name][idx_date_time_start]
date_time_end = spl[idx_name][idx_date_time_end]
product_var = spl[idx_name][idx_product_var]
try:
default_topping = spl[idx_name][idx_of_default_toppimg]
except:
default_topping = "0"
print(f"spl[{idx_name}] =", spl[idx_name])
print(f"Expected indices: date_time_start:{date_time_start}, date_time_end:{date_time_end}, product_var:{product_var} , default_topping={default_topping}")
for [hot_pd, cold_pd, blend_pd] in [[hot_pd_v1, cold_pd_v1, blend_pd_v1], [hot_pd_v2, cold_pd_v2, blend_pd_v2]]:
if hot_pd == '-' and cold_pd == '-' and blend_pd == '-':
continue
else:
print(f"Gen ==> hot={hot_pd}, cold={cold_pd}, blend={blend_pd}")
GenMenuV3(hot_pd, cold_pd, blend_pd, date_time_start, date_time_end, product_var, default_topping)
out_xml('\t\t</Menus>\n\n')
out_xml('</ScrollableCatalog>\n')

View file

@ -213,6 +213,7 @@
Else
Var DirImage = "ROOT/taobin_project/image/page_payment"
Var PlaySoundLag = "ROOT/taobin_project/sound_thai/payment.mp3"
Var PlaySoundCodeLang = "ROOT/sounds/Code8digit.m4a"
If SongkranSoundCampaign = 1 Then
Var PlaySoundLag = SelectPayMethodSound[SoundCampaignIndex]
@ -220,10 +221,8 @@
If CountryName = "HongKong" Then
Var PlaySoundLag = "ROOT/taobin_project/sound_eng/How_would_you_like_to_pay.mp3"
Var PlaySoundCodeLang = "ROOT/taobin_project/sound_eng/Code8digit.mp3"
EndIf
Var PlaySoundCodeLang = "ROOT/sounds/Code8digit.m4a"
EndIf

View file

@ -860,7 +860,7 @@
Var LOADING_STATE = "Enable"
Var alphaState = "Enable"
Var PopupCancelButtonState = "Enable"
Var RemainAmountX = PayAmount - Seeker.IntVendingCampaign
Var RemainAmountX = RemainAmount
CashlessPay RemainAmountX CreditCardRef
Var CashlessPayFlag = 1
EndIf

View file

@ -1137,7 +1137,6 @@
If EnablingCountDown = 0 Then
Var Timeout = 0
Var UserChoosePayment = "CreditCard"
Var QRErrorState = "Enable"
Var QR_POPUP = DirQR_popup + "/img_tap_card_5_sec.png"
Var VendingCashless = "-"

View file

@ -2010,7 +2010,7 @@
Var QRErrorState = "Invisible"
Var VendingCashless = "-"
Var ServiceCharge = 3
Var RemainAmountX = PayAmount - Seeker.IntVendingCampaign
Var RemainAmountX = RemainAmount
Var RemainAmountX = RemainAmountX + ServiceCharge
CashlessPay RemainAmountX CreditCardRef
Var CashlessPayFlag = 1
@ -2028,7 +2028,7 @@
Var QR_POPUP = "/img_popup8-2.png"
Var VendingCashless = "-"
Var LOADING_STATE = "Enable"
Var RemainAmountX = PayAmount - Seeker.IntVendingCampaign
Var RemainAmountX = RemainAmount
CashlessPay RemainAmountX CreditCardRef
Var CashlessPayFlag = 1
EndIf

View file

@ -87,229 +87,25 @@
count = 0
pd_code_available = '##-##-##-####'
def GenMenuV3(spl):
out_xml( '\t\t; ==================> Len = ' + str(len(spl)) + '\n')
menu_img = spl[7]
out_xml( '\t\t; '+ spl[4] + ' ' + spl[5] + ' ' + spl[6]+ ' \n')
str_con = ""
str_con_var = ""
if spl[4] != '-':
str_con += spl[4] + '.Button,'
if spl[5] != '-':
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 re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', spl[12].strip()):
str_con += f'DateTimeStart="{spl[12].strip()}",'
if re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', spl[13].strip()):
str_con += f'DateTimeEnd="{spl[13].strip()}",'
if re.match(r'^\w.*', spl[14].strip()):
str_con += f'Var={spl[14].strip()},'
if recommend_page:
str_con += "Disable=Invisible,"
str_con += "$Sum" + str_con_var
out_xml('\t\t<Menu>\n')
out_xml('\t\t<State> Flag( '+ str_con + ') </State>\n')
pd_code_1 = spl[4]
pd_stage1 = '$' + spl[4] + '.Button'
if spl[4] == "-" or len(spl[4]) == 0 :
pd_code_1 = pd_code_available
pd_stage1 = '"Disable2"'
pd_code_2 = spl[5]
pd_stage2 = '$' + spl[5] + '.Button'
if spl[5] == "-" or len(spl[5]) == 0:
pd_code_2 = pd_code_available
pd_stage2 = '"Disable2"'
pd_code_3 = spl[6]
pd_stage3 = '$' + spl[6] + '.Button'
if spl[6] == "-" or len(spl[6]) == 0:
pd_code_3 = pd_code_available
pd_stage3 = '"Disable2"'
if menu_img.startswith("#"):
out_xml( '\t\t<IdleImage> '+ menu_img[1:] + '_resting </IdleImage>\n')
out_xml( '\t\t<PressImage> '+ menu_img[1:] + '_press </PressImage>\n')
out_xml( '\t\t<DisableImage> '+ menu_img[1:] + '_disable </DisableImage>\n')
else:
out_xml( '\t\t<IdleImage> "' + new_default_dir + '/'+ menu_img +'" </IdleImage>\n')
out_xml( '\t\t<PressImage> "' + new_default_dir_press + '/'+ menu_img +'" </PressImage>\n')
out_xml( '\t\t<DisableImage> "' + new_default_dir_disable + '/'+ menu_img +'" </DisableImage>\n')
if spl[1] != "None":
out_xml('\t\t<Name>\n')
out_xml('\t\t\teval(\n')
out_xml('\t\t\t\tIf show_eng = "true" Then\n')
out_xml('\t\t\t\t\tVar return = "' + spl[1] + '"\n')
out_xml('\t\t\t\tElse\n')
out_xml('\t\t\t\t\tVar return = "' + spl[0] + '"\n')
out_xml('\t\t\t\tEndIf\n')
out_xml('\t\t\t)\n')
out_xml('\t\t</Name>\n')
out_xml('\t\t<Description>\n')
out_xml('\t\t\teval(\n')
out_xml('\t\t\t\tIf show_eng = "true" Then\n')
out_xml('\t\t\t\t\tVar return = "' + spl[3] + '"\n')
out_xml('\t\t\t\tElse\n')
out_xml('\t\t\t\t\tVar return = "' + spl[2] + '"\n')
out_xml('\t\t\t\tEndIf\n')
out_xml('\t\t\t)\n')
out_xml('\t\t</Description>\n')
out_xml('\t\t<HotState> ' + pd_stage1 + ' </HotState>\n')
out_xml('\t\t<IceState> ' + pd_stage2 + ' </IceState>\n')
out_xml('\t\t<BlendState> ' + pd_stage3 + ' </BlendState>\n')
out_xml('\t\t<HotPrice> StringFmt( $' + pd_code_1 + '.Price , DisplayFormat, PreScaleConvertShow) </HotPrice>\n')
out_xml('\t\t<IcePrice> StringFmt( $' + pd_code_2 + '.Price , DisplayFormat, PreScaleConvertShow) </IcePrice>\n')
out_xml('\t\t<BlendPrice> StringFmt( $' + pd_code_3 + '.Price , DisplayFormat, PreScaleConvertShow) </BlendPrice>\n')
out_xml('\t\t<IceProcessingState>\n')
out_xml('\t\t\teval(\n')
out_xml('\t\t\t\tIf ICE_PROCESS_STATUS = 2 Then\n')
out_xml('\t\t\t\t\tIf $Sum510201003951020200395102030039 = "Disable" Then\n')
out_xml('\t\t\t\t\t\tVar ice_tab_process_show = "Disable"\n')
out_xml('\t\t\t\t\tElse\n')
out_xml('\t\t\t\t\t\tVar ice_tab_process_show = "Enable"\n')
out_xml('\t\t\t\t\tEndIf\n')
out_xml('\t\t\t\tElse\n')
out_xml('\t\t\t\t\tVar ice_tab_process_show = "Invisible"\n')
out_xml('\t\t\t\tEndIf\n')
out_xml('\t\t\t\tVar return = ice_tab_process_show\n')
out_xml('\t\t\t)\n')
out_xml('\t\t</IceProcessingState>\n')
out_xml('\t\t<IceProcessingImage> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </IceProcessingImage>\n')
out_xml('\t\t<IceProcessingDisableImage> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </IceProcessingDisableImage>\n')
out_xml('\t\t<EventOnClick>\n')
if menu_img.startswith("#"):
out_xml( '\t\tVar PictureDrink = bn_oreo_vo_get1_full_path\r\n')
else:
out_xml( '\t\tVar PictureDrink = "' + new_default_dir2 + '" + \"' + menu_img + '\"\r\n')
out_xml('\t\t\tVar OpenFromXML = CurrentXMLFileName2\n')
out_xml('\t\t\tVar PriceD1 = $' + pd_code_1 + '.Price\n')
out_xml('\t\t\tVar PriceD2 = $' + pd_code_2 + '.Price\n')
out_xml('\t\t\tVar PriceD3 = $' + pd_code_3 + '.Price\n')
out_xml('\t\t\tVar PD_CODE1 = "' + pd_code_1 + '"\n')
out_xml('\t\t\tVar PD_CODE2 = "' + pd_code_2 + '"\n')
out_xml('\t\t\tVar PD_CODE3 = "' + pd_code_3 + '"\n')
out_xml('\t\t\tVar PD_STAGE_1 = ' + pd_stage1 + '\n')
out_xml('\t\t\tVar PD_STAGE_2 = ' + pd_stage2 + '\n')
out_xml('\t\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\n')
if len( spl) > 11:
if spl[4] != '-':
menu_xml_var = 'xmlpro( '+spl[4]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
elif spl[6] != '-':
menu_xml_var = 'xmlpro( '+spl[6]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
else:
menu_xml_var = 'xmlpro( '+spl[5]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
if len( menu_xml_var) > 0:
out_xml( '\t\t\tVar OverlayMenuFilter !assigned ' + menu_xml_var + '\n')
out_xml( '\t\t\tDEBUGVAR OverlayMenuFilter\n')
out_xml( '\t\t\tVar SelectCountDrinkType = 0\n')
out_xml( '\t\t\tVar DefaultDrinkType = 0\n')
out_xml( '\t\t\tIf PD_STAGE_1 = "Enable" Then\n')
out_xml( '\t\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\n')
out_xml( '\t\t\t\tVar DefaultDrinkType = 1\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tIf PD_STAGE_2 = "Enable" Then\n')
out_xml( '\t\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\n')
out_xml( '\t\t\t\tVar DefaultDrinkType = 2\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tIf PD_STAGE_3 = "Enable" Then\n')
out_xml( '\t\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\n')
out_xml( '\t\t\t\tVar DefaultDrinkType = 3\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tIf PD_STAGE_2 = "Enable" Then\n')
#out_xml( \t'\t\t\tVar PD_STAGE_2 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[5].replace("-alter", "") +'"\n')
out_xml( '\t\t\tElse\n')
out_xml( '\t\t\t\tIf PD_STAGE_1 = "Enable" Then\n')
#out_xml( \t'\t\t\t\tVar PD_STAGE_1 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[4].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tElse\n')
#out_xml( \t'\t\t\t\tVar PD_STAGE_3 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[6].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tEndIf\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tVar menu_name_eng_hot = $' + pd_code_1 + '.NameE\n')
out_xml( '\t\t\tVar menu_desc_eng_hot = $' + pd_code_1 + '.descriptionE\n')
out_xml( '\t\t\tVar menu_name_thai_hot = $' + pd_code_1 + '.Name\n')
out_xml( '\t\t\tVar menu_desc_thai_hot = $' + pd_code_1 + '.description\n')
out_xml( '\t\t\t\n')
out_xml( '\t\t\tVar menu_name_eng_cold = $' + pd_code_2 + '.NameE\n')
out_xml( '\t\t\tVar menu_desc_eng_cold = $' + pd_code_2 + '.descriptionE\n')
out_xml( '\t\t\tVar menu_name_thai_cold = $' + pd_code_2 + '.Name\n')
out_xml( '\t\t\tVar menu_desc_thai_cold = $' + pd_code_2 + '.description\n')
out_xml( '\t\t\t\n')
out_xml( '\t\t\tVar menu_name_eng_blender = $' + pd_code_3 + '.NameE\n')
out_xml( '\t\t\tVar menu_desc_eng_blender = $' + pd_code_3 + '.descriptionE\n')
out_xml( '\t\t\tVar menu_name_thai_blender = $' + pd_code_3 + '.Name\n')
out_xml( '\t\t\tVar menu_desc_thai_blender = $' + pd_code_3 + '.description\n')
out_xml( '\t\t\t\n')
out_xml( '\t\t\tDEBUGVAR PD_STAGE_1\n')
out_xml( '\t\t\tDEBUGVAR PD_STAGE_2\n')
out_xml( '\t\t\tDEBUGVAR PD_STAGE_3\n')
out_xml( '\t\t\tVar SelectDrinkType = 0\n')
out_xml( '\t\t\t'+ button_add_string +'\n')
out_xml( '\t\t\tOpen "ROOT/taobin_project/xml/page_topping_select5.xml"\n')
out_xml('\t\t</EventOnClick>\n')
out_xml('\t\t</Menu>\n\n')
if spl[8] != '-' or spl[9] != '-' or spl[10] != '-':
def GenMenuV3(spl):
out_xml( '\t\t; ==================> Len = ' + str(len(spl)) + '\n')
menu_img = spl[7]
out_xml( '\t\t; '+ spl[8] + ' ' + spl[9] + ' ' + spl[10]+ ' \n')
out_xml( '\t\t; '+ spl[4] + ' ' + spl[5] + ' ' + spl[6]+ ' \n')
str_con = ""
str_con_var = ""
if spl[8] != '-':
str_con += spl[8] + '.Button,'
if spl[9] != '-':
str_con += spl[9] + '.Button,'
if spl[10] != '-':
str_con += spl[10] + '.Button,'
if spl[4] != '-':
str_con += spl[4] + '.Button,'
if spl[5] != '-':
str_con += spl[5] + '.Button,'
if spl[6] != '-':
str_con += spl[6] + '.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] + '-'
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("-", "")
@ -329,21 +125,21 @@
out_xml('\t\t<Menu>\n')
out_xml('\t\t<State> Flag( '+ str_con + ') </State>\n')
pd_code_1 = spl[8]
pd_stage1 = '$' + spl[8] + '.Button'
if spl[8] == "-" or len(spl[8]) == 0 :
pd_code_1 = spl[4]
pd_stage1 = '$' + spl[4] + '.Button'
if spl[4] == "-" or len(spl[4]) == 0 :
pd_code_1 = pd_code_available
pd_stage1 = '"Disable2"'
pd_code_2 = spl[9]
pd_stage2 = '$' + spl[9] + '.Button'
if spl[9] == "-" or len(spl[9]) == 0:
pd_code_2 = spl[5]
pd_stage2 = '$' + spl[5] + '.Button'
if spl[5] == "-" or len(spl[5]) == 0:
pd_code_2 = pd_code_available
pd_stage2 = '"Disable2"'
pd_code_3 = spl[10]
pd_stage3 = '$' + spl[10] + '.Button'
if spl[10] == "-" or len(spl[10]) == 0:
pd_code_3 = spl[6]
pd_stage3 = '$' + spl[6] + '.Button'
if spl[6] == "-" or len(spl[6]) == 0:
pd_code_3 = pd_code_available
pd_stage3 = '"Disable2"'
@ -415,12 +211,12 @@
out_xml('\t\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\n')
if len( spl) > 11:
if spl[8] != '-':
menu_xml_var = 'xmlpro( '+spl[8]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
elif spl[9] != '-':
menu_xml_var = 'xmlpro( '+spl[9]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
if spl[4] != '-':
menu_xml_var = 'xmlpro( '+spl[4]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
elif spl[6] != '-':
menu_xml_var = 'xmlpro( '+spl[6]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
else:
menu_xml_var = 'xmlpro( '+spl[10]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
menu_xml_var = 'xmlpro( '+spl[5]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
if len( menu_xml_var) > 0:
@ -454,14 +250,14 @@
out_xml( '\t\t\tIf PD_STAGE_2 = "Enable" Then\n')
#out_xml( \t'\t\t\tVar PD_STAGE_2 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[10].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[5].replace("-alter", "") +'"\n')
out_xml( '\t\t\tElse\n')
out_xml( '\t\t\t\tIf PD_STAGE_1 = "Enable" Then\n')
#out_xml( \t'\t\t\t\tVar PD_STAGE_1 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[8].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[4].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tElse\n')
#out_xml( \t'\t\t\t\tVar PD_STAGE_3 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[9].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[6].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tEndIf\n')
out_xml( '\t\t\tEndIf\n')
@ -496,19 +292,254 @@
out_xml('\t\t</EventOnClick>\n')
out_xml('\t\t</Menu>\n\n')
def GenListMenu():
for spl in menu_new_list:
#product_code = s
if spl[0] == "IGNORE":
continue
if spl[8] != '-' or spl[9] != '-' or spl[10] != '-':
menu_img = spl[7]
out_xml( '\t\t; '+ spl[8] + ' ' + spl[9] + ' ' + spl[10]+ ' \n')
str_con = ""
str_con_var = ""
if spl[8] != '-':
str_con += spl[8] + '.Button,'
if spl[9] != '-':
str_con += spl[9] + '.Button,'
if spl[10] != '-':
str_con += spl[10] + '.Button,'
if spl[0].startswith("TAG"):
out_xml( '\t;' + spl[0] + '\r\n')
continue
if spl[8] != '-':
str_con_var += spl[8] + '-'
if spl[9] != '-':
str_con_var += spl[9] + '-'
if spl[10] != '-':
str_con_var += spl[10] + '-'
GenMenuV3(spl)
str_con_var = str_con_var.replace("-", "")
out_xml('\t\t; menu_new_list '+ str(len(menu_new_list))+'\n')
GenListMenu()
if re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', spl[12].strip()):
str_con += f'DateTimeStart="{spl[12].strip()}",'
if re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', spl[13].strip()):
str_con += f'DateTimeEnd="{spl[13].strip()}",'
out_xml('</ScrollableCatalog>\n')
if re.match(r'^\w.*', spl[14].strip()):
str_con += f'Var={spl[14].strip()},'
if recommend_page:
str_con += "Disable=Invisible,"
str_con += "$Sum" + str_con_var
out_xml('\t\t<Menu>\n')
out_xml('\t\t<State> Flag( '+ str_con + ') </State>\n')
pd_code_1 = spl[8]
pd_stage1 = '$' + spl[8] + '.Button'
if spl[8] == "-" or len(spl[8]) == 0 :
pd_code_1 = pd_code_available
pd_stage1 = '"Disable2"'
pd_code_2 = spl[9]
pd_stage2 = '$' + spl[9] + '.Button'
if spl[9] == "-" or len(spl[9]) == 0:
pd_code_2 = pd_code_available
pd_stage2 = '"Disable2"'
pd_code_3 = spl[10]
pd_stage3 = '$' + spl[10] + '.Button'
if spl[10] == "-" or len(spl[10]) == 0:
pd_code_3 = pd_code_available
pd_stage3 = '"Disable2"'
if menu_img.startswith("#"):
out_xml( '\t\t<IdleImage> '+ menu_img[1:] + '_resting </IdleImage>\n')
out_xml( '\t\t<PressImage> '+ menu_img[1:] + '_press </PressImage>\n')
out_xml( '\t\t<DisableImage> '+ menu_img[1:] + '_disable </DisableImage>\n')
else:
out_xml( '\t\t<IdleImage> "' + new_default_dir + '/'+ menu_img +'" </IdleImage>\n')
out_xml( '\t\t<PressImage> "' + new_default_dir_press + '/'+ menu_img +'" </PressImage>\n')
out_xml( '\t\t<DisableImage> "' + new_default_dir_disable + '/'+ menu_img +'" </DisableImage>\n')
if spl[1] != "None":
out_xml('\t\t<Name>\n')
out_xml('\t\t\teval(\n')
out_xml('\t\t\t\tIf show_eng = "true" Then\n')
out_xml('\t\t\t\t\tVar return = "' + spl[1] + '"\n')
out_xml('\t\t\t\tElse\n')
out_xml('\t\t\t\t\tVar return = "' + spl[0] + '"\n')
out_xml('\t\t\t\tEndIf\n')
out_xml('\t\t\t)\n')
out_xml('\t\t</Name>\n')
out_xml('\t\t<Description>\n')
out_xml('\t\t\teval(\n')
out_xml('\t\t\t\tIf show_eng = "true" Then\n')
out_xml('\t\t\t\t\tVar return = "' + spl[3] + '"\n')
out_xml('\t\t\t\tElse\n')
out_xml('\t\t\t\t\tVar return = "' + spl[2] + '"\n')
out_xml('\t\t\t\tEndIf\n')
out_xml('\t\t\t)\n')
out_xml('\t\t</Description>\n')
out_xml('\t\t<HotState> ' + pd_stage1 + ' </HotState>\n')
out_xml('\t\t<IceState> ' + pd_stage2 + ' </IceState>\n')
out_xml('\t\t<BlendState> ' + pd_stage3 + ' </BlendState>\n')
out_xml('\t\t<HotPrice> StringFmt( $' + pd_code_1 + '.Price , DisplayFormat, PreScaleConvertShow) </HotPrice>\n')
out_xml('\t\t<IcePrice> StringFmt( $' + pd_code_2 + '.Price , DisplayFormat, PreScaleConvertShow) </IcePrice>\n')
out_xml('\t\t<BlendPrice> StringFmt( $' + pd_code_3 + '.Price , DisplayFormat, PreScaleConvertShow) </BlendPrice>\n')
out_xml('\t\t<IceProcessingState>\n')
out_xml('\t\t\teval(\n')
out_xml('\t\t\t\tIf ICE_PROCESS_STATUS = 2 Then\n')
out_xml('\t\t\t\t\tIf $Sum510201003951020200395102030039 = "Disable" Then\n')
out_xml('\t\t\t\t\t\tVar ice_tab_process_show = "Disable"\n')
out_xml('\t\t\t\t\tElse\n')
out_xml('\t\t\t\t\t\tVar ice_tab_process_show = "Enable"\n')
out_xml('\t\t\t\t\tEndIf\n')
out_xml('\t\t\t\tElse\n')
out_xml('\t\t\t\t\tVar ice_tab_process_show = "Invisible"\n')
out_xml('\t\t\t\tEndIf\n')
out_xml('\t\t\t\tVar return = ice_tab_process_show\n')
out_xml('\t\t\t)\n')
out_xml('\t\t</IceProcessingState>\n')
out_xml('\t\t<IceProcessingImage> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" </IceProcessingImage>\n')
out_xml('\t\t<IceProcessingDisableImage> "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" </IceProcessingDisableImage>\n')
out_xml('\t\t<EventOnClick>\n')
if menu_img.startswith("#"):
out_xml( '\t\tVar PictureDrink = bn_oreo_vo_get1_full_path\r\n')
else:
out_xml( '\t\tVar PictureDrink = "' + new_default_dir2 + '" + \"' + menu_img + '\"\r\n')
out_xml('\t\t\tVar OpenFromXML = CurrentXMLFileName2\n')
out_xml('\t\t\tVar PriceD1 = $' + pd_code_1 + '.Price\n')
out_xml('\t\t\tVar PriceD2 = $' + pd_code_2 + '.Price\n')
out_xml('\t\t\tVar PriceD3 = $' + pd_code_3 + '.Price\n')
out_xml('\t\t\tVar PD_CODE1 = "' + pd_code_1 + '"\n')
out_xml('\t\t\tVar PD_CODE2 = "' + pd_code_2 + '"\n')
out_xml('\t\t\tVar PD_CODE3 = "' + pd_code_3 + '"\n')
out_xml('\t\t\tVar PD_STAGE_1 = ' + pd_stage1 + '\n')
out_xml('\t\t\tVar PD_STAGE_2 = ' + pd_stage2 + '\n')
out_xml('\t\t\tVar PD_STAGE_3 = ' + pd_stage3 + '\n')
if len( spl) > 11:
if spl[8] != '-':
menu_xml_var = 'xmlpro( '+spl[8]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
elif spl[9] != '-':
menu_xml_var = 'xmlpro( '+spl[9]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
else:
menu_xml_var = 'xmlpro( '+spl[10]+', "ROOT/taobin_project/image/menu_overlay_set/button_overlay_pic_%s_'+ spl[11] +'.png")'
if len( menu_xml_var) > 0:
out_xml( '\t\t\tVar OverlayMenuFilter !assigned ' + menu_xml_var + '\n')
out_xml( '\t\t\tDEBUGVAR OverlayMenuFilter\n')
out_xml( '\t\t\tVar SelectCountDrinkType = 0\n')
out_xml( '\t\t\tVar DefaultDrinkType = 0\n')
out_xml( '\t\t\tIf PD_STAGE_1 = "Enable" Then\n')
out_xml( '\t\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\n')
out_xml( '\t\t\t\tVar DefaultDrinkType = 1\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tIf PD_STAGE_2 = "Enable" Then\n')
out_xml( '\t\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\n')
out_xml( '\t\t\t\tVar DefaultDrinkType = 2\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tIf PD_STAGE_3 = "Enable" Then\n')
out_xml( '\t\t\t\tVar SelectCountDrinkType = SelectCountDrinkType + 1\n')
out_xml( '\t\t\t\tVar DefaultDrinkType = 3\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tIf PD_STAGE_2 = "Enable" Then\n')
#out_xml( \t'\t\t\tVar PD_STAGE_2 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[10].replace("-alter", "") +'"\n')
out_xml( '\t\t\tElse\n')
out_xml( '\t\t\t\tIf PD_STAGE_1 = "Enable" Then\n')
#out_xml( \t'\t\t\t\tVar PD_STAGE_1 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[8].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tElse\n')
#out_xml( \t'\t\t\t\tVar PD_STAGE_3 = "Enable"\n')
out_xml( '\t\t\t\tTopping "Load" "'+ spl[9].replace("-alter", "") +'"\n')
out_xml( '\t\t\t\tEndIf\n')
out_xml( '\t\t\tEndIf\n')
out_xml( '\t\t\tVar menu_name_eng_hot = $' + pd_code_1 + '.NameE\n')
out_xml( '\t\t\tVar menu_desc_eng_hot = $' + pd_code_1 + '.descriptionE\n')
out_xml( '\t\t\tVar menu_name_thai_hot = $' + pd_code_1 + '.Name\n')
out_xml( '\t\t\tVar menu_desc_thai_hot = $' + pd_code_1 + '.description\n')
out_xml( '\t\t\t\n')
out_xml( '\t\t\tVar menu_name_eng_cold = $' + pd_code_2 + '.NameE\n')
out_xml( '\t\t\tVar menu_desc_eng_cold = $' + pd_code_2 + '.descriptionE\n')
out_xml( '\t\t\tVar menu_name_thai_cold = $' + pd_code_2 + '.Name\n')
out_xml( '\t\t\tVar menu_desc_thai_cold = $' + pd_code_2 + '.description\n')
out_xml( '\t\t\t\n')
out_xml( '\t\t\tVar menu_name_eng_blender = $' + pd_code_3 + '.NameE\n')
out_xml( '\t\t\tVar menu_desc_eng_blender = $' + pd_code_3 + '.descriptionE\n')
out_xml( '\t\t\tVar menu_name_thai_blender = $' + pd_code_3 + '.Name\n')
out_xml( '\t\t\tVar menu_desc_thai_blender = $' + pd_code_3 + '.description\n')
out_xml( '\t\t\t\n')
out_xml( '\t\t\tDEBUGVAR PD_STAGE_1\n')
out_xml( '\t\t\tDEBUGVAR PD_STAGE_2\n')
out_xml( '\t\t\tDEBUGVAR PD_STAGE_3\n')
out_xml( '\t\t\tVar SelectDrinkType = 0\n')
out_xml( '\t\t\t'+ button_add_string +'\n')
out_xml( '\t\t\tOpen "ROOT/taobin_project/xml/page_topping_select5.xml"\n')
out_xml('\t\t</EventOnClick>\n')
out_xml('\t\t</Menu>\n\n')
def GenBanner(spl):
if re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', spl[12].strip()):
str_con += f'DateTimeStart="{spl[12].strip()}",'
if re.match(r'(\d{4})/(\d{2})/(\d{2})T(\d{2}):(\d{2}):(\d{2})', spl[13].strip()):
str_con += f'DateTimeEnd="{spl[13].strip()}",'
if re.match(r'^\w.*', spl[14].strip()):
str_con += f'Var={spl[14].strip()},'
out_xml('\t\t<Banner>\n')
out_xml('\t\t\t<State> Flag( '+ str_con + ') </State>\n')
out_xml('\t\t\t<Type> ' + spl[4] + '</Type>\n')
out_xml('\t\t\t<Media>\n')
out_xml('\t\t\t\teval(\n')
out_xml('\t\t\t\t\tIf show_eng = "true" Then')
out_xml('\t\t\t\t\t\tVar return = ' + spl[5] + '\n')
out_xml('\t\t\t\t\tElse\n')
out_xml('\t\t\t\t\t\tVar return = ' + spl[6] + '\n')
out_xml('\t\t\t\t\tEndIf\n')
out_xml('\t\t\t\t)\n')
out_xml('\t\t\t</Media>\n')
out_xml('\t\t\t<EventOnClick>\n')
out_xml('\t\t\t\t' + spl[7] + '\n')
out_xml('\t\t\t</EventOnClick>\n')
out_xml('\t\t</Banner>\n')
def GenListMenu():
for spl in menu_new_list:
#product_code = s
if spl[0] == "IGNORE":
continue
if spl[0].startswith("TAG"):
out_xml( '\t;' + spl[0] + '\r\n')
continue
if spl[0].startswith("BANNER"):
GenBanner(spl)
else:
GenMenuV3(spl)
out_xml('\t\t; menu_new_list '+ str(len(menu_new_list))+'\n')
GenListMenu()
out_xml('\t</Menus>\n')
out_xml('</ScrollableCatalog>\n')

View file

@ -25,9 +25,8 @@
Var info_13Y = 1090
Var info_14Y = 1160
Var info_15Y = 1230
Var info_cancel_y = info_15Y + 50
Var info_cancel_y = info_14Y + 50
Var info_text_startX = info_startX + 22
@ -47,7 +46,6 @@
Var info_text_13Y = info_13Y + 18
Var info_text_14Y = info_14Y + 18
Var info_text_15Y = info_15Y + 18
Var info2_startX = 550
@ -175,7 +173,7 @@
DEBUGVAR TestArrary[2]
DEBUGVAR TestArrary[3]
DEBUGVAR SmoothieMode
</EventOpen>
@ -286,7 +284,7 @@
Var GPRSStr = ""
Var GPRSStr = GPRSStr + GPRSStatus
Var GPRSStr = GPRSStr + ", "
Var GPRSStr = GPRSStr + ", \n"
Var GPRSStr = GPRSStr + GPRSState
@ -988,9 +986,13 @@
</Image>
<Text>
<X> info1_text_startX </X>
<Y> info_text_13Y </Y>
<Size> 30 </Size>
<X> eval(
Var return = info1_text_startX + 10
) </X>
<Y> eval(
Var return = info_text_13Y - 10
) </Y>
<Size> 24 </Size>
<Font> fontType1 </Font>
<Color> 0x000000 </Color>
<Value> GPRSStr </Value>
@ -998,32 +1000,6 @@
<Image>
<X> info1_startX </X>
<Y> info_14Y </Y>
<State> SmoothieMode</State>
<Filename> "ROOT/taobin_project/image/tab_1.png" </Filename>
<EventClick>
;include="ROOT/taobin_project/xml/open_file_instance0_to_instance2.inc"
OpenInst 2 "ROOT/taobin_project/inter/tha/xml/page_smoothie_suggest_and_process.xml"
</EventClick>
</Image>
<Text>
<X> info1_text_startX </X>
<Y> info_text_14Y </Y>
<Size> 30 </Size>
<State> SmoothieMode</State>
<Font> fontType1 </Font>
<Color> 0x000000 </Color>
<Value> " Smoothie menu." </Value>
</Text>
<Button>
<X> 431 </X>
<Y> info_cancel_y </Y>