diff --git a/image/event/bn_mystery_cup.png b/image/event/bn_mystery_cup.png new file mode 100644 index 00000000..102da254 Binary files /dev/null and b/image/event/bn_mystery_cup.png differ diff --git a/image/event/bn_random_all.png b/image/event/bn_random_all.png new file mode 100644 index 00000000..ffdf6ca5 Binary files /dev/null and b/image/event/bn_random_all.png differ diff --git a/image/event/bn_random_coffee.png b/image/event/bn_random_coffee.png new file mode 100644 index 00000000..2c705915 Binary files /dev/null and b/image/event/bn_random_coffee.png differ diff --git a/image/event/bn_random_milk.png b/image/event/bn_random_milk.png new file mode 100644 index 00000000..0b71c930 Binary files /dev/null and b/image/event/bn_random_milk.png differ diff --git a/image/event/bn_random_tea.png b/image/event/bn_random_tea.png new file mode 100644 index 00000000..ad871af1 Binary files /dev/null and b/image/event/bn_random_tea.png differ diff --git a/image/event/pro_mystery_cup_en.png b/image/event/pro_mystery_cup_en.png new file mode 100644 index 00000000..58ce0b0a Binary files /dev/null and b/image/event/pro_mystery_cup_en.png differ diff --git a/image/event/pro_mystery_cup_th.png b/image/event/pro_mystery_cup_th.png new file mode 100644 index 00000000..344f3c20 Binary files /dev/null and b/image/event/pro_mystery_cup_th.png differ diff --git a/image/topping2_en/bg_top_milk.png b/image/topping2_en/bg_top_milk.png new file mode 100644 index 00000000..51b1053b Binary files /dev/null and b/image/topping2_en/bg_top_milk.png differ diff --git a/image/topping2_en/topping2/bg_top_milk.png b/image/topping2_en/topping2/bg_top_milk.png deleted file mode 100644 index 4fbd7ce3..00000000 Binary files a/image/topping2_en/topping2/bg_top_milk.png and /dev/null differ diff --git a/xml/event/promotion_pepsi.xml b/xml/event/promotion_pepsi.xml index 0d5f2efe..47901f17 100644 --- a/xml/event/promotion_pepsi.xml +++ b/xml/event/promotion_pepsi.xml @@ -8935,6 +8935,8 @@ LIMENADE SODA" + + 16 + 164 + 24 + 220 + "multi2" + KanitMediumTTF + 0x322B26 + showthaiText + "นมชมพูปั่น +โอริโอ้ภูเขาไฟ" + + + 16 + 220 + 14 + 220 + KanitMediumTTF + 0x6F5F51 + showthaiText + "น้ำแดงกลิ่นสละ นม น้ำตาล + Oreo" + + + 16 + 164 + 22 + 220 + "multi2" + KanitMediumTTF + 0x322B26 + showengText + "PINK MILK +OREO VOLCANO" + + + 16 + 220 + 14 + 220 + KanitMediumTTF + 0x6F5F51 + showengText + "Salak Syrup, Milk, +Sugar Oreo" + + + 16 + 264 + Var( DirImage2 + "option_deactive.png" ) + + + 16 + 264 + "Invisible" + Var( DirImage2 + "hot.png" ) + Var( DirImage2 + "hot_db.png" ) + + + 50 + TextPriceMenuY + TextPriceMenuSize + 220 + KanitMediumTTF + 0x6F5F51 + 0xEAE6E1 + "Invisible" + StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) ; test + + + 81 + 264 + Var( DirImage2 + "cold.png" ) + Var( DirImage2 + "cold_db.png" ) + "Invisible" + + + 115 + TextPriceMenuY + TextPriceMenuSize + 220 + KanitMediumTTF + 0x6F5F51 + 0xEAE6E1 + "Invisible" + StringFmt( $-.Price , DisplayFormat, PreScaleConvertShow) ; test + + + 146 + 264 + Var( DirImage2 + "blend.png" ) + Var( DirImage2 + "blend_db.png" ) + $12-03-03-0026.Button + + + 180 + TextPriceMenuY + TextPriceMenuSize + 220 + KanitRegularTTF + 0x6F5F51 + 0xEAE6E1 + $12-03-03-0026.Button + StringFmt( $12-03-03-0026.Price , DisplayFormat, PreScaleConvertShow) ; test + + + 81 + 264 + + 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 + ) + + "ROOT/taobin_project/image/drink_option/ice_tab_unavalible.png" + "ROOT/taobin_project/image/drink_option/ice_tab_unavalible_dis.png" + + + 49 + 117 + + eval( + If $Sum1203030026 = "Disable" Then + STRCONTAIN "ERR" $##-##-##-####.TAG tag1_is_disable + STRCONTAIN "ERR" $##-##-##-####.TAG tag2_is_disable + STRCONTAIN "ERR" $12-03-03-0026.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 + ) + + "ROOT/taobin_project/image//img_menu_err2.png" + + + 84 + 266 + 10 + OpunMediumTTF + 0xDE794E + ice_tab_process_show + ice_show_open + + + 48 + 116 + 32 + 128 + 64 + MITRegularTTF + 0x5A5A5A + "disable-show" + $Sum1203030026 + text_unavailable + center-vertical-horizontal + ; - - - diff --git a/xml/page_topping_select6.xml b/xml/page_topping_select6.xml index ce4d5e5e..c80f61df 100644 --- a/xml/page_topping_select6.xml +++ b/xml/page_topping_select6.xml @@ -299,6 +299,8 @@ Var img_smth_dis2 = "/bt_smoothie_disable2_no.png" + Var CerealMilkEnable = "Enable" + Var topping_price_refresh = 1 Var StrawState = "Enable" @@ -344,12 +346,18 @@ EndIf EndIf + If show_eng = "true" Then + Var CerealMilkX = 400 + Else + Var CerealMilkX = 270 + EndIf + 1000 DEBUGVAR Timeout - + Var Timeout = Timeout + 1 If Timeout > 40 Then @@ -528,6 +536,12 @@ EndIf EndIf + If show_eng = "true" Then + Var CerealMilkX = 400 + Else + Var CerealMilkX = 270 + EndIf + Function 2 @@ -1266,7 +1280,7 @@ DEBUGVAR TOPPING2 Refresh EndIf - If TOPPING2 = "shot coffee 1007" Then + If TOPPING2 = "shot coffee 1007" Then Var ShotCoffeePremium = "Enable" Var showShotEnable = "Invisible" @@ -1382,7 +1396,7 @@ EndIf - ;-END + ;-END If TOPPING3 = "Collagen" Then Var CollagenState = "Enable" Else @@ -1395,6 +1409,9 @@ If MenuCodeName1 = "Cereal-Milk" Then Var CerealMilkToppingEnable = "Enable" + Var CerealMilkPrice = SubMenuPrice1 + Var ExtraTopping = "Enable" + EndIf @@ -2938,19 +2955,38 @@ - topping_shot_price_x + CerealMilkX 2 KanitRegularTTF - "ShotCoffeePremium" + CerealMilkEnable 36 0x84776F - text_price_topping + CerealMilkPrice ; ; ; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; + 986 "auto" @@ -4029,7 +4065,20 @@ Machine PreparCup EndIf + Var CerealMilkAddAmount = SubMenuPrice1 - PriceDrinkNoTop + + If CerealMilkAddAmount = 0 Then + Var CerealMilkPrice = "(+฿10)" + Else + Var CerealMilkPrice = "(+฿" + CerealMilkAddAmount + Var CerealMilkPrice = CerealMilkPrice + ")" + EndIf + + DEBUGVAR CerealMilkAddAmount + + + DEBUGVAR PriceDrinkNoTop DEBUGVAR PriceDiff DEBUGVAR showShotEnable @@ -4108,6 +4157,13 @@ Var DisableUsingCode = "false" EndIf + + If CerealMilkEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + CerealMilkAddAmount + Var DisableUsingCode = "true" + Else + + EndIf DEBUGVAR SelectDrinkType diff --git a/xml/page_topping_select_35.xml b/xml/page_topping_select_35.xml new file mode 100644 index 00000000..c80f61df --- /dev/null +++ b/xml/page_topping_select_35.xml @@ -0,0 +1,4641 @@ + + "Enable" + 1080 + 1920 +; "0xeae6e1" + SoundVolume + + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" + + Var UserSeletedSugar = 0 + + SAVELOG "Event Open Select 6" + + If NoWaitMachineEnable = 1 Then + Var ConfirmDrinkButtonState = "Enable" + Else + + Var ConfirmDrinkButtonState = "Invisible" + EndIf + + Var y_topping_bg = 912 + + Var CHECK_EventOpen_Double = CHECK_EventOpen_Double + 1 + If CHECK_EventOpen_Double > 1 Then + WRITE_FILE "/mnt/sdcard/xml_alert_bug" "double called" + EndIf + + WEB "DISABLE" + DEBUGVAR Seeker + + Var BGSugarNew = "Invisible" + + DEBUGVAR video_menu_0 + + DEBUGVAR SelectDrink + DEBUGVAR PictureDrink + + Var ChildrenFree = 0 + + Var SaveProductCodeSelect = "-" + Var UserSelectProductCode = "-" + + Var showText4 = "Invisible" + Var showText7 = "Invisible" + + DEBUGVAR UserSelectProductCode + + Var blendedState = "Enable" + Var DisableUsingCode = "false" + Var ShowLidStraw = "Invisible" + Var ShowLidOnly = "Invisible" + Var ShowCollagenOnly = "Invisible" + + Var blendedStateShow = "Invisible" + Var ShotCoffeeBG = "Invisible" + Var showShotEnable = "Invisible" + Var ShowLidStraw = "Invisible" + Var ShowStrawOnly = "Invisible" + Var ShowLidOnly = "Invisible" + + ; On open + Var lidAndStrawOldPageIgnore = "true" + Var SugarState1 = "Invisible" + Var SugarState2 = "Invisible" + Var SugarState3 = "Invisible" + Var SugarState4 = "Invisible" + Var SugarState5 = "Invisible" + Var SugarState6 = "Invisible" + + Var AddShotEnable = "Invisible" + + Var BGSugar = "Invisible" + Var ShotCoffeeBG = "Invisible" + + Var showShotEnable = "Invisible" + Var ShotCoffeePremium = "Invisible" + Var showOreoAddEnable = "Invisible" + + Var BGSugarHotHealthy = "Invisible" + Var BGSugarColdHealthy = "Invisible" + + Var showText8 = "Invisible" + + ;Var showShotEnable = "Enable" + ;Var ShotCoffeePremium = "Enable" + ;Var showOreoAddEnable = "Enable" + + Var CerealMilkToppingEnable = "Invisible" + + Var ExtraTopping = "Invisible" + + ; On open + Var LidState = Lid1Status + + ;SAVELOG PreviseXMLFileName2 + + + Var topping1 = "1" + Var topping2 = "31" + Var topping3 = "31" + + + Var BugFlag = 0 + + If show_eng = "true" Then + + Var DirImage = "ROOT/taobin_project/image/topping2_en" + Var show_btp = "ROOT/taobin_project/image/bn_thai_lang_press.png" + Var show_btn = "ROOT/taobin_project/image/bn_thai_lang.png" + Var showname = NameDrink + Var showdesc = DrinkDescription + + Var text_show_thai = "Invisible" + Var text_show_eng = "Enable" + + Var topping_shot_price_x = 630 + Var text_x_add_oreo_price = 430 + Var text_show_normal_x = 408 + Var text_x_free_adjust = 100 + If PromotionOreoToppingFreeEnable = 0 Then + Var text_x_free_adjust = text_x_free_adjust + 5 + EndIf + Else + + Var DirImage = "ROOT/taobin_project/image/topping2" + Var show_btp = "ROOT/taobin_project/image/bn_eng_lang_press.png" + Var show_btn = "ROOT/taobin_project/image/bn_eng_lang.png" + Var showname = NameDrinkTH + Var showdesc = DrinkDescriptionTH + + Var text_show_thai = "Enable" + Var text_show_eng = "Invisible" + + Var topping_shot_price_x = 600 + Var text_x_add_oreo_price = 420 + Var text_show_normal_x = 386 + Var text_x_free_adjust = 70 + If PromotionOreoToppingFreeEnable = 0 Then + Var text_x_free_adjust = text_x_free_adjust + 30 + EndIf + + EndIf + + Var text_x_free_topping = text_x_add_oreo_price + text_x_free_adjust + + Var bg_strawlid = DirImage + "/bg_strawlid.png" + Var bg_straw_only = DirImage + "/bg_straw_only.png" + Var bg_lid_only = DirImage + "/bg_lid_only.png" + + + + Var backGroundAddExtra = DirImage + "/bg_add_shot_coffee_only.png" + Var backGroundAddExtra2 = DirImage + "/bg_add_shot_coffee_only.png" + + Var backGroundAddShotPremium = DirImage + "/bg_add_shot_coffee2_only.png" + Var backGroundAddShotPremiumWith = DirImage + "/bg_add_shot_coffee_only.png" + + + + ;Var blendedState = "Enable" + ;Var ShotCoffeeBG = "Enable" + ;Var showShotEnable = "Enable" + ;Var ShowLidStraw = "Enable" + ;Var ShowStrawOnly = "Enable" + ;Var ShowLidOnly = "Enable" + + Var ShiftSugarStep = 1 + + + CRLFToSpace showname + CRLFToSpace showdesc + + ;- Begin + Var PriceDrinkNoTop = PriceDrink + Var PriceDrinkTmp = PriceDrink + Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp + Var Timeout = 0 + + ;SAVELOG PriceDrinkTmp + ;- End + + If RoadShow = "true" Then + Var PriceDrinkTmp = "Free" + Var SaveSelectDrinkRoadShow = SelectDrink + EndIf + + DEBUGVAR SaveSelectDrinkRoadShow + + If ShowPrice = "Invisible" Then + Var PriceDrinkTmpShow = "Free" + EndIf + + Var StateImgKeto = "Invisible" + + + Var ToppingGotoPayment = "true" + + DEBUGVAR backGroundAddExtra + DEBUGVAR backGroundAddShotPremium + + DEBUGVAR MultiPayEnable + DEBUGVAR CART_COUNT + Var btnAddCart = "Invisible" + If MultiPayEnable = "true" Then + Var btnAddCart = "Enable" + If CART_COUNT = 3 Then + Var btnAddCart = "Invisible" + EndIf + EndIf + + Var LidDeactiveButton = "Invisible" + Var StrawDeactiveButton = "Invisible" + + Machine DoorClose + Machine DoorLidClose + + Var ButtonNext = "false" + + Var NEW_MULTI = "Invisible" + + Var high_light_drink_type = "Invisible" + + Var text_hot_color = "0x84776F" + Var text_cold_color = "0x84776F" + Var text_blender_color = "0x84776F" + + If new_layout = "true" Then + Var PriceDrinkTmpShow = "---" + + Var show_select_type = "Enable" + + Var hot_button_state = PD_STAGE_1 + Var cold_button_state = PD_STAGE_2 + Var blend_button_state = PD_STAGE_3 + + ; Protect have product-code but menu disable or invalid. + If hot_button_state = "Invisible" Then + + Var hot_button_state = "Disable2" + EndIf + If cold_button_state = "Invisible" Then + + Var cold_button_state = "Disable2" + EndIf + If blend_button_state = "Invisible" Then + + Var blend_button_state = "Disable2" + EndIf + + + Function 2 + + Else + Var show_select_type = "Invisible" + + ; assume auto select + Var SelectDrinkType = 1 + EndIf + + DEBUGVAR show_select_type + DEBUGVAR PriceD1 + DEBUGVAR PriceD2 + DEBUGVAR PriceD3 + + If hot_button_state = "Disable2" Then + Var text_price_d1 = "" + Else + Var text_price_d1 !assigned StringFmt( PriceD1 , DisplayFormat, PreScaleConvertShow) + EndIf + + If cold_button_state = "Disable2" Then + Var text_price_d2 = "" + Else + Var text_price_d2 !assigned StringFmt( PriceD2 , DisplayFormat, PreScaleConvertShow) + EndIf + + If blend_button_state = "Disable2" Then + Var text_price_d3 = "" + Else + Var text_price_d3 !assigned StringFmt( PriceD3 , DisplayFormat, PreScaleConvertShow) + EndIf + + DEBUGVAR PD_CODE1 + DEBUGVAR PD_CODE2 + DEBUGVAR PD_CODE3 + DEBUGVAR PD_STAGE_1 + DEBUGVAR PD_STAGE_2 + DEBUGVAR PD_STAGE_3 + + Var img_cold = "/bt_cold_no.png" + Var img_cold_sel = "/bt_cold_selected_no.png" + Var img_cold_dis = "/bt_cold_disable_no.png" + Var img_cold_dis2 = "/bt_cold_disable2_no.png" + + + Var img_smth = "/bt_smoothie_no.png" + Var img_smth_sel = "/bt_smoothie_selected_no.png" + Var img_smth_dis = "/bt_smoothie_disable_no.png" + Var img_smth_dis2 = "/bt_smoothie_disable2_no.png" + + + Var CerealMilkEnable = "Enable" + + Var topping_price_refresh = 1 + + Var StrawState = "Enable" + Var LidState = "Enable" + Var MAT_ID_9701 = StrawState + + Var SubMenuGroupIDSlot6_1 = 0 + + + Var bg_lidProblem_ST = "Invisible" + Var GetLidButtonState = "Invisible" + + Var PromotionIDCurrentOrder = 0 + + DEBUGVAR PromotionIDCurrentOrder + + + Var DiscountWithIdentifyState = "Invisible" + Var BackToSchoolForFreeButtonState = "Invisible" + + + DEBUGVAR Price5Active + DEBUGVAR EnableLiveness + DEBUGVAR DiscountWithIdentifyState + DEBUGVAR BackToSchoolForFreeEnable + + If BackToSchoolForFreeEnable = 1 Then + Var BackToSchoolForFreeEnable = 0 + Var BackToSchoolForFreeButtonState = "Enable" + EndIf + + DEBUGVAR BackToSchoolForFreeButtonState + + If EnableLiveness = "true" Then + If CameraCount = 1 Then + ; echo -n true > /mnt/sdcard/enable_discount_price5 + READ_FILE "/mnt/sdcard/enable_discount_price5" EnableDiscountPrice5 + DEBUGVAR EnableDiscountPrice5 + If EnableDiscountPrice5 = "true" Then + Var EnableDiscountWithIdentify = 1 + Var DiscountWithIdentifyState = "Enable" + EndIf + EndIf + EndIf + + If show_eng = "true" Then + Var CerealMilkX = 400 + Else + Var CerealMilkX = 270 + EndIf + + + 1000 + + DEBUGVAR Timeout + + + Var Timeout = Timeout + 1 + + If Timeout > 40 Then + Var Timeout = 0 + If Seeker = "next" Then + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml" + Open "ROOT/taobin_project/xml/page_brewing3Conti.xml" + Else + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" + Open "ROOT/taobin_project/xml/page_catalog.xml" + EndIf + + EndIf + + If MultiPayEnable = "true" Then + If NEW_MULTI = "Invisible" Then + Var NEW_MULTI = "Enable" + Else + Var NEW_MULTI = "Invisible" + EndIf + EndIf + + If Seeker = "curr" Then + If DoorCupPosition = "bottom" Then + ; It normal + Var EmergencyStop = "false" + Else + Var EmergencyStop = "true" + + + EndIf + EndIf + + + + If NoWaitMachineEnable = 1 Then + DEBUGVAR MachineStage + DEBUGVAR ConfirmDrinkButtonState + If MachineStage = "close-maintenance" Then + Var ConfirmDrinkButtonState = "Enable" + + If stop_now = "true" Then + Open "ROOT/taobin_project/xml/page_show_error.xml" + EndIf + Else + Var ConfirmDrinkButtonState = "Invisible" + EndIf + Else + + + + EndIf + + Refresh + TimerReset + + + + 0 + 380 + 1080 + 1540 + "0xeae6e1" + + + + + + + +; + + +; back + + + + DEBUGVAR MAT_ID_9701 + DEBUGVAR MAT_ID_9601 + + + DEBUGVAR SubMenuProductCode1 + DEBUGVAR SubMenuName11 + DEBUGVAR SubMenuPrice1 + + DEBUGVAR SubMenuProductCode2 + DEBUGVAR SubMenuName12 + + DEBUGVAR TOPPING1 + DEBUGVAR TOPPING1_EXT_2 + DEBUGVAR TOPPING2 + DEBUGVAR TOPPING3 + DEBUGVAR TOPPING4 + DEBUGVAR TOPPING5 + DEBUGVAR TOPPING6 + DEBUGVAR toppingID1index1 + DEBUGVAR toppingID1index2 + DEBUGVAR toppingID1index3 + DEBUGVAR toppingID1index4 + DEBUGVAR toppingID1index5 + DEBUGVAR toppingID1index6 + DEBUGVAR toppingID1index7 + DEBUGVAR toppingID1index8 + DEBUGVAR toppingID1index9 + + DEBUGVAR toppingID2index1 + DEBUGVAR toppingID2index2 + DEBUGVAR toppingID2index3 + DEBUGVAR toppingID2index4 + DEBUGVAR toppingID2index5 + + If toppingID1index5 > 0 Then + SAVELOG "toppingID1index5 not set" + EndIf + + + + + + DEBUGVAR toppingID1Default + DEBUGVAR toppingID2Default + DEBUGVAR toppingID3Default + + + DEBUGVAR MenuCodeName1 + DEBUGVAR MenuCodeName2 + DEBUGVAR SubMenuOnTop1 + DEBUGVAR SubMenuOnTop2 + DEBUGVAR SubMenuOnTop3 + DEBUGVAR SubMenuProductCode1 + DEBUGVAR SubMenuProductCode2 + DEBUGVAR SubMenuProductCode3 + + + DEBUGVAR toppingID2price2 + DEBUGVAR toppingID3price2 + DEBUGVAR toppingID6price2 + + DEBUGVAR BrewParam + DEBUGVAR UserSeletedSugar + + If BugFlag = 1 Then + + Else + + + If TOPPING6 = "Topping-Volcano" Then + + If toppingID6price2 > 0 Then + DEBUGVAR toppingID6price2 + DEBUGVAR DisplayFormat + + Var toppingID6price2Conv !assigned StringFmt( toppingID6price2 , DisplayFormat, PreScaleConvertShow) + + DEBUGVAR toppingID6price2Conv + + Var text_price_6 = "" + + Var text_price_6 = toppingID6price2Conv + ")" + Var text_price_6 = "(+" + text_price_6 + + + + DEBUGVAR text_price_6 + Else + + Var text_price_6 = "" + EndIf + + If blend_button_state = "PressForever" Then + + Var showOreoAddEnable = "Enable" + Var showText8 = "Invisible" + Else + Var showOreoAddEnable = "Disable" + Var showText8 = "Enable" + + EndIf + + + Var ExtraTopping = "Enable" + + + If blend_button_state = "Disable2" Then + If hot_button_state = "Disable2" Then + If cold_button_state = "PressForever" Then + Var showOreoAddEnable = "Enable" + Var showText8 = "Invisible" + EndIf + EndIf + EndIf + EndIf + + DEBUGVAR SubMenuGroupIDSlot6_1 + + + ; i f Hot menu disable away + If hot_button_state = "PressForever" Then + If showOreoAddEnable = "Enable" Then + Var showOreoAddEnable = "Disable" + EndIf + If showOreoAddEnable = "Press" Then + Var showOreoAddEnable = "Disable" + EndIf + EndIf + + ; first time. + If blend_button_state = "PressForever" Then + + Else + If SubMenuGroupIDSlot6_1 = 300 Then + Var showOreoAddEnable = "Disable" + Var showText8 = "Enable" + Var ExtraTopping = "Enable" + EndIf + EndIf + + STRCONTAIN "9701" BrewParam IgnoreLidStraw + + DEBUGVAR BrewParam + DEBUGVAR IgnoreLidStraw + + Var h_block_of_sugar = 210 + + + + If IgnoreLidStraw = "true" Then + Var IgnoreLidStraw = "false" + Var ShowLidStraw = "Invisible" + Var ShowLidOnly = "Invisible" + Var ShowStrawOnly = "Invisible" + + + Else + Var ShowLidStraw = "Enable" + If StrawState = "Enable" Then + If MAT_ID_9701 = "Enable" Then + Var StrawState = MAT_ID_9701 + Else + Var StrawState = MAT_ID_9701 + EndIf + EndIf + DEBUGVAR MAT_ID_9701 + DEBUGVAR StrawState + + If StrawState = "Press" Then + Var Seeker.thankStrawFlag = 1 + Else + Var Seeker.thankStrawFlag = 0 + EndIf + + + If LidState = "Enable" Then + If MAT_ID_9601 = "Enable" Then + Var LidState = MAT_ID_9601 + Else + Var LidState = MAT_ID_9601 + EndIf + EndIf + + EndIf + + ; Override all + If Service_LidStraw = "Disable" Then + Var ShowLidStraw = "Enable" + ;Var ShowLidOnly = "Invisible" + ;Var ShowStawOnly = "Invisible" + + + Var StrawState = "Disable" + Var LidState = "Disable" + + EndIf + + If StrawState = "Enable" Then + Var StrawDeactiveButton = "Invisible" + Else + If StrawState = "Press" Then + Var StrawDeactiveButton = "Invisible" + Else + Var StrawDeactiveButton = "Enable" + EndIf + EndIf + + + If LidState = "Enable" Then + Var LidDeactiveButton = "Invisible" + Else + If LidState = "Press" Then + Var LidDeactiveButton = "Invisible" + Else + Var LidDeactiveButton = "Enable" + EndIf + EndIf + + + If UserSeletedSugar = 0 Then + If SugarModeUpdateWhenChangeDrinkType = 1 Then + Var SugarModeUpdateWhenChangeDrinkType = 0 + RefreshAll + Else + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + Var SugarState6 = "Enable" + EndIf + + Var sugar_default_flag = 0 + + ; Suger 4 step cold + If TOPPING1 = "Suger 4 step cold" Then + + + Var BGSugar = "Invisible" + + Var ShiftSugarStep = 1 + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + + If toppingID1index1 = toppingID1Default Then + Var SugarState1 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState2 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index4 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState1 = "PressForever" + EndIf + EndIf + + ; Suger 4 step hot + If TOPPING1 = "Suger 4 step hot" Then + + + Var BGSugar = "Invisible" + + Var ShiftSugarStep = 1 + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + + If toppingID1index1 = toppingID1Default Then + Var SugarState1 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState2 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index4 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState1 = "PressForever" + EndIf + EndIf + + DEBUGVAR RecipeTag2 + ; + If TOPPING1 = "Sugar" Then + + If RecipeTag2 = "Topping6Step" Then + Var BGSugar = "Invisible" + Var BGSugarNew = "Enable" + Else + Var BGSugar = "Enable" + EndIf + + Var ShiftSugarStep = 1 + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + + If toppingID1index1 = toppingID1Default Then + Var SugarState1 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState2 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index4 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index5 = toppingID1Default Then + Var SugarState5 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState1 = "PressForever" + EndIf + + EndIf + + If TOPPING1 = "Powder Sugar for Hot" Then + + If RecipeTag2 = "Topping6Step" Then + Var BGSugar = "Invisible" + Var BGSugarNew = "Enable" + Else + Var BGSugar = "Enable" + EndIf + + Var ShiftSugarStep = 1 + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + + If toppingID1index1 = toppingID1Default Then + Var SugarState1 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState2 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index4 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index5 = toppingID1Default Then + Var SugarState5 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState1 = "PressForever" + EndIf + + EndIf + + If TOPPING1 = "Powder Sugar" Then + + If RecipeTag2 = "Topping6Step" Then + Var BGSugar = "Invisible" + Var BGSugarNew = "Enable" + Else + Var BGSugar = "Enable" + EndIf + + Var ShiftSugarStep = 1 + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + Var SugarState6 = "Enable" + + DEBUGVAR "set default Powder Sugar" + + If toppingID1index1 = toppingID1Default Then + Var SugarState1 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState2 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index4 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index5 = toppingID1Default Then + Var SugarState5 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState1 = "PressForever" + EndIf + + DEBUGVAR toppingID1Default + DEBUGVAR SugarState1 + EndIf + + + If TOPPING1 = "Sugar Premix 25" Then + + If RecipeTag2 = "Topping6Step" Then + Var BGSugar = "Invisible" + Var BGSugarNew = "Enable" + Else + Var BGSugar = "Enable" + EndIf + + Var ShiftSugarStep = 2 + Var SugarState1 = "Disable" + Var SugarState2 = "Enable" + + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + Var SugarState6 = "Enable" + + If toppingID1index1 = toppingID1Default Then + Var SugarState2 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index4 = toppingID1Default Then + Var SugarState5 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState2 = "PressForever" + EndIf + + EndIf + + If TOPPING1 = "Powder Sugar Premix 50" Then + + If RecipeTag2 = "Topping6Step" Then + Var BGSugar = "Invisible" + Var BGSugarNew = "Enable" + Else + Var BGSugar = "Enable" + EndIf + Var ShiftSugarStep = 3 + Var SugarState1 = "Disable" + Var SugarState2 = "Disable" + If RecipeTag2 = "Topping6Step" Then + Var SugarState3 = "Disable" + Else + Var SugarState3 = "Enable" + EndIf + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + Var SugarState6 = "Enable" + + If toppingID1index1 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState5 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState3 = "PressForever" + EndIf + + EndIf + + If TOPPING1 = "Powder Sugar Premix 25" Then + If RecipeTag2 = "Topping6Step" Then + Var BGSugar = "Invisible" + Var BGSugarNew = "Enable" + Else + Var BGSugar = "Enable" + EndIf + + Var ShiftSugarStep = 2 + + Var SugarState2 = "Enable" + + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + + If toppingID1index1 = toppingID1Default Then + Var SugarState2 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index2 = toppingID1Default Then + Var SugarState3 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index3 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If toppingID1index4 = toppingID1Default Then + Var SugarState5 = "PressForever" + Var sugar_default_flag = 1 + EndIf + + If sugar_default_flag = 0 Then + Var SugarState2 = "PressForever" + EndIf + EndIf + + Var SugarModeUpdateWhenChangeDrinkType = 0 + + If TOPPING1 = "Suger 4 step cold" Then + Var BGSugarColdHealthy = "Enable" + Var BGSugarHotHealthy = "Invisible" + + Var ShiftSugarStep = 1 + Var SugarModeUpdateWhenChangeDrinkType = 1 + EndIf + + If TOPPING1 = "Suger 4 step hot" Then + Var BGSugarHotHealthy = "Enable" + Var BGSugarColdHealthy = "Invisible" + + Var ShiftSugarStep = 1 + Var SugarModeUpdateWhenChangeDrinkType = 1 + EndIf + + + Var ShowCollagenOnly = "Enable" + + Var BugFlag = 1 + + Var topping1 = toppingID1Default + + + Var ToppingGotoPayment = "false" + + If BGSugar = "Enable" Then + If SelectDrinkType = 1 Then + If show_eng = "true" Then + Play "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Sweet.mp3" + Else + Var PlaySoundLag = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/select_level.mp3" + + ; Play Sound #zone + If SoundBackToSchoolEnable = 1 Then + + If SoundBackToSchoolType = 1 Then + Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/boy/" + EndIf + If SoundBackToSchoolType = 2 Then + Var RootPathSoundBackToSchool = "/mnt/sdcard/coffeevending/taobin_project/sound_thai/girl/" + EndIf + Var PlaySoundLag = RootPathSoundBackToSchool + "select_level.wav" + EndIf + + Play PlaySoundLag + EndIf + EndIf + EndIf + + DEBUGVAR SelectDrinkType + + If SelectDrinkType = 0 Then + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" + EndIf + + Else + + EndIf + ; End of UserSeletedSugar = 0 + + Refresh + + Var collagenShow = "true" +;-BEGIN shot layout + + If topping_price_refresh = 1 Then + Var topping_price_refresh = 0 + + Var topping3 = toppingID3Default + Var shot_h_layout = 218 + + If TOPPING2 = "shot coffee" Then + + Var ShotCoffeeBG = "Enable" + Var showShotEnable = "Enable" + Var ExtraTopping = "Enable" + + Var toppingID2price2Conv !assigned StringFmt( toppingID2price2 , DisplayFormat, PreScaleConvertShow) + + DEBUGVAR toppingID2price2Conv + Var text_shot_normal_add = toppingID2price2Conv + ")" + Var text_shot_normal_add = "(+" + text_shot_normal_add + + Refresh + EndIf + + + If TOPPING2 = "shot coffee termtem" Then + + Var ShotCoffeeBG = "Enable" + Var showShotEnable = "Enable" + + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "shot coffee 1003" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "shot coffee 1007" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "shot coffee 1008" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1009" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "add-show-1101" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1102" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1103" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "add-show-1104" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1105" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1106" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1107" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1108" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Invisible" + Var ExtraTopping = "Enable" + + DEBUGVAR TOPPING2 + Refresh + EndIf + + If ShotCoffeePremium = "Enable" Then + Var toppingID2price2Conv !assigned StringFmt( toppingID2price2 , DisplayFormat, PreScaleConvertShow) + + DEBUGVAR toppingID2price2Conv + Var text_price_topping = toppingID2price2Conv + ")" + Var text_price_topping = "(+" + text_price_topping + + EndIf + + ;-END + If TOPPING3 = "Collagen" Then + Var CollagenState = "Enable" + Else + Var CollagenState = "Invisible" + Var ShowCollagenOnly = "Invisible" + EndIf + + EndIf + ;topping_price_refresh = 0 + + If MenuCodeName1 = "Cereal-Milk" Then + Var CerealMilkToppingEnable = "Enable" + Var CerealMilkPrice = SubMenuPrice1 + Var ExtraTopping = "Enable" + + EndIf + + + SAVELOG ToppingGotoPayment + If ToppingGotoPayment = "true" Then + Topping "Select" SelectDrink + ; Pack + + Topping "Pack" ExtendDataCurr + Var Seeker.ExtendDataCurr = ExtendDataCurr + + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml" + Open "ROOT/taobin_project/xml/page_payment.xml" + EndIf + + + If RoadShow = "true" Then + Var PriceShowValue = "Free" + Var ModeFreeEnable = 1 + Else + Var ModeFreeEnable = 0 + EndIf + + DEBUGVAR showShotEnable + DEBUGVAR showOreoAddEnable + DEBUGVAR ShotCoffeePremium + DEBUGVAR toppingID2price1 + DEBUGVAR toppingID2price2 + DEBUGVAR toppingID2price3 + Function 2 + EndIf + + + + + + ;Var BugFlag = 1 + If CartUpdate = "true" Then + Var CartUpdate = "-" + + + If CART_COUNT = 3 Then + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml" + Open "ROOT/taobin_project/xml/page_payment_multi.xml" + Else + If ButtonNext = "true" Then + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml" + Open "ROOT/taobin_project/xml/page_payment_multi.xml" + Else + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" + Open "ROOT/taobin_project/xml/page_catalog.xml" + EndIf + EndIf + EndIf + + + +; same + + 374 + 382 + 331 + 436 + PictureDrink + + + + + 374 + 399 + eval( + If IsSmoRet = "true" Then + Var return = "Enable" + Else + Var return = "Invisible" + EndIf +) + + "ROOT/taobin_project/image/topping2/blender_icon.png" + + +; same + + + 0 + 752 + 1080 + Center + 72 + KanitMediumTTF + 0x513C2F + showname + +; same + + 0 + 836 + 1080 + Center + 24 + KanitLightTTF + 0x6F5F51 + showdesc + + + + + + + +; +; +; +; +; +; +; +; +; +; +; +; +;- FRAME SCORELLL +; zone scroll + + 52 + 881 + 1080 + 900 +; "auto-all" + "Vertical" + 1 + + + +; show_select_type + 988 + 162 + 20 + show_select_type + + + Var( DirImage + "/drink_select_type.png" ) + + + + + + + + + + + + + + + + + 552 + 85 + KanitRegularTTF + 23 + text_hot_color + text_price_d1 + + + 710 + 85 + KanitRegularTTF + 23 + text_cold_color + text_price_d2 + + + 852 + 85 + KanitRegularTTF + 23 + text_show_thai + text_blender_color + text_price_d3 + + + 872 + 85 + KanitRegularTTF + text_show_eng + 23 + text_blender_color + text_price_d3 + + + + + + +;-END + +; +; +; +; +; +; +; +; +; +;- Begin topping1 + + + 988 + 156 + 20 + BGSugar +; sugar layout + + BGSugar + Var( DirImage + "/bg_sugar.png" ) + + + +; + +; sugar1 + + +; sugar2 + + + +; sugar3 + + +; sugar4 + + +; sugar5 + +;- END topping1 + + + + + +; +; +; +; +; +; +; +; +; +; +;- Begin topping new + + + 988 + 156 + 20 + BGSugarNew +; sugar layout + + "Enable" + Var( DirImage + "/bg_sugar_bank_button.png" ) + + + +; + +; sugar1 + + +; sugar2 + + + +; sugar3 + + +; sugar4 + + +; sugar5 + + +; sugar6 + +;- END topping1 + + + +; +; +; +; +; +; +; +; +; +; +; +; +; +; +;- Begin topping2 + + + 988 + 156 + 20 + BGSugarHotHealthy +; sugar layout + + BGSugarHotHealthy + Var( DirImage + "/bg_sugar_bank_button.png" ) + + + +; + +; sugar1 + + +; sugar2 + + + +; sugar3 + + +; sugar4 + + +;- END topping2 + + +; +; +; +; +; +; +; +; +; +; +; +; +; +; +;- Begin topping3 + + + 988 + 156 + 20 + BGSugarColdHealthy +; sugar layout + + BGSugarColdHealthy + Var( DirImage + "/bg_sugar_bank_button.png" ) + + + +; + +; sugar1 + + +; sugar2 + + + +; sugar3 + + +; sugar4 + + +;- END topping2 + + +; +; +; +; +; +; +; +; +; + +; +; +; +; +; +; +; +; +; +; +;-BEGIN +; +;-BEGIN Lid straw + + 986 + 240 + 20 + ShowLidStraw + + bg_strawlid + + +; straw left + + + + + + +; LID left + + + + + + StrawDeactiveButton + 602 + 64 + Var( DirImage + "/text20.png" ) + + + + + LidDeactiveButton + 602 + 150 + Var( DirImage + "/text21.png" ) + + + + +;-END +; +; +; Extra topping. +; +; +; +; +; +; +;-BEGIN shot layout + + ExtraTopping + 1080 + "auto" + 20 + + + 986 + "auto" + "vertical" + ExtraTopping +; + + 986 + 64 + ExtraTopping + + Var( DirImage + "/bg_top.png" ) + + + +; +; +; + + 986 + "auto" + CerealMilkToppingEnable +; + + 0 + 0 + Var( DirImage + "/bg_top_milk.png") + + + + +; + + + + CerealMilkX + 2 + KanitRegularTTF + CerealMilkEnable + 36 + 0x84776F + CerealMilkPrice + + + +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; +; + + + 986 + "auto" + ShotCoffeePremium +; + + 0 + 0 + Var( DirImage + "/bg_top_b3shot.png") + + + + +; + + + + topping_shot_price_x + 2 + KanitRegularTTF + "ShotCoffeePremium" + 36 + 0x84776F + text_price_topping + + + + +; +; +; +;-BEGIN shot layout "showShotEnable" + + 986 + "auto" + showShotEnable +; + + 0 + 0 + Var( DirImage + "/bg_top_shot2.png") + +; + + +; + + + + showText4 + 602 + 4 + Var( DirImage + "/text4.png" ) + + + + text_show_normal_x + 4 + KanitRegularTTF + "Enable" + 36 + 0x84776F + text_shot_normal_add + + + + + +; +; +; +; +; + + 986 + "auto" + showOreoAddEnable +; + + 0 + 0 + Var( DirImage + "/bg_top_oreo2.png") + +; + + +; + + + + showText8 + 600 + 6 + Var( DirImage + "/text8.png" ) + + + + + text_x_add_oreo_price + 12 + KanitRegularTTF + "Enable" + 36 + 0x84776F + text_price_6 + + + + + + +; +; +; +; +; +; + + + "Enable" + 986 + 27 + -5 + + ExtraTopping + "ROOT/taobin_project/image/topping2/bg_bottom.png" + + + + + + + +; +; +; +; +; +; +; + + + +; +; +; +; +; +; +; +; +; + + + + Open "/media/bt/xml/security_alarm.xml" + + + + + + +; back + + + + + + +; add cart + + + + + +; liveness + camera + IDcard + + + + +; next + + + + + + + + + Var img_cold_no_flag = 0 + Var img_smth_no_flag = 0 + + If hot_button_state = "Disable2" Then + If blend_button_state = "Disable2" Then + Var img_cold_no_flag = 1 + Else + Var img_cold_no_flag = 1 + Var img_smth_no_flag = 2 + EndIf + EndIf + + If PriceD1 = PriceD2 Then + Var img_cold_no_flag = 1 + EndIf + + If hot_button_state = "Disable2" Then + If cold_button_state = "Disable2" Then + Var img_smth_no_flag = 1 + EndIf + EndIf + + + If img_cold_no_flag = 1 Then + SAVELOG "Cold Image change." + Var img_cold = "/bt_cold_no.png" + Var img_cold_sel = "/bt_cold_selected_no.png" + Var img_cold_dis = "/bt_cold_disable_no.png" + Var img_cold_dis2 = "/bt_cold_disable2_no.png" + Else + Var img_cold = "/bt_cold.png" + Var img_cold_sel = "/bt_cold_selected.png" + Var img_cold_dis = "/bt_cold_disable.png" + Var img_cold_dis2 = "/bt_cold_disable2.png" + EndIf + + If img_smth_no_flag = 1 Then + SAVELOG "Smoothies change img. 1" + Var img_smth = "/bt_smoothie_no.png" + Var img_smth_sel = "/bt_smoothie_selected_no.png" + Var img_smth_dis = "/bt_smoothie_disable_no.png" + Var img_smth_dis2 = "/bt_smoothie_disable2_no.png" + Else + If img_smth_no_flag = 2 Then + SAVELOG "Smoothies change img. 2" + Var img_smth = "/bt_smoothie_sub2.png" + Var img_smth_sel = "/bt_smoothie_selected_sub2.png" + Var img_smth_dis = "/bt_smoothie_disable_sub2.png" + Var img_smth_dis2 = "/bt_smoothie_disable2_sub2.png" + Else + + Var img_smth = "/bt_smoothie.png" + Var img_smth_sel = "/bt_smoothie_selected.png" + Var img_smth_dis = "/bt_smoothie_disable.png" + Var img_smth_dis2 = "/bt_smoothie_disable2.png" + EndIf + EndIf + + Var img_cold = "/bt_cold_no.png" + Var img_cold_sel = "/bt_cold_selected_no.png" + Var img_cold_dis = "/bt_cold_disable_no.png" + Var img_cold_dis2 = "/bt_cold_disable2_no.png" + + Var img_smth = "/bt_smoothie_no.png" + Var img_smth_sel = "/bt_smoothie_selected_no.png" + Var img_smth_dis = "/bt_smoothie_disable_no.png" + Var img_smth_dis2 = "/bt_smoothie_disable2_no.png" + + DEBUGVAR menu_name_thai_cold + SAVELOG "FUNCTION2" + + + Var TOPPING_PRICE = 0 + + Var SelectDrinkType = 0 + + ; Set default + If SelectCountDrinkType = 1 Then + If DefaultDrinkType = 1 Then + Var hot_button_state = "PressForever" + EndIf + If DefaultDrinkType = 2 Then + Var cold_button_state = "PressForever" + EndIf + If DefaultDrinkType = 3 Then + Var blend_button_state = "PressForever" + EndIf + + EndIf + + If hot_button_state = "PressForever" Then + Var PriceDrinkNoTop = PriceD1 + Var UserSelectProductCode = PD_CODE1 + + If showShotEnable = "Disable" Then + Var showShotEnable = "Enable" + EndIf + + Var showText4 = "Invisible" + + If show_eng = "true" Then + Var showname = menu_name_eng_hot + Var showdesc = menu_desc_eng_hot + Else + Var showname = menu_name_thai_hot + Var showdesc = menu_desc_thai_hot + EndIf + Var text_hot_color = "0xFFFFFF" + Var text_cold_color = "0x84776F" + Var text_blender_color = "0x84776F" + + Var SelectDrinkType = 1 + + Machine PreparCup + EndIf + + If cold_button_state = "PressForever" Then + Var PriceDrinkNoTop = PriceD2 + Var UserSelectProductCode = PD_CODE2 + + If showShotEnable = "Disable" Then + Var showShotEnable = "Enable" + EndIf + Var showText4 = "Invisible" + + If show_eng = "true" Then + Var showname = menu_name_eng_cold + Var showdesc = menu_desc_eng_cold + Else + Var showname = menu_name_thai_cold + Var showdesc = menu_desc_thai_cold + EndIf + + Var text_hot_color = "0x84776F" + Var text_cold_color = "0xFFFFFF" + Var text_blender_color = "0x84776F" + + Var SelectDrinkType = 1 + + Machine PreparCup + EndIf + + If blend_button_state = "PressForever" Then + Var PriceDrinkNoTop = PriceD3 + Var UserSelectProductCode = PD_CODE3 + + If showShotEnable = "Invisible" Then + + Else + Var showShotEnable = "Disable" + EndIf + Var showText4 = "Enable" + + If show_eng = "true" Then + Var showname = menu_name_eng_blender + Var showdesc = menu_desc_eng_blender + Else + Var showname = menu_name_thai_blender + Var showdesc = menu_desc_thai_blender + EndIf + + Var text_hot_color = "0x84776F" + Var text_cold_color = "0x84776F" + Var text_blender_color = "0xFFFFFF" + + Var SelectDrinkType = 1 + + Machine PreparCup + EndIf + + Var CerealMilkAddAmount = SubMenuPrice1 - PriceDrinkNoTop + + If CerealMilkAddAmount = 0 Then + Var CerealMilkPrice = "(+฿10)" + + Else + Var CerealMilkPrice = "(+฿" + CerealMilkAddAmount + Var CerealMilkPrice = CerealMilkPrice + ")" + EndIf + + DEBUGVAR CerealMilkAddAmount + + + + DEBUGVAR PriceDrinkNoTop + DEBUGVAR PriceDiff + DEBUGVAR showShotEnable + Var TOPPING_PRICE = 0 + + If ShotCoffeePremium = "Press" Then + If blendedState = "Press" Then + Var PriceDrinkTmp = PriceDrinkNoTop + EndIf + + Var blendedState = "Disable" + Var TOPPING_PRICE = 0 + + Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price2 + + Var topping2 = toppingID2index2 + + Var DisableUsingCode = "true" + + Var showText7 = "Enable" + + SAVELOG "Select premi normal shot" + + Else + + If showShotEnable = "Press" Then + If blendedState = "Press" Then + Var PriceDrinkTmp = PriceDrinkNoTop + EndIf + + Var blendedState = "Disable" + + Var TOPPING_PRICE = 0 + + ;Var PriceDrinkTmp = PriceDrinkNoTop + toppingID2price2 + Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price2 + + Var topping2 = toppingID2index2 + + Var DisableUsingCode = "true" + + Var showText7 = "Enable" + + SAVELOG "Select add normal shot" + Else + If blendedState = "Disable" Then + Var blendedState = "Enable" + EndIf + + + Var PriceDrinkTmp = PriceDrinkNoTop + Var topping2 = toppingID2index1 + Var DisableUsingCode = "false" + SAVELOG "Deselect add normal shot" + + Var showText7 = "Invisible" + + EndIf + + EndIf + + + DEBUGVAR showOreoAddEnable + DEBUGVAR TOPPING_PRICE + + If showOreoAddEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID6price2 + Var topping6 = toppingID6index2 + Var DisableUsingCode = "true" + Else + + ;Var PriceDrinkTmp = PriceDrinkNoTop + + Var topping6 = toppingID6index1 + + Var DisableUsingCode = "false" + + EndIf + + If CerealMilkEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + CerealMilkAddAmount + Var DisableUsingCode = "true" + Else + + EndIf + + + DEBUGVAR SelectDrinkType + + DEBUGVAR showShotEnable + DEBUGVAR PriceDrinkTmpShow + + If Price5Active = 1 Then + Var PriceDrinkNoTop = 5 + If blend_button_state = "PressForever" Then + Var PriceDrinkNoTop = 10 + EndIf + EndIf + + Var PriceDrinkTmp = PriceDrinkNoTop + TOPPING_PRICE + Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp + + + + + If SelectDrinkType = 0 Then + Var PriceDrinkTmpShow = "---" + Else + Var PriceDrinkTmpShow !assigned StringFmt( PriceDrinkTmp , DisplayFormat, PreScaleConvertShow) + EndIf + SAVELOG PriceDrinkTmp + + If RoadShow = "true" Then + Var PriceDrinkTmp = 0 + Var PriceDrinkTmpShow = "Free" + + DEBUGVAR SelectDrink2 + DEBUGVAR PriceDrinkTmpShow + EndIf + + CRLFToSpace showname + CRLFToSpace showdesc + DEBUGVAR showname + DEBUGVAR showdesc + + + Var Timeout = 0 + + RefreshAll + + + + + + + 924 + 1804 + KanitTTF + 36 + 1080 + 0xFFFFFF + + + "OnValueChange" + + PriceDrinkTmpShow + + + +; next2 button Protect + + +; zone + + +; free oreo + + + + + + 0 + 380 + 1080 + 1540 + high_light_drink_type + "ROOT/taobin_project/image/topping2_en/topping_en/high_light_drink_type.png" + + + + + + + 543 + 920 + high_light_drink_type + KanitTTF + 36 + 1080 + 0xFF0000 + eval( + If show_eng = "true" Then + Var return = "Please choose drink type" + Else + Var return ="โปรดเลือกประเภทเครื่องดื่ม" + EndIf + ) + + + + 1 + 1 + KanitTTF + 22 + 1080 + end + 0xFF0000 + "#6" + + + +; + + + Var PromotionOreoToppingFreeEnable = 1 + DEBUGVAR PromotionOreoToppingFreeEnable + + + + Var PromotionOreoToppingFreeEnable = 0 + DEBUGVAR PromotionOreoToppingFreeEnable + + + + +