MYS: add block order button

This commit is contained in:
Pakin 2025-01-31 17:09:33 +07:00
parent 0c29ed34f3
commit 15a455f124

View file

@ -11,6 +11,13 @@
SAVELOG "Event Open Select 6 MYS"
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
@ -341,6 +348,9 @@
Var toppingScriptDir = CountryRootPath + "/xml/topping_scripts"
Var chg_price_ev = toppingScriptDir + "/chg_price_event.ev"
Var MenuReason = ""
Var MenuReasonStage = "Invisible"
</EventOpen>
<Timeout> 1000 </Timeout>
@ -348,6 +358,38 @@
DEBUGVAR Timeout
If CLOSE_ORDER_NOW = "true" Then
;include="ROOT/taobin_project/inc/return_condition.ev"
EndIf
If NoWaitMachineEnable = 1 Then
DEBUGVAR MachineStage
DEBUGVAR ConfirmDrinkButtonState
If MachineStage = "close-maintenance" Then
Var ConfirmDrinkButtonState = "Enable"
If stop_now = "true" Then
SAVELOG "stop_now is true mys/page_topping_select6.lxml"
;include="ROOT/taobin_project/inc/return_condition.ev"
EndIf
Else
Var ConfirmDrinkButtonState = "Invisible"
EndIf
EndIf
If CLOSE_ORDER_NOW = "true" Then
SAVELOG "DEACTIVE in mys/page_topping_select6.lxml"
;include="ROOT/taobin_project/inc/return_condition.ev"
EndIf
If SELLSTATUS = "DEACTIVE" Then
SAVELOG "DEACTIVE in mys/page_topping_select6.lxml"
;include="ROOT/taobin_project/inc/return_condition.ev"
EndIf
Var Timeout = Timeout + 1
If Timeout > 40 Then
@ -381,6 +423,70 @@
EndIf
EndIf
DEBUGVAR MenuReason
; arm-not-ready
; brew-stg
; door-cup-alert
; stop-now-set
If show_eng = "true" Then
If MACHINE_SELF_TEST_COUNT_DOWN > 0 Then
Var ShowTextSelfTestCountDown = "Please wait a moment (" + MACHINE_SELF_TEST_COUNT_DOWN
Var ShowTextSelfTestCountDown = ShowTextSelfTestCountDown + ")"
Else
Var ShowTextSelfTestCountDown = "Please wait a moment"
EndIf
Else
If MACHINE_SELF_TEST_COUNT_DOWN > 0 Then
Var ShowTextSelfTestCountDown ="กรุณารอสักครู่ (" + MACHINE_SELF_TEST_COUNT_DOWN
Var ShowTextSelfTestCountDown = ShowTextSelfTestCountDown + ")"
Else
Var ShowTextSelfTestCountDown ="กรุณารอสักครู่"
EndIf
EndIf
If Seeker = "curr" Then
If MenuReason = "arm-not-ready" Then
SAVELOG "goto mode arm-not-ready"
DEBUGVAR DoorCupPosition
If DoorCupPosition = "bottom" Then
Machine RemoveCup
Machine DoorLidOpen
Else
Var TextSelfTestCntColor = "0x513C2F"
Var ConfirmDrinkButtonState = "Enable"
If show_eng = "true" Then
Var ShowTextSelfTestCountDown = "Please take out the glass."
Else
Var ShowTextSelfTestCountDown = "กรุณานําแก้วออก"
EndIf
EndIf
EndIf
EndIf
If MenuReason = "brew-stg" Then
Var ConfirmDrinkButtonState = "Enable"
If Timeout > 15 Then
Var MenuReason = "-"
Var Timeout = 0
Var ConfirmDrinkButtonState = "Invisible"
EndIf
EndIf
If MenuReason = "-" Then
Else
Var MenuReasonString = MenuReason
Var MenuReasonStage = "Enable"
EndIf
Refresh
TimerReset
</EventTimeout>
@ -4150,6 +4256,44 @@
<Value> PriceDrinkTmpShow </Value>
</Text>
; next2 button Protect
<Button>
<State> ConfirmDrinkButtonState </State>
<X> 548 </X>
<Y> 1785 </Y>
<Filename> "ROOT/taobin_project/image/topping/topping2/bd_next2.png"</Filename>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<Text>
<State> ConfirmDrinkButtonState </State>
<X> 0 </X>
<Y> 18 </Y>
<Align> Center </Align>
<Width> 512 </Width>
<Font> KanitTTF </Font>
<Size> 36 </Size>
<Color> TextSelfTestCntColor </Color>
<Value> ShowTextSelfTestCountDown </Value>
</Text>
<EventClick>
If Seeker = "curr" Then
If MenuReason = "arm-not-ready" Then
Machine RemoveCup
Machine DoorLidOpen
EndIf
EndIf
</EventClick>
</Button>
<Image>
<X> 0 </X>
<Y> 380 </Y>
@ -4277,6 +4421,29 @@
</Language>
</Text>
<Text>
<X> 1 </X>
<Y> 1 </Y>
<Font> KanitTTF </Font>
<Size> 22 </Size>
<Width> 1080 </Width>
<Align> end </Align>
<Color> 0xFF0000 </Color>
<Value> "#71"</Value>
</Text>
<Text>
<X> 0 </X>
<Y> 1888 </Y>
<State> MenuReasonStage </State>
<Font> KanitTTF </Font>
<Size> 22 </Size>
<Width> 1078 </Width>
<Align> end </Align>
<Color> 0xFF0000 </Color>
<Value> MenuReasonString</Value>
</Text>
;
</Page>