diff --git a/adv/1080x358.mp4 b/adv/1080x358.mp4 new file mode 100644 index 00000000..fdde3c8d Binary files /dev/null and b/adv/1080x358.mp4 differ diff --git a/adv/Home screen 1080_608 px_2.mp4 b/adv/Home screen 1080_608 px_2.mp4 new file mode 100644 index 00000000..70e43e75 Binary files /dev/null and b/adv/Home screen 1080_608 px_2.mp4 differ diff --git a/adv/Menu catagory1080_380 px (1).mp4 b/adv/Menu catagory1080_380 px (1).mp4 new file mode 100644 index 00000000..6c9cabcd Binary files /dev/null and b/adv/Menu catagory1080_380 px (1).mp4 differ diff --git a/image/topping2/bg_bottom.png b/image/topping2/bg_bottom.png new file mode 100644 index 00000000..4cec5055 Binary files /dev/null and b/image/topping2/bg_bottom.png differ diff --git a/image/topping2/bg_row.png b/image/topping2/bg_row.png new file mode 100644 index 00000000..4e3c6591 Binary files /dev/null and b/image/topping2/bg_row.png differ diff --git a/image/topping2/bg_top.png b/image/topping2/bg_top.png new file mode 100644 index 00000000..927dfc14 Binary files /dev/null and b/image/topping2/bg_top.png differ diff --git a/image/topping2/bg_top_b3shot.png b/image/topping2/bg_top_b3shot.png new file mode 100644 index 00000000..d4204be3 Binary files /dev/null and b/image/topping2/bg_top_b3shot.png differ diff --git a/image/topping2/bg_top_oreo.png b/image/topping2/bg_top_oreo.png new file mode 100644 index 00000000..7e11f73d Binary files /dev/null and b/image/topping2/bg_top_oreo.png differ diff --git a/image/topping2/bg_top_shot.png b/image/topping2/bg_top_shot.png new file mode 100644 index 00000000..ff8a45f3 Binary files /dev/null and b/image/topping2/bg_top_shot.png differ diff --git a/image/topping2/bn_add_oreo.png b/image/topping2/bn_add_oreo.png new file mode 100644 index 00000000..cdb8fff2 Binary files /dev/null and b/image/topping2/bn_add_oreo.png differ diff --git a/image/topping2/bp_add_oreo.png b/image/topping2/bp_add_oreo.png new file mode 100644 index 00000000..6c1a271b Binary files /dev/null and b/image/topping2/bp_add_oreo.png differ diff --git a/image/topping2_en/bg_bottom.png b/image/topping2_en/bg_bottom.png new file mode 100644 index 00000000..4cec5055 Binary files /dev/null and b/image/topping2_en/bg_bottom.png differ diff --git a/image/topping2_en/bg_top.png b/image/topping2_en/bg_top.png new file mode 100644 index 00000000..62d50a3a Binary files /dev/null and b/image/topping2_en/bg_top.png differ diff --git a/xml/page_catalog.xml b/xml/page_catalog.xml index 7e116d76..34d1c4d5 100644 --- a/xml/page_catalog.xml +++ b/xml/page_catalog.xml @@ -10,6 +10,9 @@ TopView "show" ; On open + READ_FILE "/mnt/sdcard/new_topping" ToppingNewShow + DEBUGVAR ToppingNewShow + Var NextPage = "-" Var Seeker.thankLidFlag = 0 diff --git a/xml/page_topping_select4.xml b/xml/page_topping_select4.xml index 3ba352f1..58f3668e 100644 --- a/xml/page_topping_select4.xml +++ b/xml/page_topping_select4.xml @@ -7,6 +7,12 @@ OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" + DEBUGVAR ToppingNewShow + If ToppingNewShow = "true" Then + SAVELOG "open page_topping_select5" + Open "ROOT/taobin_project/xml/page_topping_select5.xml" + EndIf + Var UserSeletedSugar = 0 Var y_topping_bg = 912 diff --git a/xml/page_topping_select5.xml b/xml/page_topping_select5.xml index b181c80f..18dfb0d5 100644 --- a/xml/page_topping_select5.xml +++ b/xml/page_topping_select5.xml @@ -2,11 +2,16 @@ "Enable" 1080 1920 - "0xeae6e1" +; "0xeae6e1" SoundVolume + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_advert.xml" + + Var UserSeletedSugar = 0 + Var y_topping_bg = 912 + WEB "DISABLE" DEBUGVAR Seeker DEBUGVAR video_menu_0 @@ -14,12 +19,20 @@ DEBUGVAR SelectDrink DEBUGVAR PictureDrink - If SelectDrinkLen = 0 Then - Open "ROOT/taobin_project/xml/page_catalog.xml" - EndIf + DEBUGVAR new_layout + + If new_layout = "true" Then - If PriceDrink = 0 Then - Open "ROOT/taobin_project/xml/page_catalog.xml" + Else + If SelectDrinkLen = 0 Then + SAVELOG "SelectDrinkLen=0" + Open "ROOT/taobin_project/xml/page_catalog.xml" + EndIf + + If PriceDrink = 0 Then + SAVELOG "PriceDrink=0" + Open "ROOT/taobin_project/xml/page_catalog.xml" + EndIf EndIf Var SaveProductCodeSelect = SelectDrink @@ -55,8 +68,10 @@ Var BGSugar = "Invisible" Var ShotCoffeeBG = "Invisible" + Var showShotEnable = "Enable" - Var ShotCoffeePremium = "Invisible" + Var ShotCoffeePremium = "Enable" + Var showOreoAddEnable = "Enable" ; On open @@ -80,7 +95,10 @@ Var showname = NameDrink Var showdesc = DrinkDescription + Var text_show_thai = "Invisible" + Var text_show_eng = "Enable" + Var topping_shot_price_x = 630 Else @@ -90,6 +108,10 @@ Var showname = NameDrinkTH Var showdesc = DrinkDescriptionTH + Var text_show_thai = "Enable" + Var text_show_eng = "Invisible" + + Var topping_shot_price_x = 600 EndIf @@ -126,13 +148,16 @@ Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp Var Timeout = 0 - SAVELOG PriceDrinkTmp + ;SAVELOG PriceDrinkTmp ;- End If RoadShow = "true" Then Var PriceDrinkTmp = "Free" + Var SaveSelectDrinkRoadShow = SelectDrink EndIf + DEBUGVAR SaveSelectDrinkRoadShow + If ShowPrice = "Invisible" Then Var PriceDrinkTmpShow = "Free" EndIf @@ -155,11 +180,6 @@ EndIf EndIf - DEBUGVAR GetFreeFromError - If GetFreeFromError = 1 Then - Var btnAddCart = "Invisible" - EndIf - Var LidDeactiveButton = "Invisible" Var StrawDeactiveButton = "Invisible" @@ -170,21 +190,114 @@ 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 = "(฿" + PriceD1 + Var text_price_d1 = text_price_d1 + ")" + EndIf + + If cold_button_state = "Disable2" Then + Var text_price_d2 = "" + Else + Var text_price_d2 = "(฿" + PriceD2 + Var text_price_d2 = text_price_d2 + ")" + EndIf + + If blend_button_state = "Disable2" Then + Var text_price_d3 = "" + Else + Var text_price_d3 = "(฿" + PriceD3 + Var text_price_d3 = text_price_d3 + ")" + 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 topping_price_refresh = 1 + + Var StrawState = "Enable" + Var LidState = "Enable" + Var MAT_ID_9701 = StrawState + 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 - - ;Open "ROOT/taobin_project/xml/page_back_to_main.xml" + EndIf If MultiPayEnable = "true" Then @@ -202,7 +315,6 @@ Else Var EmergencyStop = "true" - ;Open "ROOT/taobin_project/xml/page_back_to_error.xml" EndIf EndIf @@ -211,6 +323,17 @@ TimerReset + + 0 + 380 + 1080 + 1540 + "0xeae6e1" + + + + + - + +; + ; back @@ -347,17 +500,14 @@ DEBUGVAR toppingID3price2 DEBUGVAR BrewParam + DEBUGVAR UserSeletedSugar + If BugFlag = 1 Then Else - Var SugarState1 = "Enable" - Var SugarState2 = "Enable" - Var SugarState3 = "Enable" - Var SugarState4 = "Enable" - Var SugarState5 = "Enable" - + @@ -371,24 +521,28 @@ ;STRCONTAIN "Smoothie" SubMenuName11 HaveSmoothie STRCONTAIN "Smoothie" MenuCodeName HaveSmoothie - If HaveSmoothie = "true" Then - Var blendedState = "Enable" - Var blendedStateShow = "Enable" + If show_select_type = "Invisible" Then + If HaveSmoothie = "true" Then + Var blendedState = "Enable" + Var blendedStateShow = "Enable" - Var PriceDiff = SubMenuPrice1 - PriceDrinkNoTop - - DEBUGVAR IsSmoRet + Var PriceDiff = SubMenuPrice1 - PriceDrinkNoTop + + DEBUGVAR IsSmoRet - If IsSmoRet = "true" Then - Var blendedState = "ForceSet" - Var blendedStateTxt = "Enable" - Topping "LoadSubMenu" SubMenuProductCode1 - Function 1 - Else - Var blendedStateTxt = "Invisible" - - EndIf + If IsSmoRet = "true" Then + Var blendedState = "ForceSet" + Var blendedStateTxt = "Enable" + Topping "LoadSubMenu" SubMenuProductCode1 + Function 1 + Else + Var blendedStateTxt = "Invisible" + + EndIf + EndIf + Else + Var blendedStateShow = "Invisible" EndIf If IgnoreLidStraw = "true" Then @@ -400,17 +554,28 @@ Else Var ShowLidStraw = "Enable" - - If MAT_ID_9701 = "Enable" Then - Var StrawState = MAT_ID_9701 - Else - Var StrawState = MAT_ID_9701 + If StrawState = "Enable" Then + If MAT_ID_9701 = "Enable" Then + Var StrawState = MAT_ID_9701 + Else + Var StrawState = MAT_ID_9701 + EndIf EndIf - - If MAT_ID_9601 = "Enable" Then - Var LidState = MAT_ID_9601 + DEBUGVAR StrawState + + If StrawState = "Press" Then + Var Seeker.thankStrawFlag = 1 Else - Var LidState = MAT_ID_9601 + 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 @@ -430,294 +595,400 @@ If StrawState = "Enable" Then Var StrawDeactiveButton = "Invisible" Else - Var StrawDeactiveButton = "Enable" + If StrawState = "Press" Then + Var StrawDeactiveButton = "Invisible" + Else + Var StrawDeactiveButton = "Enable" + EndIf EndIf If LidState = "Enable" Then Var LidDeactiveButton = "Invisible" Else - Var LidDeactiveButton = "Enable" + If LidState = "Press" Then + Var LidDeactiveButton = "Invisible" + Else + Var LidDeactiveButton = "Enable" + EndIf EndIf - - ;PressForever - If TOPPING1 = "Sugar" Then - - If sugarKeto = "true" Then - Var StateImgKeto = "Enable" - Var BGSugar = "Invisible" - Else - Var BGSugar = "Enable" - Endif - - Var ShiftSugarStep = 1 + If UserSeletedSugar = 0 Then 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 = 0 + + If TOPPING1 = "Sugar" Then + + If sugarKeto = "true" Then + Var StateImgKeto = "Enable" + Var BGSugar = "Invisible" + 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 toppingID1index2 = toppingID1Default Then - Var SugarState2 = "PressForever" + If TOPPING1 = "Powder Sugar" Then + + If sugarKeto = "true" Then + Var StateImgKeto = "Enable" + Var BGSugar = "Enable" + Var h_block_of_sugar = 262 + Else + Var BGSugar = "Enable" + EndIf + ;Var BGSugar = "Enable" + 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 toppingID1index3 = toppingID1Default Then - Var SugarState3 = "PressForever" - EndIf - If toppingID1index4 = toppingID1Default Then - Var SugarState4 = "PressForever" - EndIf - - If toppingID1index5 = toppingID1Default Then - Var SugarState5 = "PressForever" - EndIf - - EndIf - - If TOPPING1 = "Powder Sugar" Then - - If sugarKeto = "true" Then - Var StateImgKeto = "Enable" + If TOPPING1 = "Sugar Premix 25" Then Var BGSugar = "Enable" - Var h_block_of_sugar = 262 - Else + Var ShiftSugarStep = 2 + Var SugarState1 = "Disable" + 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 + + If TOPPING1 = "Powder Sugar Premix 50" Then Var BGSugar = "Enable" - EndIf - ;Var BGSugar = "Enable" - Var ShiftSugarStep = 1 - Var SugarState1 = "Enable" - Var SugarState2 = "Enable" - Var SugarState3 = "Enable" - Var SugarState4 = "Enable" - Var SugarState5 = "Enable" + Var ShiftSugarStep = 3 + Var SugarState1 = "Disable" + Var SugarState2 = "Disable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "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 - If toppingID1index1 = toppingID1Default Then - Var SugarState1 = "PressForever" - EndIf - - If toppingID1index2 = toppingID1Default Then - Var SugarState2 = "PressForever" - EndIf - - If toppingID1index3 = toppingID1Default Then - Var SugarState3 = "PressForever" EndIf - If toppingID1index4 = toppingID1Default Then - Var SugarState4 = "PressForever" - EndIf + If TOPPING1 = "Powder Sugar Premix 25" Then + Var BGSugar = "Enable" + 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 toppingID1index5 = toppingID1Default Then - Var SugarState5 = "PressForever" - EndIf + If toppingID1index3 = toppingID1Default Then + Var SugarState4 = "PressForever" + Var sugar_default_flag = 1 + EndIf - 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 = "Sugar Premix 25" Then - Var BGSugar = "Enable" - Var ShiftSugarStep = 2 - Var SugarState1 = "Disable" - Var SugarState2 = "Enable" - Var SugarState3 = "Enable" - Var SugarState4 = "Enable" - Var SugarState5 = "Enable" + Var ShowCollagenOnly = "Enable" + + Var BugFlag = 1 - If toppingID1index1 = toppingID1Default Then - Var SugarState2 = "PressForever" - EndIf + Var topping1 = toppingID1Default + + + Var ToppingGotoPayment = "false" - If toppingID1index2 = toppingID1Default Then - Var SugarState3 = "PressForever" + If BGSugar = "Enable" Then + If SelectDrinkType = 1 Then + If show_eng = "true" Then + Play "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Sweet.mp3" + Else + Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/select_level.mp3" + EndIf + EndIf EndIf - If toppingID1index3 = toppingID1Default Then - Var SugarState4 = "PressForever" + If SelectDrinkType = 0 Then + Var SugarState1 = "Enable" + Var SugarState2 = "Enable" + Var SugarState3 = "Enable" + Var SugarState4 = "Enable" + Var SugarState5 = "Enable" EndIf - - If toppingID1index4 = toppingID1Default Then - Var SugarState5 = "PressForever" - EndIf - - EndIf - - If TOPPING1 = "Powder Sugar Premix 50" Then - Var BGSugar = "Enable" - Var ShiftSugarStep = 3 - Var SugarState1 = "Disable" - Var SugarState2 = "Disable" - Var SugarState3 = "Enable" - Var SugarState4 = "Enable" - Var SugarState5 = "Enable" - - If toppingID1index1 = toppingID1Default Then - Var SugarState3 = "PressForever" - EndIf - - If toppingID1index2 = toppingID1Default Then - Var SugarState4 = "PressForever" - EndIf - - If toppingID1index3 = toppingID1Default Then - Var SugarState5 = "PressForever" - EndIf - - EndIf - - If TOPPING1 = "Powder Sugar Premix 25" Then - Var BGSugar = "Enable" - Var ShiftSugarStep = 2 - Var SugarState2 = "Enable" - Var SugarState3 = "Enable" - Var SugarState4 = "Enable" - Var SugarState5 = "Enable" - - If toppingID1index1 = toppingID1Default Then - Var SugarState2 = "PressForever" - EndIf - - If toppingID1index2 = toppingID1Default Then - Var SugarState3 = "PressForever" - EndIf - - If toppingID1index3 = toppingID1Default Then - Var SugarState4 = "PressForever" - EndIf - - If toppingID1index4 = toppingID1Default Then - Var SugarState5 = "PressForever" - EndIf - - EndIf - - - - Var ShowCollagenOnly = "Enable" - - Var BugFlag = 1 - Var topping1 = toppingID1Default + Else + + EndIf + ; End of UserSeletedSugar = 0 - Var ToppingGotoPayment = "false" - - If BGSugar = "Enable" Then - If show_eng = "true" Then - Play "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Sweet.mp3" - Else - Play "/mnt/sdcard/coffeevending/taobin_project/sound_thai/select_level.mp3" - EndIf - EndIf 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 + Var topping3 = toppingID3Default + Var shot_h_layout = 218 - If TOPPING2 = "shot coffee" Then - - Var ShotCoffeeBG = "Enable" - Var showShotEnable = "Enable" + If TOPPING2 = "shot coffee" Then + + Var ShotCoffeeBG = "Enable" + Var showShotEnable = "Enable" + + + Refresh + EndIf - Refresh - EndIf - + If TOPPING2 = "shot coffee termtem" Then - If TOPPING2 = "shot coffee termtem" Then - - Var ShotCoffeeBG = "Enable" - Var showShotEnable = "Enable" + Var ShotCoffeeBG = "Enable" + Var showShotEnable = "Enable" + Var text_price_topping = "(+฿" + toppingID2price2 + + DEBUGVAR TOPPING2 + Refresh + EndIf - DEBUGVAR TOPPING2 - Refresh - EndIf - - If TOPPING2 = "shot coffee 1003" Then - - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Enable" - - DEBUGVAR TOPPING2 - Refresh - EndIf - If TOPPING2 = "shot coffee 1007" Then - - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Enable" - - DEBUGVAR TOPPING2 - Refresh - EndIf - If TOPPING2 = "shot coffee 1008" Then - - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Enable" - - DEBUGVAR TOPPING2 - Refresh - EndIf - - If TOPPING2 = "add-show-1009" Then - - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Enable" - - DEBUGVAR TOPPING2 - Refresh - EndIf - If TOPPING2 = "add-show-1101" Then - - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Enable" - - DEBUGVAR TOPPING2 - Refresh - EndIf - - If TOPPING2 = "add-show-1102" Then - - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Enable" - - DEBUGVAR TOPPING2 - Refresh - EndIf + If TOPPING2 = "shot coffee 1003" Then - If TOPPING2 = "add-show-1103" Then - - Var ShotCoffeePremium = "Enable" - Var showShotEnable = "Enable" + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" - DEBUGVAR TOPPING2 - Refresh - EndIf + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "shot coffee 1007" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" -;-END - If TOPPING3 = "Collagen" Then - Var CollagenState = "Enable" - Else - Var CollagenState = "Invisible" - Var ShowCollagenOnly = "Invisible" - EndIf + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "shot coffee 1008" Then + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" + + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1009" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" + + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "add-show-1101" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" + + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1102" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" + + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1103" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" + + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + If TOPPING2 = "add-show-1104" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" + + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + + If TOPPING2 = "add-show-1105" Then + + Var ShotCoffeePremium = "Enable" + Var showShotEnable = "Enable" + + Var text_price_topping = "(+฿" + toppingID2price2 + DEBUGVAR TOPPING2 + Refresh + EndIf + Var text_price_topping = text_price_topping + ")" + + ;-END + If TOPPING3 = "Collagen" Then + Var CollagenState = "Enable" + Else + Var CollagenState = "Invisible" + Var ShowCollagenOnly = "Invisible" + EndIf + + EndIf + ;topping_price_refresh = 0 SAVELOG ToppingGotoPayment If ToppingGotoPayment = "true" Then Topping "Select" SelectDrink ; Pack - Topping "Pack" Seeker.ExtendData + + 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 @@ -738,12 +1009,17 @@ ;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 @@ -837,14 +1113,219 @@ "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 + + + + + + + 986 160 20 blendedStateShow - Var( DirImage + "/bg_blended.png" ) @@ -852,7 +1333,7 @@ - showText7 + showText7 602 64 Var( DirImage + "/text7.png" ) - blendedStateTxt + blendedStateTxt 602 64 Var( DirImage + "/text5.png" ) @@ -948,7 +1429,7 @@ + + topping_shot_price_x + 2 + KanitRegularTTF + "Enable" + 36 + 0x84776F + "(+฿55)" + + + - -;-END -; -; -; -; -; -; -;; -; -; -; -; -; ; ; ; ;-BEGIN shot layout - + 986 - 280 - 20 - "Enable" - + "auto" +; "Enable" +; - 0 - 10 - Var( DirImage + "/block_top.png" ) - - - - 0 - 184 - Var( DirImage + "/block_bottom.png" ) + 0 + 0 + "ROOT/taobin_project/image/topping2/bg_top_oreo.png" ; - - - - - 0 - 68 - Var( DirImage + "/block_middle.png" ) - - - - 40 - 70 - Var( DirImage + "/img_shot_esp.png" ) - - - - - 0 - 140 - Var( DirImage + "/block_middle.png" ) - - - 40 - 142 - Var( DirImage + "/img_shot_esp.png" ) - +; + + showText4 + 602 + 4 + Var( DirImage + "/text4.png" ) + + + +; +; +; +; +; + + 986 + "auto" + "Enable" +; + + 0 + 0 + "ROOT/taobin_project/image/topping2/bg_top_oreo.png" + +; + + +; + + + + showText4 + 602 + 4 + Var( DirImage + "/text4.png" ) + + + +; +; +; +; +; +; + + + "Enable" + 986 + 27 + -5 + + "Enable" + "ROOT/taobin_project/image/topping2/bg_bottom.png" + + + + + + + ;-END ; ; @@ -1492,7 +2139,7 @@ - StrawDeactiveButton + StrawDeactiveButton 602 64 Var( DirImage + "/text20.png" ) @@ -1500,7 +2147,7 @@ - LidDeactiveButton + LidDeactiveButton 602 150 Var( DirImage + "/text21.png" ) @@ -1539,8 +2186,10 @@ 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 @@ -1599,7 +2248,9 @@ Topping "Select3-ID" topping3 ; Pack - Topping "Pack" Seeker.ExtendData + Topping "Pack" ExtendData + + Var Seeker.ExtendData = ExtendData If CART1_STATUS = "EMPTY" Then Cart "AddMenuID" 1 @@ -1636,10 +2287,18 @@ Var( DirImage + "/bp_next.png" ) "/mnt/sdcard/coffeevending/wav/click.wav" SoundVolume + ;Var Seeker = "curr" + If new_layout = "true" Then + ; Name , Descript + + EndIf + + + DEBUGVAR PriceDrinkTmp ;Var Seeker.PriceDrink = PriceDrinkTmp @@ -1648,6 +2307,75 @@ SAVELOG "USER press next ( topping ) - new" + If SugarState1 = "PressForever" Then + If ShiftSugarStep = 1 Then + Var topping1 = toppingID1index1 + EndIf + EndIf + + If SugarState2 = "PressForever" Then + If ShiftSugarStep = 1 Then + Var topping1 = toppingID1index2 + EndIf + If ShiftSugarStep = 2 Then + Var topping1 = toppingID1index1 + EndIf + + EndIf + + If SugarState3 = "PressForever" Then + If ShiftSugarStep = 1 Then + Var topping1 = toppingID1index3 + EndIf + If ShiftSugarStep = 2 Then + Var topping1 = toppingID1index2 + EndIf + If ShiftSugarStep = 3 Then + Var topping1 = toppingID1index1 + EndIf + + EndIf + + If SugarState3 = "PressForever" Then + If ShiftSugarStep = 1 Then + Var topping1 = toppingID1index3 + EndIf + If ShiftSugarStep = 2 Then + Var topping1 = toppingID1index2 + EndIf + If ShiftSugarStep = 3 Then + Var topping1 = toppingID1index1 + EndIf + + EndIf + + If SugarState4 = "PressForever" Then + If ShiftSugarStep = 1 Then + Var topping1 = toppingID1index4 + EndIf + If ShiftSugarStep = 2 Then + Var topping1 = toppingID1index3 + EndIf + If ShiftSugarStep = 3 Then + Var topping1 = toppingID1index2 + EndIf + + EndIf + + If SugarState5 = "PressForever" Then + If ShiftSugarStep = 1 Then + Var topping1 = toppingID1index5 + EndIf + If ShiftSugarStep = 2 Then + Var topping1 = toppingID1index4 + EndIf + If ShiftSugarStep = 3 Then + Var topping1 = toppingID1index3 + EndIf + + EndIf + + Var Seeker.topping1 = topping1 Var Seeker.topping2 = topping2 Var Seeker.topping3 = topping3 @@ -1665,27 +2393,33 @@ DEBUGVAR LidState DEBUGVAR StrawState DEBUGVAR UserSelectProductCode - DEBUGVAR HAVE_UV_DOOR_LID + ; DEBUGVAR HAVE_UV_DOOR_LID obsolete. - If HAVE_UV_DOOR_LID = "true" Then - If StrawState = "Press" Then - Machine StrawOrder - Var LedLidBlink = "true" - EndIf - - If LidState = "Press" Then - Machine LidOrder - Var LedLidBlink = "true" - EndIf - - Var StrawState = "Enable" - Var LidState = "Enable" - ; - + If StrawState = "Press" Then + Machine StrawOrder + Var LedLidBlink = "true" EndIf - Var SelectDrink = UserSelectProductCode + If LidState = "Press" Then + Machine LidOrder + Var LedLidBlink = "true" + EndIf + If SelectDrinkType = 0 Then + + Else + Var StrawState = "Enable" + Var LidState = "Enable" + EndIf + ; + + If RoadShow = "true" Then + Var SelectDrink = SaveSelectDrinkRoadShow + Else + Var SelectDrink = UserSelectProductCode + EndIf + + Var Seeker.selected_a_drink = UserSelectProductCode DEBUGVAR Seeker.selected_a_drink @@ -1701,16 +2435,47 @@ Topping "Select3-ID" topping3 ; Pack - Topping "Pack" Seeker.ExtendData + Topping "Pack" ExtendDataCurr + Else Topping "SetNextOrder" UserSelectProductCode + + + Topping "__select" UserSelectProductCode + ; Set option toppinng and pack + Topping "__select1-id" topping1 + Topping "__select2-id" topping2 + Topping "__select3-id" topping3 + ; Pack + Topping "__pack" ExtendDataNext + + Var NextUserSelectDrinkFromPaid = UserSelectProductCode + Var NextUserSelecttopping1Paid = topping1 + Var NextUserSelecttopping2Paid = topping2 + Var NextUserSelecttopping3Paid = topping3 + + + EndIf + DEBUGVAR Seeker + DEBUGVAR Seeker.ExtendData Var Seeker.PictureDrink = PictureDrink Var Seeker.showname = showname + DEBUGVAR MenuCautionImageStage0 + DEBUGVAR CustomerFilterEnable + DEBUGVAR CustomerFilterType + If CART_COUNT = 0 Then - Open "ROOT/taobin_project/xml/page_payment.xml" + If SelectDrinkType = 1 Then + OpenInst 1 "/mnt/sdcard/coffeevending/taobin_project/xml/page_blank.xml" + Open "ROOT/taobin_project/xml/page_payment.xml" + EndIf + + If SelectDrinkType = 0 Then + Var high_light_drink_type = "Enable" + EndIf Else If CART1_STATUS = "EMPTY" Then @@ -1729,6 +2494,8 @@ Var ButtonNext = "true" EndIf + + @@ -1767,6 +2534,11 @@ EndIf EndIf + If RoadShow = "true" Then + Var PriceDrinkTmp = "Free" + Var SaveSelectDrinkRoadShow = UserSelectProductCode + EndIf + DEBUGVAR UserSelectProductCode @@ -1816,6 +2588,237 @@ + + + + + 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 + + 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 + + EndIf + + If blend_button_state = "PressForever" Then + Var PriceDrinkNoTop = PriceD3 + Var UserSelectProductCode = PD_CODE3 + + Var showShotEnable = "Disable" + 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 + + EndIf + + + DEBUGVAR PriceDrinkNoTop + DEBUGVAR PriceDiff + DEBUGVAR showShotEnable + + + 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 + + DEBUGVAR SelectDrinkType + + DEBUGVAR showShotEnable + DEBUGVAR blendedState + + Var PriceDrinkTmp = PriceDrinkNoTop + TOPPING_PRICE + Var PriceDrinkTmpShow = charOfBaht + PriceDrinkTmp + + If SelectDrinkType = 0 Then + Var PriceDrinkTmpShow = "---" + EndIf + SAVELOG PriceDrinkTmp + + + CRLFToSpace showname + CRLFToSpace showdesc + DEBUGVAR showname + DEBUGVAR showdesc + + + Var Timeout = 0 + RefreshAll + + + + + 924 1804 @@ -1829,4 +2832,149 @@ PriceDrinkTmpShow + + + 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 + ) + + + + 543 + 20 + KanitTTF + 36 + 1080 + 0xFF0000 + "File 5" + + + +; +