diff --git a/xml/function2.inc b/xml/function2.inc new file mode 100644 index 00000000..93e56be2 --- /dev/null +++ b/xml/function2.inc @@ -0,0 +1,846 @@ + + Var fun = "function2" + DEBUGVAR fun + 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" + If PD_CODE2 = "12-05-02-0016" Then + Var img_cold = "/bt_normal_no.png" + Var img_cold_sel = "/bt_normal_selected_no.png" + Var img_cold_dis = "/bt_cold_disable_no.png" + Var img_cold_dis2 = "/bt_cold_disable2_no.png" + EndIf + 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" + If PD_CODE2 = "12-05-02-0016" Then + Var img_cold = "/bt_normal_no.png" + Var img_cold_sel = "/bt_normal_selected_no.png" + Var img_cold_dis = "/bt_cold_disable_no.png" + Var img_cold_dis2 = "/bt_cold_disable2_no.png" + EndIf + + + 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 + If CustomCoffeeEnable = "False" Then + Var showShotEnable = "Enable" + EndIf + EndIf + + If showCustomCoffee = "Invisible" Then + If CustomCoffeeEnable = "True" Then + Var showCustomCoffee = "Enable" + EndIf + EndIf + + Var showText4 = "Invisible" + + If ENABLE_LANGUAGE_COUNT > 2 Then + Var showname = NameLang[0][LanguageShowByIndex] + Var showdesc = DescLang[0][LanguageShowByIndex] + Else + 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 + EndIf + + Var Seeker.NameDrinkEN = menu_name_eng_hot + Var Seeker.NameDrinkTH = menu_name_thai_hot + + 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 OriginalPrice = OriginalPriceD2 + Var UserSelectProductCode = PD_CODE2 + + If showShotEnable = "Disable" Then + If CustomCoffeeEnable = "False" Then + Var showShotEnable = "Enable" + EndIf + EndIf + + If showCustomCoffee = "Invisible" Then + If CustomCoffeeEnable = "True" Then + Var showCustomCoffee = "Enable" + EndIf + EndIf + + Var showText4 = "Invisible" + + If ENABLE_LANGUAGE_COUNT > 2 Then + Var showname = NameLang[1][LanguageShowByIndex] + Var showdesc = DescLang[1][LanguageShowByIndex] + Else + 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 + EndIf + + Var Seeker.NameDrinkEN = menu_name_eng_cold + Var Seeker.NameDrinkTH = menu_name_thai_cold + + 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 OriginalPrice = OriginalPriceD3 + Var UserSelectProductCode = PD_CODE3 + + If showShotEnable = "Invisible" Then + + Else + Var showShotEnable = "Disable" + EndIf + + If CustomCoffeeEnable = "True" Then + Var showCustomCoffee = "Enable" + Var showCoffeeWater = "Invisible" + + Var CurrentCoffeeWaterId = toppingID7Default + Var CustomCoffeeWaterState[0] = "Enable" + Var CustomCoffeeWaterState[1] = "PressForever" + Var CustomCoffeeWaterState[2] = "Enable" + Var CustomCoffeeWaterState[3] = "Enable" + Var CustomCoffeeWaterState[4] = "Enable" + EndIf + + Var showText4 = "Enable" + + If ENABLE_LANGUAGE_COUNT > 2 Then + Var showname = NameLang[2][LanguageShowByIndex] + Var showdesc = DescLang[2][LanguageShowByIndex] + Else + SAVELOG "Enable lang < 2" + DEBUGVAR ENABLE_LANGUAGE_COUNT + 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 + EndIf + + Var Seeker.NameDrinkEN = menu_name_eng_blender + Var Seeker.NameDrinkTH = menu_name_thai_blender + + Var text_hot_color = "0x84776F" + Var text_cold_color = "0x84776F" + Var text_blender_color = "0xFFFFFF" + + Var SelectDrinkType = 1 + + Machine PreparCup + EndIf + + Var OatMilkAddAmount = 5 + Var CerealMilkPrice = "(+฿5)" + + Var OreoPrice = 10 + Var CocoaPrice = 10 + Var OvaltinePrice = 10 + Var StrawberryPrice = 5 + Var YuzuPrice = 5 + Var MilkIncreasePrice = 5 + Var TaiwaneseTeaIncreasePrice = 5 + + Var EnergyPriceLevel1 = 5 + Var EnergyPriceLevel2 = 10 + + Var CoffeePriceLevel1 = 15 + Var CoffeePriceLevel2 = 25 + + Var OreoPriceText = "(+10)" + Var CocoaPriceText = "(+10)" + Var OvaltinePriceText = "(+10)" + Var StrawberryPriceText = "(+5)" + Var YuzuPriceText = "(+5)" + Var MilkIncreasePriceText = "(+5)" + Var TaiwaneseTeaIncreasePriceText = "(+5)" + Var CollagenPriceText = "(Free)" + + Var EnergyTextLevel1 = "(+5)" + Var EnergyTextLevel2 = "(+10)" + + Var CoffeeTextLevel1 = "(+15)" + Var CoffeeTextLevel2 = "(+25)" + + + + Var CerealMilkAddAmount = SubMenuPrice1 - PriceDrinkNoTop + + If CerealMilkAddAmount = 0 Then + Var CerealMilkPrice = "(+฿10)" + + Else + Var CerealMilkPrice = "(+฿" + CerealMilkAddAmount + Var CerealMilkPrice = CerealMilkPrice + ")" + + Var CerealMilkPrice = "(+฿10)" + EndIf + + DEBUGVAR SubMenuPrice1 + 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 + + ; Post Topping + If SugarZeroCalEnable = "true" Then + Var sugarToppingID = 1000 + If SugarZeroCalCheck = "PressForever" Then + Var sugarToppingID = 1001 + Else + Var sugarToppingID = 1000 + EndIf + EndIf + + + If SugarZeroCalEnable = "true" Then + If SugarZeroCalOption = "Enable" Then + If SugarZeroCalCheck = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + SugarZeroCalPrice + Var Seeker.UseFreeSugarZeroCalTopping = 1 + Else + Var Seeker.UseFreeSugarZeroCalTopping = 0 + EndIf + EndIf + EndIf + + DEBUGVAR showOreoAddEnable + DEBUGVAR TOPPING_PRICE + + ; Oreo + Var strMulti6_1 = "TPID:321+multiply:0" + ; Ovaltine + Var strMulti6_2 = "TPID:323+multiply:0" + ; Coaco + Var strMulti6_3 = "TPID:322+multiply:0" + + Var strMulti6_4 = "" + + Var strMulti6_5 = "TPID=324,multiply=0" + + + ; light-milk + Var strMulti11_1 = "TPID:541+multiply:0" + ; normal-milk + Var strMulti11_2 = "TPID:542+multiply:0" + ; rich-milk + Var strMulti11_3 = "TPID:543+multiply:0" + ; normal-taiwanese-tea + Var strMulti11_4 = "TPID:546+multiply:0" + ; rich-taiwanese-tea + Var strMulti11_5 = "TPID:547+multiply:0" + + + If showOreoAddEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + OreoPrice + Var strMulti6_1 = "TPID=321,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + + ;Var PriceDrinkTmp = PriceDrinkNoTop + + Var strMulti6_1 = "TPID=320,multiply=0" + + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + + EndIf + + + If showOvaltineEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + OvaltinePrice + ;Var topping6 = toppingID6index5 + Var strMulti6_2 = "TPID=323,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + ;Var PriceDrinkTmp = PriceDrinkNoTop + + Var strMulti6_2 = "TPID=320,multiply=0" + + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + + EndIf + + If showCocoaEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + CocoaPrice + ;Var topping6 = toppingID6index3 + Var strMulti6_3 = "TPID=322,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + + ;Var PriceDrinkTmp = PriceDrinkNoTop + + Var strMulti6_3 = "TPID=320,multiply=0" + + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + + EndIf + + If CustomMilkState[0] = "PressForever" Then + Var strMulti11_1 = "TPID=541,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + Var strMulti11_1 = "TPID=542,multiply=0" + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + EndIf + + If CustomMilkState[1] = "PressForever" Then + Var strMulti11_2 = "TPID=542,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + Var strMulti11_2 = "TPID=542,multiply=0" + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + EndIf + + If CustomMilkState[2] = "PressForever" Then + Var strMulti11_3 = "TPID=543,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + Var strMulti11_3 = "TPID=542,multiply=0" + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + EndIf + + If CustomTaiwaneseTeaState[0] = "PressForever" Then + Var strMulti11_4 = "TPID=546,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + Var strMulti11_4 = "TPID=546,multiply=0" + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + EndIf + + If CustomTaiwaneseTeaState[1] = "PressForever" Then + Var strMulti11_5 = "TPID=547,multiply=1" + Var DisableUsingCode = "true" + DEBUGVAR DisableUsingCode + Else + Var strMulti11_5 = "TPID=547,multiply=0" + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + EndIf + + + If CustomTaiwaneseTeaState[1] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + TaiwaneseTeaIncreasePrice + EndIf + + If CustomMilkState[2] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + MilkIncreasePrice + EndIf + + If CustomEnergyState[0] = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + EnergyPriceLevel1 + Var topping12 = toppingID12index2 + Else + If CustomEnergyState[1] = "Press" Then + + Else + Var topping12 = toppingID12index1 + EndIf + EndIf + + + If CustomEnergyState[1] = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + EnergyPriceLevel2 + Var topping12 = toppingID12index3 + Else + If CustomEnergyState[0] = "Press" Then + + Else + Var topping12 = toppingID12index1 + EndIf + EndIf + + If showShotEnableSoda = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + CoffeePriceLevel1 + EndIf + + + If CollagenState = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + CollagenToppingPrice + Var topping3 = toppingID3index2 + Var Seeker.UseFreeCollagenTopping = 1 + Else + Var topping3 = toppingID3index1 + Var Seeker.UseFreeCollagenTopping = 0 + EndIf + + + + If CerealMilkEnable = "Press" Then + If MenuCodeName1 = "Cereal-Milk" Then + Var TOPPING_PRICE = TOPPING_PRICE + CerealMilkAddAmount + Var DisableUsingCode = "true" + Var UserSelectProductCode = SubMenuProductCode1 + EndIf + + Else + + EndIf + + If showStrawberryEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + StrawberryPrice + If TOPPING6 = "all-volcano" Then + Var strMulti6_5 = "TPID=324,multiply=1" + EndIf + + If TOPPING6 = "syrup-topping" Then + Var strMulti6_5 = "TPID=91,multiply=1" + EndIf + + Var DisableUsingCode = "true" + Else + + + If TOPPING6 = "all-volcano" Then + Var strMulti6_5 = "TPID=320,multiply=1" + EndIf + + If TOPPING6 = "syrup-topping" Then + Var strMulti6_5 = "TPID=90,multiply=1" + EndIf + + + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + + EndIf + + + If showYuzuEnable = "Press" Then + Var TOPPING_PRICE = TOPPING_PRICE + YuzuPrice + If TOPPING6 = "all-volcano" Then + Var strMulti6_6 = "TPID=325,multiply=1" + EndIf + If TOPPING6 = "syrup-topping" Then + Var strMulti6_6 = "TPID=92,multiply=1" + EndIf + Var DisableUsingCode = "true" + Else + + + If TOPPING6 = "all-volcano" Then + Var strMulti6_6 = "TPID=320,multiply=1" + EndIf + If TOPPING6 = "syrup-topping" Then + Var strMulti6_6 = "TPID=90,multiply=1" + EndIf + + Var DisableUsingCode = "false" + DEBUGVAR DisableUsingCode + + EndIf + + + Var CustomCoffeeDefault = "true" + DEBUGVAR showCustomCoffee + DEBUGVAR CustomCoffeeDefault + + If showShotEnable = "Press" Then + ; Invisible showCustomCoffee + Var showCustomCoffee = "Invisible" + Else + If CustomCoffeeEnable = "True" Then + Var showCustomCoffee = "Enable" + EndIf + EndIf + + If showShotEnable = "Disable" Then + If showShotNormal = "Enable" Then + Var showShotNormal = "Press" + EndIf + EndIf + + If showCustomCoffee = "Enable" Then + + If showCoffeeWater = "Enable" Then + If CurrentCoffeeWaterId = toppingID7Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + If showCoffeeQuantity = "Enable" Then + If CurrentCoffeeQuantityId = toppingID2Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + If showCoffeeLevel = "Enable" Then + If CurrentCoffeeLevelId = toppingID9Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + If showCoffeeTamping = "Enable" Then + If CurrentCoffeeTampingId = toppingID8Default Then + Else + Var CustomCoffeeDefault = "false" + EndIf + EndIf + + DEBUGVAR CustomCoffeeDefault + If CustomCoffeeDefault = "false" Then + If showShotEnable = "Enable" Then + ;Var showShotEnable = "Disable" + EndIf + Else + If showShotEnable = "Invisible" Then + + Else + If blend_button_state = "PressForever" Then + Else + Var showShotEnable = "Enable" + EndIf + EndIf + EndIf + + + If CustomCoffeeQuantityState[0] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price1 + EndIf + If CustomCoffeeQuantityState[1] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price3 + EndIf + If CustomCoffeeQuantityState[2] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID2price4 + EndIf + + If CustomCoffeeLevelState[0] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID9price1 + EndIf + If CustomCoffeeLevelState[1] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID9price2 + EndIf + If CustomCoffeeLevelState[2] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID9price3 + EndIf + If CustomCoffeeLevelState[3] = "PressForever" Then + Var TOPPING_PRICE = TOPPING_PRICE + toppingID9price4 + EndIf + + EndIf + + + DEBUGVAR SelectDrinkType + + DEBUGVAR showShotEnable + DEBUGVAR PriceDrinkTmpShow + + + 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 PriceDrinkTmpShow = "Free" + + DEBUGVAR SelectDrink2 + DEBUGVAR PriceDrinkTmpShow + EndIf + + + ; echo -n true > /mnt/sdcard/coffeevending/menu_blend_free + + READ_FILE "/mnt/sdcard/coffeevending/menu_blend_free" menu_blend_free + DEBUGVAR menu_blend_free + DEBUGVAR blend_button_state + + If menu_blend_free = "true" Then + If blend_button_state = "PressForever" Then + Var PriceDrinkNoTop = 0 + Var PriceDrinkTmpShow = "Free" + EndIf + EndIf + + If SugarZeroCalCheck = "PressForever" Then + If SugarNormalCheck = "PressForever" Then + Var SugarZeroCalCheck = "Enable" + EndIf + EndIf + + If SelectDrinkType = 0 Then + If ENABLE_LANGUAGE_COUNT > 2 Then + Var showname = aliasName[LanguageShowByIndex] + Var showdesc = aliasName[LanguageShowByIndex] + Else + If show_eng = "true" Then + Var showname = NameDrink + Var showdesc = DrinkDescription + Else + Var showname = NameDrinkTH + Var showdesc = DrinkDescriptionTH + EndIf + EndIf + EndIf + + + + BackslashNToEnter showname + BackslashNToEnter showdesc + CRLFToSpace showname + CRLFToSpace showdesc + DEBUGVAR showname + DEBUGVAR showdesc + + Strlen showname show_name_len + + Var hasPress = "false" + + If CustomOreoState = "Enable" Then + If CustomOreoCheckState = "Press" Then + Var hasPress = "true" + EndIf + EndIf + + If CustomOvaltineState = "Enable" Then + If CustomOvaltineCheckState = "Press" Then + Var hasPress = "true" + EndIf + EndIf + + If CustomCocoaState = "Enable" Then + If CustomCocoaCheckState = "Press" Then + Var hasPress = "true" + EndIf + EndIf + + If hasPress = "true" Then + Var PopupToppingSelect = "Press" + If show_eng = "true" Then + Var bnAccept = "ROOT/taobin_project/image/topping2_en/topping_revamp/bn_accept.png" + Var bpAccept = "ROOT/taobin_project/image/topping2_en/topping_revamp/bp_accept.png" + Else + Var bnAccept = "ROOT/taobin_project/image/topping2/topping_revamp/bn_accept.png" + Var bpAccept = "ROOT/taobin_project/image/topping2/topping_revamp/bp_accept.png" + EndIf + If LanguageShow = "MYANMAR" Then + Var bnAccept = "ROOT/taobin_project/image/topping_revamp_mmr/bn_accept2.png" + Var bpAccept = "ROOT/taobin_project/image/topping_revamp_mmr/bp_accept2.png" + EndIf + If LanguageShow = "MSC" Then + Var bnAccept = "ROOT/taobin_project/image/topping_revamp_msc/bn_accept2.png" + Var bpAccept = "ROOT/taobin_project/image/topping_revamp_msc/bp_accept2.png" + EndIf + Var bnAcceptX = 445 + Else + Var PopupToppingSelect = "Enable" + If show_eng = "true" Then + Var bnAccept = "ROOT/taobin_project/image/topping2_en/topping_revamp/bn_accept2.png" + Var bpAccept = "ROOT/taobin_project/image/topping2_en/topping_revamp/bp_accept2.png" + Else + Var bnAccept = "ROOT/taobin_project/image/topping2/topping_revamp/bn_accept2.png" + Var bpAccept = "ROOT/taobin_project/image/topping2/topping_revamp/bp_accept2.png" + EndIf + If LanguageShow = "MYANMAR" Then + Var bnAccept = "ROOT/taobin_project/image/topping_revamp_mmr/bn_accept2.png" + Var bpAccept = "ROOT/taobin_project/image/topping_revamp_mmr/bp_accept2.png" + EndIf + If LanguageShow = "MSC" Then + Var bnAccept = "ROOT/taobin_project/image/topping_revamp_msc/bn_accept2.png" + Var bpAccept = "ROOT/taobin_project/image/topping_revamp_msc/bp_accept2.png" + EndIf + Var bnAcceptX = 360 + EndIf + + + Var Timeout = 0 + + RefreshAll + + \ No newline at end of file diff --git a/xml/page_topping_select8.xml b/xml/page_topping_select8.xml index 6fc030c8..cce629bd 100644 --- a/xml/page_topping_select8.xml +++ b/xml/page_topping_select8.xml @@ -692,8 +692,7 @@ Var LidDeactiveButton = "Invisible" Var StrawDeactiveButton = "Invisible" - Machine DoorClose - Machine DoorLidClose + ;include="ROOT/taobin_project/inc/door_initial_state.inc" Var ButtonNext = "false" @@ -734,7 +733,7 @@ EndIf - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" Else Var show_select_type = "Invisible" @@ -1354,7 +1353,7 @@ Else If MachineSpiralStage = "spiral-valid" Then - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" Var SpiralReady = 1 Else ; Verify error @@ -1678,10 +1677,7 @@ DEBUGVAR text_lines - Function 2 - - - RefreshAll + TRY "ROOT/taobin_project/xml/function2.inc" @@ -1699,154 +1695,7 @@ - DEBUGVAR MAT_ID_9701 - DEBUGVAR MAT_ID_9601 - DEBUGVAR MAT_ID_1215 - - 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 TOPPING7 - DEBUGVAR TOPPING8 - DEBUGVAR TOPPING9 - DEBUGVAR TOPPING10 - DEBUGVAR TOPPING11 - DEBUGVAR TOPPING11_EXT_1 - DEBUGVAR TOPPING11_EXT_2 - DEBUGVAR TOPPING12 - DEBUGVAR TOPPING13 - - 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 - - DEBUGVAR toppingID6index1 - DEBUGVAR toppingID6index2 - DEBUGVAR toppingID6index3 - DEBUGVAR toppingID6index4 - DEBUGVAR toppingID6index5 - DEBUGVAR toppingID6index6 - - DEBUGVAR toppingID6index1Status - DEBUGVAR toppingID6index2Status - DEBUGVAR toppingID6index3Status - DEBUGVAR toppingID6index4Status - DEBUGVAR toppingID6index5Status - DEBUGVAR toppingID6index6Status - - DEBUGVAR toppingID7index1 - DEBUGVAR toppingID7index2 - DEBUGVAR toppingID7index3 - DEBUGVAR toppingID7index4 - DEBUGVAR toppingID7index5 - - DEBUGVAR toppingID8index1 - DEBUGVAR toppingID8index2 - DEBUGVAR toppingID8index3 - - DEBUGVAR toppingID9index1 - DEBUGVAR toppingID9index2 - DEBUGVAR toppingID9index3 - DEBUGVAR toppingID9index4 - - DEBUGVAR toppingID10index1 - DEBUGVAR toppingID10index2 - DEBUGVAR toppingID10index3 - - DEBUGVAR toppingID11index1 - DEBUGVAR toppingID11index2 - DEBUGVAR toppingID11index3 - DEBUGVAR toppingID11index4 - DEBUGVAR toppingID11index5 - DEBUGVAR toppingID11index6 - - DEBUGVAR toppingID12index1 - DEBUGVAR toppingID12index2 - DEBUGVAR toppingID12index3 - - DEBUGVAR toppingID12index1Status - DEBUGVAR toppingID12index2Status - DEBUGVAR toppingID12index3Status - - DEBUGVAR toppingID13index1 - DEBUGVAR toppingID13index2 - DEBUGVAR toppingID13index3 - - DEBUGVAR toppingID13index1Status - DEBUGVAR toppingID13index2Status - DEBUGVAR toppingID13index3Status - - If toppingID1index5 > 0 Then - SAVELOG "toppingID1index5 not set" - EndIf - - - - - - DEBUGVAR toppingID1Default - DEBUGVAR toppingID2Default - DEBUGVAR toppingID3Default - - DEBUGVAR toppingID7Default - DEBUGVAR toppingID8Default - DEBUGVAR toppingID9Default - DEBUGVAR toppingID10Default - - - DEBUGVAR MenuCodeName1 - DEBUGVAR MenuCodeName2 - DEBUGVAR SubMenuOnTop1 - DEBUGVAR SubMenuOnTop2 - DEBUGVAR SubMenuOnTop3 - DEBUGVAR SubMenuProductCode1 - DEBUGVAR SubMenuProductCode2 - DEBUGVAR SubMenuProductCode3 - - - DEBUGVAR toppingID2price1 - DEBUGVAR toppingID2price2 - DEBUGVAR toppingID2price3 - DEBUGVAR toppingID2price4 - DEBUGVAR toppingID3price2 - DEBUGVAR toppingID6price2 - - DEBUGVAR toppingID8price1 - DEBUGVAR toppingID8price2 - DEBUGVAR toppingID8price3 - - DEBUGVAR toppingID9price1 - DEBUGVAR toppingID9price2 - DEBUGVAR toppingID9price3 - DEBUGVAR toppingID9price4 - - - DEBUGVAR BrewParam - DEBUGVAR UserSeletedSugar - DEBUGVAR showOvaltineEnable If BugFlag = 1 Then @@ -4195,7 +4044,7 @@ EndIf - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf @@ -5422,7 +5271,7 @@ Var SugarNormalCheck = "PressForever" EndIf - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf @@ -5456,7 +5305,7 @@ Var SugarZeroCalCheck = "PressForever" EndIf - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf @@ -6141,7 +5990,7 @@ DEBUGVAR SugarZeroCalCheck - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf DEBUGVAR topping1 @@ -6745,7 +6594,7 @@ Var SugarNormalCheck = "PressForever" EndIf - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf @@ -6779,7 +6628,7 @@ Var SugarZeroCalCheck = "PressForever" EndIf - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf @@ -6933,9 +6782,9 @@ Var UserSeletedSugar = 1 EndIf - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" - Refresh + @@ -7143,8 +6992,7 @@ Var topping11 = toppingID11index1 - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -7169,8 +7017,7 @@ Var topping11 = toppingID11index2 - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -7194,8 +7041,7 @@ Var topping11 = toppingID11index3 - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -7279,8 +7125,7 @@ Var topping11_2 = toppingID11index4 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -7307,8 +7152,7 @@ Var topping11_2 = toppingID11index5 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -7417,7 +7261,7 @@ Var SugarZeroCalCheck = "Disable" EndIf Var UserSeletedSugar = 1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf @@ -7779,9 +7623,7 @@ Var UserSeletedSugar = 1 EndIf - Function 2 - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8059,10 +7901,10 @@ EndIf Var UserSeletedSugar = 1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" EndIf - Refresh + @@ -8122,9 +7964,7 @@ Var UserSeletedSugar = 1 EndIf - Function 2 - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8424,7 +8264,7 @@ Var showShotEnable = "Enable" SAVELOG "esp shot ignore" - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8447,7 +8287,7 @@ SAVELOG "Espresso Shot add" - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8554,7 +8394,7 @@ Var showShotEnable = "Enable" SAVELOG "esp shot ignore" - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8577,7 +8417,7 @@ SAVELOG "Espresso Shot add" - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8654,9 +8494,7 @@ Var showShotEnableSoda = "Enable" - Function 2 - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8694,10 +8532,7 @@ - - - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8793,12 +8628,7 @@ - - - Function 2 - - Refresh - + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8829,13 +8659,7 @@ Var CustomEnergyState[3] = "Enable" - - - - Function 2 - - Refresh - + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8866,13 +8690,7 @@ Var CustomEnergyState[0] = "Enable" Var CustomEnergyState[3] = "Enable" - - - - Function 2 - - Refresh - + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8949,7 +8767,7 @@ Var CurrentCoffeeQuantityId = toppingID8index1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8973,7 +8791,7 @@ Var CurrentCoffeeQuantityId = toppingID8index2 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -8996,7 +8814,7 @@ Var CurrentCoffeeQuantityId = toppingID8index3 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9063,7 +8881,7 @@ Var CurrentCoffeeQuantityId = toppingID8index1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9087,7 +8905,7 @@ Var CurrentCoffeeQuantityId = toppingID8index2 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9110,7 +8928,7 @@ Var CurrentCoffeeQuantityId = toppingID8index3 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9188,8 +9006,7 @@ Var topping11 = toppingID11index1 - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9214,8 +9031,7 @@ Var topping11 = toppingID11index2 - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9239,8 +9055,7 @@ Var topping11 = toppingID11index3 - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9396,7 +9211,7 @@ Var CurrentCoffeeWaterId = toppingID7index1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9421,7 +9236,7 @@ Var CurrentCoffeeWaterId = toppingID7index2 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9447,7 +9262,7 @@ Var CurrentCoffeeWaterId = toppingID7index3 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9473,7 +9288,7 @@ Var CurrentCoffeeWaterId = toppingID7index4 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9498,7 +9313,7 @@ Var CurrentCoffeeWaterId = toppingID7index5 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9597,7 +9412,7 @@ Var CurrentCoffeeQuantityId = toppingID8index1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9621,7 +9436,7 @@ Var CurrentCoffeeQuantityId = toppingID8index2 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9644,7 +9459,7 @@ Var CurrentCoffeeQuantityId = toppingID8index3 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9744,7 +9559,7 @@ Var CurrentCoffeeLevelId = toppingID9index1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9769,7 +9584,7 @@ Var CurrentCoffeeLevelId = toppingID9index2 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9794,7 +9609,7 @@ Var CurrentCoffeeLevelId = toppingID9index3 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9820,7 +9635,7 @@ Var CurrentCoffeeLevelId = toppingID9index4 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9922,7 +9737,7 @@ Var CurrentCoffeeTampingId = toppingID8index1 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9945,7 +9760,7 @@ Var CurrentCoffeeTampingId = toppingID8index2 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -9970,7 +9785,7 @@ Var CurrentCoffeeTampingId = toppingID8index3 - Function 2 + TRY "ROOT/taobin_project/xml/function2.inc" @@ -10173,8 +9988,8 @@ Var SelectToppingType = 0 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" + @@ -10247,8 +10062,7 @@ Var SelectToppingType = 0 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -10384,8 +10198,8 @@ Var SelectToppingType = 0 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" + @@ -10462,8 +10276,7 @@ Var SelectToppingType = 0 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -10579,8 +10392,7 @@ Var SelectToppingType = 0 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -10669,8 +10481,7 @@ Var SelectToppingType = 0 EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -10729,9 +10540,7 @@ Var CollagenState = "Press" EndIf - Function 2 - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -10762,11 +10571,7 @@ Var CollagenState = "Press" EndIf - Function 2 - - - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -11097,9 +10902,7 @@ Var SelectSyrupType = 1 - Function 2 - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -11186,10 +10989,8 @@ Var SelectSyrupType = 1 + TRY "ROOT/taobin_project/xml/function2.inc" - Function 2 - - Refresh @@ -11320,9 +11121,7 @@ Var SelectSyrupType = 1 - Function 2 - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -11413,9 +11212,7 @@ Var SelectSyrupType = 1 - Function 2 - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -11541,6 +11338,7 @@ SoundVolume + SAVELOG " ========== NEXT ===========" ;include="ROOT/taobin_project/inc/button_topping_select_confirm_order.inc" @@ -11572,7 +11370,7 @@ "/mnt/sdcard/coffeevending/wav/click.wav" SoundVolume - + SAVELOG " ========== SPECIAL ===========" ;include="ROOT/taobin_project/inc/button_topping_select_confirm_order.inc" @@ -11987,6 +11785,11 @@ ; Coaco Var strMulti6_3 = "TPID:322+multiply:0" + Var strMulti6_4 = "" + + Var strMulti6_5 = "TPID=324,multiply=0" + + ; light-milk Var strMulti11_1 = "TPID:541+multiply:0" ; normal-milk @@ -12309,12 +12112,6 @@ 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 @@ -12593,8 +12390,7 @@ EndIf EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -12697,8 +12493,7 @@ EndIf EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -12806,8 +12601,7 @@ EndIf - Function 2 - Refresh + TRY "ROOT/taobin_project/xml/function2.inc" @@ -12919,11 +12713,7 @@ Var high_light_drink_type = "Invisible" - Function 2 - - - Refresh - + TRY "ROOT/taobin_project/xml/function2.inc" @@ -12957,10 +12747,7 @@ Var PriceDrinkNoTop = PriceD2 - Function 2 - - - Refresh + TRY "ROOT/taobin_project/xml/function2.inc"