248 lines
No EOL
6.8 KiB
XML
248 lines
No EOL
6.8 KiB
XML
<Popup>
|
|
<Cache> "Enable" </Cache>
|
|
<Width> 1080 </Width>
|
|
<Height> 1920 </Height>
|
|
<Background> "0xEAE6E1" </Background>
|
|
<Volume> SoundVolume </Volume>
|
|
<EventOpen>
|
|
Var Timeout = 0
|
|
Var TelephoneNumber = TelephoneNumberX
|
|
Var Seeker.TNumberTaobinMember = TelephoneNumber
|
|
|
|
DEBUGVAR TelephoneNumber
|
|
DEBUGVAR TelephoneNumberX
|
|
|
|
Var DirImage = "ROOT/taobin_project/image/event/lent_day/"
|
|
|
|
If show_eng = "true" Then
|
|
Var IMG_CNT = "ROOT/taobin_project/image/page_doing/img2_eng.png"
|
|
Else
|
|
Var IMG_CNT = "ROOT/taobin_project/image/page_doing/img2.png"
|
|
EndIf
|
|
|
|
Var FullLentState = "Invisible"
|
|
Var CurrentPriceTextState = "Invisible"
|
|
Var GIFAnimationState = "Invisible"
|
|
|
|
DEBUGVAR TotalPrice
|
|
DEBUGVAR PayAmount
|
|
|
|
Var TotalPriceAfterAdded = TotalPrice + PayAmount
|
|
|
|
Var PriceToShow = "฿" + TotalPriceAfterAdded
|
|
Var PriceToShow = PriceToShow + "->"
|
|
|
|
Var LentMinY = 1740
|
|
Var LentMaxY = 1076
|
|
|
|
Var MaxPrice = 350
|
|
|
|
Var LentSize = LentMinY - LentMaxY
|
|
|
|
Var StartPriceDy = TotalPrice * 100
|
|
Var StartPriceDy = StartPriceDy / MaxPrice
|
|
Var PositionStart = StartPriceDy * LentSize
|
|
Var PositionStart = PositionStart / 100
|
|
Var PositionStart = LentMinY - PositionStart
|
|
|
|
If PositionStart < LentMaxY Then
|
|
PositionStart = LentMaxY
|
|
EndIf
|
|
|
|
Var LentPositionY = PositionStart
|
|
|
|
Var TargetPriceDy = TotalPriceAfterAdded * 100
|
|
Var TargetPriceDy = TargetPriceDy / MaxPrice
|
|
Var PositionTarget = TargetPriceDy * LentSize
|
|
Var PositionTarget = PositionTarget / 100
|
|
Var PositionTarget = LentMinY - PositionTarget
|
|
|
|
If PositionTarget < LentMaxY Then
|
|
PositionTarget = LentMaxY
|
|
EndIf
|
|
|
|
Var PositionDiff = PositionStart - PositionTarget
|
|
|
|
Var TimeScopeSec = 0
|
|
Var AmountIncrease = 0
|
|
Var PourAnimationDelaySec = 0
|
|
If PositionDiff > 0 Then
|
|
Var TimeScopeSec = 7
|
|
Var AmountIncrease = 0 - PositionDiff
|
|
Var AmountIncrease = AmountIncrease / TimeScopeSec
|
|
Var PourAnimationDelaySec = 1
|
|
Var GIFAnimationState = "Enable"
|
|
EndIf
|
|
|
|
Var MaxTimeout = TimeScopeSec + PourAnimationDelaySec
|
|
Var MaxTimeout = MaxTimeout + 5
|
|
|
|
DEBUGVAR LentSize
|
|
DEBUGVAR PositionStart
|
|
DEBUGVAR PositionTarget
|
|
DEBUGVAR AmountIncrease
|
|
DEBUGVAR LentPositionY
|
|
DEBUGVAR MaxTimeout
|
|
|
|
|
|
Var val1 = "+"
|
|
Var val2 = PayAmount
|
|
Var val3 = "X"
|
|
AddData 58 TelephoneNumber val1 val2 val3
|
|
|
|
</EventOpen>
|
|
|
|
<Timeout> 1000 </Timeout>
|
|
<EventTimeout>
|
|
Var CountDownBrewing = BREW_CNT
|
|
Var ShowCountDownBrewing = CountDownBrewing
|
|
|
|
Var Timeout = Timeout + 1
|
|
If Timeout > MaxTimeout Then
|
|
|
|
If TotalPriceAfterAdded >= 350 Then
|
|
Open "ROOT/taobin_project/xml/event/lent_day/page_collect_lent_send_code.xml"
|
|
EndIf
|
|
|
|
If TotalPriceAfterAdded >= 175 Then
|
|
Open "ROOT/taobin_project/xml/event/lent_day/page_collect_lent_redeem_or_continue.xml"
|
|
EndIf
|
|
|
|
If Seeker.CodeChannel = 1 Then
|
|
If Seeker.CollectPointMain = 1 Then
|
|
GETACCEXT Param1 23
|
|
Open "ROOT/taobin_project/xml/page_collect_point_2.xml"
|
|
Else
|
|
Open "ROOT/taobin_project/xml/page_lid_straw.xml"
|
|
EndIf
|
|
Else
|
|
GETACCEXT Param1 23
|
|
Open "ROOT/taobin_project/xml/page_collect_point_2.xml"
|
|
EndIf
|
|
EndIf
|
|
|
|
If PourAnimationDelaySec > 0 Then
|
|
Var PourAnimationDelaySec = PourAnimationDelaySec - 1
|
|
Else
|
|
If TimeScopeSec > 0 Then
|
|
Var LentPositionY = LentPositionY + AmountIncrease
|
|
DEBUGVAR LentPositionY
|
|
Var TimeScopeSec = TimeScopeSec - 1
|
|
Else
|
|
If TotalPriceAfterAdded >= 350 Then
|
|
Var FullLentState = "Enable"
|
|
Var CurrentPriceTextState = "Invisible"
|
|
EndIf
|
|
|
|
Var GIFAnimationState = "Invisible"
|
|
EndIf
|
|
EndIf
|
|
|
|
Refresh
|
|
TimerReset
|
|
</EventTimeout>
|
|
|
|
<EventSecurity>
|
|
Open "/media/bt/xml/security_alarm.xml"
|
|
</EventSecurity>
|
|
|
|
<EventMachine>
|
|
If MachineStage = "drink-success" Then
|
|
Var MachineState_Result = 1
|
|
EndIf
|
|
|
|
If MachineStage = "drink-failed" Then
|
|
Var MachineState_Result = 2
|
|
EndIf
|
|
</EventMachine>
|
|
|
|
;include="ROOT/taobin_project/inc/video.inc"
|
|
|
|
<Image>
|
|
<X> 0 </X>
|
|
<Y> 380 </Y>
|
|
<Filename> Var( DirImage + "/layer1.png" ) </Filename>
|
|
</Image>
|
|
|
|
<GIF>
|
|
<X> 90 </X>
|
|
<Y> 760 </Y>
|
|
<Width> 800 </Width>
|
|
<Height> 333 </Height>
|
|
<State> GIFAnimationState </State>
|
|
;<Mode> "OneShot,StopFrame=182" </Mode>
|
|
<Filename> Var( DirImage + "pour_animation.gif" ) </Filename>
|
|
</GIF>
|
|
|
|
<Image>
|
|
<X> 361 </X>
|
|
<Y> LentPositionY </Y>
|
|
<Width> 340 </Width>
|
|
<Height> 714 </Height>
|
|
<Filename> Var( DirImage + "/layer2.png" ) </Filename>
|
|
</Image>
|
|
|
|
<Image>
|
|
<X> 0 </X>
|
|
<Y> 1076 </Y>
|
|
<Filename> Var( DirImage + "/layer3.png" ) </Filename>
|
|
</Image>
|
|
|
|
<Image>
|
|
<X> 363 </X>
|
|
<Y> 1076 </Y>
|
|
<Filename> Var( DirImage + "/layer4.png" ) </Filename>
|
|
</Image>
|
|
|
|
<Text>
|
|
<X> 325 </X>
|
|
<Y> PositionTarget </Y>
|
|
<State> CurrentPriceTextState </State>
|
|
<Width> 150 </Width>
|
|
<Size> 32 </Size>
|
|
<Font> KanitTTF </Font>
|
|
<Color> 0x523D30 </Color>
|
|
<Value> PriceToShow </Value>
|
|
</Text>
|
|
|
|
<Image>
|
|
<X> 363 </X>
|
|
<Y> 821 </Y>
|
|
<State> FullLentState </State>
|
|
<Filename> Var( DirImage + "/lent.png" ) </Filename>
|
|
</Image>
|
|
|
|
<Image>
|
|
<X> 658 </X>
|
|
<Y> 990 </Y>
|
|
<Filename> Var( DirImage + "/collecting_level.png" ) </Filename>
|
|
</Image>
|
|
|
|
<Image>
|
|
<X> 751 </X>
|
|
<Y> 413 </Y>
|
|
<Filename> IMG_CNT </Filename>
|
|
</Image>
|
|
|
|
<Text>
|
|
<X> XPosiShowCountDownBrew </X>
|
|
<Y> 470 </Y>
|
|
<Align> End </Align>
|
|
<Width> 153 </Width>
|
|
<Size> 88 </Size>
|
|
<Font> RobotoBold </Font>
|
|
<Color> 0x513C2F </Color>
|
|
<Value> ShowCountDownBrewing </Value>
|
|
</Text>
|
|
|
|
<EventUnitTest2>
|
|
<Name> "Reload File" </Name>
|
|
<Script>
|
|
Open "ROOT/taobin_project/xml/event/lent_day/page_collect_lent_collecting.xml"
|
|
</Script>
|
|
</EventUnitTest2>
|
|
|
|
<EventUnitTest3>
|
|
Var MaxTimeout = 5
|
|
</EventUnitTest3>
|
|
</Popup> |