taobin_project/xml/page_lid_straw.xml

412 lines
8.4 KiB
XML
Raw Normal View History

2020-09-16 18:42:32 +07:00
<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> "0xeae6e1" </Background>
<Volume> SoundVolume </Volume>
<EventOpen>
; On open
2021-05-28 10:41:11 +07:00
Var CountUpBrewing = BrewTime - CountDownBrewing
;Var CountUpBrewing = 0
Var CountDownVideoTimeReload = AnimationVideoPlayTime
Var CountDownVideoTime = 1
Var StepVideo = 1
Var PreviseStepVideo = 90
;SAVELOG CountUpBrewing
;SAVELOG AnimationOn
;SAVELOG AnimationVideoPlayTime
;SAVELOG VideoID1
;SAVELOG VideoID2
;SAVELOG VideoID3
;SAVELOG VideoID4
;SAVELOG VideoID5
;SAVELOG VideoID6
;SAVELOG VideoAnimationCount
2021-05-28 11:38:05 +07:00
If show_eng = "true" Then
Var DirImage = "ROOT/taobin_project/image/page_lid_straw_en"
Var PictureEnd = "_en.png"
Var BottomText = PicturePath + "text_bottom_eng.png"
Var lid_straw_bg_iamge = DirImage + "/img4.png"
If LidState = "Enable" Then
Var lid_straw_bg_iamge = DirImage + "/img3.png"
EndIf
Play "/mnt/sdcard/coffeevending/taobin_project/sound_eng/Wait_a_moment.mp3"
Else
Var DirImage = "ROOT/taobin_project/image/page_lid_straw"
Var PictureEnd = ".png"
Var BottomText = PicturePath + "text_bottom_thai2.png"
Var lid_straw_bg_iamge = DirImage + "/img4.png"
If LidState = "Enable" Then
Var lid_straw_bg_iamge = DirImage + "/img3.png"
EndIf
Play "ROOT/sounds/pleaseWait.wav"
EndIf
Var VideoPath = "/mnt/sdcard/coffeevending/taobin_project/animation01/"
Var VideoFileBegin = "TaoBin2_draft02_art"
Var VideoFileEnd = ".mp4"
Var PicturePath = "/mnt/sdcard/coffeevending/taobin_project/image/page_doing/"
Var PictureBegin = "txt_"
2021-05-28 10:41:11 +07:00
Var VideoPlayFile = VideoPath
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
Var VideoPlayFile = VideoPlayFile + "1"
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
Var PictureFile = PicturePath
Var PictureFile = PictureFile + PictureBegin
Var PictureFile = PictureFile + "1"
Var PictureFile = PictureFile + PictureEnd
2020-10-29 22:13:35 +07:00
2020-12-05 22:46:39 +07:00
2021-11-30 15:42:42 +07:00
;If lidAndStrawOldPageIgnore = "true" Then
; Var lidAndStrawOldPageIgnore = "false"
2021-12-17 12:48:38 +07:00
If Seeker = "next" Then
2022-01-11 13:41:12 +07:00
;CoinBack
2021-12-17 12:48:38 +07:00
Open "ROOT/taobin_project/xml/page_brewing3Conti.xml"
Else
2021-05-28 10:41:11 +07:00
Open "ROOT/taobin_project/xml/page_brewing3.xml"
2021-12-17 12:48:38 +07:00
EndIf
2021-11-30 15:42:42 +07:00
;EndIf
2021-05-28 10:41:11 +07:00
Var LidState = Lid1Status
;Lid1Status
Var StarwState = "Enable"
Var LidStrawCountDown = 15
2020-12-05 22:46:39 +07:00
2021-04-06 14:50:53 +07:00
If Lid1Status = "Disable" Then
Var LidState = "Invisible"
EndIf
2020-10-30 18:21:06 +07:00
2021-04-21 16:13:29 +07:00
STRCONTAIN "9701" BrewParam IgnoreLidStraw
DEBUGVAR BrewParam
DEBUGVAR IgnoreLidStraw
2021-05-10 09:55:03 +07:00
DEBUGVAR Service_LidStraw
2021-04-21 16:13:29 +07:00
2021-01-19 23:43:43 +07:00
2021-04-21 16:13:29 +07:00
If IgnoreLidStraw = "true" Then
Var IgnoreLidStraw = "false"
2021-05-10 09:55:03 +07:00
SAVELOG "Ignore lid straw because recipe disable"
2021-04-21 16:13:29 +07:00
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
2021-01-19 23:43:43 +07:00
If Service_LidStraw = "Disable" Then
2021-05-14 13:59:07 +07:00
SAVELOG "Service_LidStraw"
2021-01-19 23:43:43 +07:00
Open "ROOT/taobin_project/xml/page_brewing3.xml"
EndIf
2020-12-26 01:33:30 +07:00
2021-01-23 17:48:02 +07:00
DEBUGVAR StrawAutoRelease1
2021-03-12 15:39:02 +07:00
Var UserPressButton = "false"
2021-01-23 17:48:02 +07:00
2020-12-26 01:33:30 +07:00
2020-09-16 18:42:32 +07:00
</EventOpen>
2020-12-05 22:46:39 +07:00
<Timeout> 1000 </Timeout>
2020-09-16 18:42:32 +07:00
<EventTimeout>
2021-04-28 15:51:31 +07:00
If CountDownBrewing > 0 Then
Var CountDownBrewing = CountDownBrewing - 1
EndIf
2020-09-16 18:42:32 +07:00
; run test;
2020-09-16 20:05:55 +07:00
;If CountDownBrewing = 58 Then
2020-10-15 13:14:09 +07:00
; Open "ROOT/taobin_project/xml/page_brewing.xml"
2020-09-16 20:05:55 +07:00
;EndIf
2020-09-17 12:39:18 +07:00
Var LidStrawCountDown = LidStrawCountDown - 1
2020-09-16 20:05:55 +07:00
; count down
If LidStrawCountDown = 1 Then
2020-11-17 13:32:56 +07:00
Var LidStrawCountDown = 10
2021-04-21 16:13:29 +07:00
If StarwState = "Press" Then
Machine Straw
EndIf
If LidState = "Press" Then
Machine Lid
EndIf
2020-12-03 14:21:46 +07:00
Open "ROOT/taobin_project/xml/page_brewing3.xml"
2020-09-16 18:42:32 +07:00
EndIf
Var ShowCountDownBrewing = CountDownBrewing
2020-12-03 14:21:46 +07:00
; animation video loop
If AnimationOn = "true" Then
Var CountUpBrewing = CountUpBrewing + 1
Var SlotVideo = CountUpBrewing / AnimationVideoPlayTime
2020-12-05 22:46:39 +07:00
If CountUpBrewing < 4 Then
2020-12-03 14:21:46 +07:00
2020-12-05 22:46:39 +07:00
Else
2020-12-03 14:21:46 +07:00
2020-12-05 22:46:39 +07:00
If PreviseStepVideo = SlotVideo Then
2021-01-19 23:43:43 +07:00
;SAVELOG SlotVideo
2020-12-03 14:21:46 +07:00
Else
2020-12-05 22:46:39 +07:00
Var PreviseStepVideo = SlotVideo
2021-01-19 23:43:43 +07:00
;SAVELOG PreviseStepVideo
;SAVELOG SlotVideo
;SAVELOG CountUpBrewing
2020-12-05 22:46:39 +07:00
;Var CountDownVideoTime = CountDownVideoTimeReload
Var StepVideo = SlotVideo + 2
2021-01-19 23:43:43 +07:00
;SAVELOG StepVideo
2020-12-05 22:46:39 +07:00
If StepVideo = 1 Then
Var videoID = VideoID1
EndIf
If StepVideo = 2 Then
Var videoID = VideoID2
EndIf
If StepVideo = 3 Then
Var videoID = VideoID3
EndIf
If StepVideo = 4 Then
Var videoID = VideoID4
EndIf
If StepVideo = 5 Then
Var videoID = VideoID5
EndIf
If StepVideo = 6 Then
Var videoID = VideoID6
EndIf
If StepVideo = 7 Then
Var videoID = VideoID7
EndIf
2021-01-19 23:43:43 +07:00
;SAVELOG videoID
2020-12-05 22:46:39 +07:00
If videoID = 0 Then
Else
If videoID = "---" Then
Else
Var VideoPlayFile = VideoPath
Var VideoPlayFile = VideoPlayFile + VideoFileBegin
Var VideoPlayFile = VideoPlayFile + videoID
Var VideoPlayFile = VideoPlayFile + VideoFileEnd
Var PictureFile = PicturePath
Var PictureFile = PictureFile + PictureBegin
Var PictureFile = PictureFile + videoID
Var PictureFile = PictureFile + PictureEnd
SAVELOG VideoPlayFile
SAVELOG PictureFile
EndIf
EndIf
2020-12-03 14:21:46 +07:00
EndIf
EndIf
EndIf
2021-01-23 17:48:02 +07:00
If StrawAutoRelease1 = "true" Then
2021-03-12 15:39:02 +07:00
Var StrawAutoRelease1 = "false"
2021-01-23 17:48:02 +07:00
Var StarwState = "Press"
EndIf
2020-09-16 18:42:32 +07:00
Refresh
TimerReset
</EventTimeout>
2020-11-22 21:50:53 +07:00
;<Image>
;<X> 0 </X>
;<Y> 0 </Y>
;<Filename> "ROOT/taobin_project/image/ad_medium_2.png" </Filename>
;</Image>
<Video>
2020-09-16 18:42:32 +07:00
<X> 0 </X>
<Y> 0 </Y>
2020-11-22 21:50:53 +07:00
<Width> 1080</Width>
<Height> 380 </Height>
<Loop> "true" </Loop>
2021-05-12 11:53:54 +07:00
<Filename> video_menu_0 </Filename>
2020-11-22 21:50:53 +07:00
</Video>
2020-09-16 18:42:32 +07:00
2020-10-12 19:09:05 +07:00
<Video>
<X> 0 </X>
<Y> 380 </Y>
<Width> 1080</Width>
2020-12-03 14:21:46 +07:00
<Height> 840 </Height>
<Refresh> "Reload" </Refresh>
2020-10-12 19:09:05 +07:00
<Loop> "true" </Loop>
2020-12-03 14:21:46 +07:00
<Filename> VideoPlayFile </Filename>
2020-10-12 19:09:05 +07:00
</Video>
2020-09-16 18:42:32 +07:00
<Image>
2020-10-29 22:13:35 +07:00
<X> 0 </X>
<Y> 1289 </Y>
<Filename> Var( DirImage + "/text2.png" ) </Filename>
2020-09-16 18:42:32 +07:00
</Image>
<Image>
<X> 78 </X>
<Y> 1425 </Y>
2020-12-26 01:33:30 +07:00
<Filename> lid_straw_bg_iamge </Filename>
2020-09-16 18:42:32 +07:00
</Image>
<Button>
<X> 750 </X>
<Y> 1783 </Y>
2020-10-29 22:13:35 +07:00
<Filename> Var( DirImage + "/bn_ok.png" )</Filename>
<FilenamePress> Var( DirImage + "/bn_ok.png" )</FilenamePress>
2020-09-16 18:42:32 +07:00
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
2020-09-17 19:08:21 +07:00
If StarwState = "Press" Then
Machine Straw
2021-05-04 00:40:17 +07:00
LED LedDoorLid Blink 255 255 255 255
2020-09-17 19:08:21 +07:00
EndIf
If LidState = "Press" Then
Machine Lid
2021-05-04 00:40:17 +07:00
LED LedDoorLid Blink 255 255 255 255
2020-09-17 19:08:21 +07:00
EndIf
2020-12-03 14:21:46 +07:00
Open "ROOT/taobin_project/xml/page_brewing3.xml"
2020-09-16 18:42:32 +07:00
</EventClick>
</Button>
; starw left
<Button>
<X> 126 </X>
<Y> 1474 </Y>
<State> StarwState </State>
<Filename> "ROOT/taobin_project/image/page_lid_straw/bn_straw.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/page_lid_straw/bp_straw.png" </FilenamePress>
<EventClick>
</EventClick>
</Button>
; lid left
<Button>
<X> 126 </X>
<Y> 1584 </Y>
<State> LidState </State>
<Filename> "ROOT/taobin_project/image/page_lid_straw/bn_lid.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/page_lid_straw/bp_lid.png" </FilenamePress>
<EventClick>
</EventClick>
</Button>
<Button>
<X> 901 </X>
<Y> 1494 </Y>
<Width> 50 </Width>
<Height> 50 </Height>
<State> StarwState </State>
2020-09-17 19:08:21 +07:00
<Mode> "No" </Mode>
2020-09-16 18:42:32 +07:00
<Filename> "ROOT/taobin_project/image/page_lid_straw/cb_straw_nch.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/page_lid_straw/cb_straw_ch.png" </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
2020-09-17 19:08:21 +07:00
SAVELOG StarwState
If StarwState = "Press" Then
Var StarwState = "Enable"
Else
Var StarwState = "Press"
EndIf
2020-09-16 18:42:32 +07:00
Refresh
</EventClick>
</Button>
<Button>
<X> 901 </X>
<Y> 1604 </Y>
<Width> 50 </Width>
<Height> 50 </Height>
<State> LidState </State>
2020-09-17 19:08:21 +07:00
<Mode> "No" </Mode>
2020-09-16 18:42:32 +07:00
<Filename> "ROOT/taobin_project/image/page_lid_straw/cb_lid_nch.png" </Filename>
<FilenamePress> "ROOT/taobin_project/image/page_lid_straw/cb_lid_ch.png" </FilenamePress>
<Sound> "/mnt/sdcard/coffeevending/wav/click.wav" </Sound>
<Volume> SoundVolume </Volume>
<EventClick>
2020-09-17 19:08:21 +07:00
SAVELOG LidState
If LidState = "Press" Then
Var LidState = "Enable"
Else
Var LidState = "Press"
EndIf
2020-09-16 18:42:32 +07:00
Refresh
</EventClick>
</Button>
2020-10-15 18:29:38 +07:00
;
2020-09-16 18:42:32 +07:00
<Image>
<X> 751 </X>
<Y> 413 </Y>
2020-10-30 18:21:06 +07:00
<Filename> page_doing_show_time_image </Filename>
2020-09-16 18:42:32 +07:00
</Image>
2020-10-15 18:29:38 +07:00
;
2020-09-16 18:42:32 +07:00
<Text>
2020-10-15 14:04:35 +07:00
<X> XPosiShowCountDownBrew </X>
2020-10-15 18:29:38 +07:00
<Y> 470 </Y>
<Align> End </Align>
<Width> 153 </Width>
2020-09-16 18:42:32 +07:00
<Size> 88 </Size>
2020-10-15 18:29:38 +07:00
<Font> RobotoBold </Font>
2020-09-16 18:42:32 +07:00
<Color> 0x513C2F </Color>
<Value> ShowCountDownBrewing </Value>
</Text>
2020-10-12 19:09:05 +07:00
;<GIF>
;<X> 182 </X>
;<Y> 700 </Y>
;<Filename> GIFShowProcess </Filename>
;</GIF>
<EventMachine>
2020-10-28 13:43:30 +07:00
If MachineStage = "drink-success" Then
Var MachineState_Result = 1
EndIf
If MachineStage = "drink-failed" Then
Var MachineState_Result = 2
EndIf
</EventMachine>
2020-10-12 19:09:05 +07:00
</EventMachine>
2020-09-16 18:42:32 +07:00
2020-10-12 19:09:05 +07:00
<EventChangeStatus>
If ChangeStatus = "payout-end" Then
2021-03-17 12:22:54 +07:00
2020-10-12 19:09:05 +07:00
EndIf
</EventChangeStatus>
2020-09-16 18:42:32 +07:00
</Popup>