305 lines
8.3 KiB
PHP
305 lines
8.3 KiB
PHP
;
|
|
;
|
|
;
|
|
|
|
; Sub-button for 4 random menu
|
|
|
|
;
|
|
;
|
|
;
|
|
|
|
<Button>
|
|
<X> 43 </X>
|
|
<Y> 519 </Y>
|
|
<State> SubRandMilkButtonEnable </State>
|
|
<Filename>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_milk.png"
|
|
)
|
|
</Filename>
|
|
<FilenamePress>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_milk.png"
|
|
)
|
|
</FilenamePress>
|
|
<FilenameDisable>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bd_random_milk.png"
|
|
)
|
|
</FilenameDisable>
|
|
<EventClick>
|
|
Var OreoGuarantee = OreoGuarantee + 1
|
|
Var ResultRandomIndex = 0
|
|
DEBUGVAR OreoGuarantee
|
|
If OreoGuarantee > 4 Then
|
|
Var IndexOfMilk = IndexOfMilk - 1
|
|
Random2 0 IndexOfMilk ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfMilk[ResultRandomIndex]
|
|
DEBUGVAR ListOfMilk[ResultRandomIndex]
|
|
|
|
Var OreoGuarantee = 0
|
|
Else
|
|
Var IndexOfRateupOreoMilk = IndexOfRateupOreoMilk - 1
|
|
Random2 0 IndexOfRateupOreoMilk ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfOreoMilk[ResultRandomIndex]
|
|
DEBUGVAR ListOfOreoMilk[ResultRandomIndex]
|
|
EndIf
|
|
|
|
DEBUGVAR ResultRandomIndex
|
|
|
|
Topping "Load" ProductCodeRandom
|
|
Var OpenFromXML = CurrentXMLFileName2
|
|
Open "ROOT/taobin_project/xml/page_topping_select_35.xml"
|
|
</EventClick>
|
|
</Button>
|
|
<Text>
|
|
<X> 91</X>
|
|
<Y> 635 </Y>
|
|
<Size> 32 </Size>
|
|
<Width>128</Width>
|
|
<Height>64</Height>
|
|
<Font> MITRegularTTF </Font>
|
|
<Color> 0x5A5A5A </Color>
|
|
<Mode> "disable-show" </Mode>
|
|
<State> SubRandMilkButtonEnable </State>
|
|
<Value> text_unavailable </Value>
|
|
<Align> center-vertical-horizontal </Align>
|
|
</Text>
|
|
|
|
<Button>
|
|
<X> 301 </X>
|
|
<Y> 519 </Y>
|
|
<State> SubRandTeaButtonEnable </State>
|
|
<Filename>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_tea.png"
|
|
)
|
|
</Filename>
|
|
<FilenamePress>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_tea.png"
|
|
)
|
|
</FilenamePress>
|
|
<FilenameDisable>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bd_random_tea.png"
|
|
)
|
|
</FilenameDisable>
|
|
<EventClick>
|
|
Var OreoGuarantee = OreoGuarantee + 1
|
|
Var ResultRandomIndex = 0
|
|
DEBUGVAR OreoGuarantee
|
|
DEBUGVAR IndexOfTea
|
|
DEBUGVAR IndexOfRateupOreoTea
|
|
If OreoGuarantee > 4 Then
|
|
|
|
Var IndexOfTea = IndexOfTea - 1
|
|
Random2 0 IndexOfTea ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfTea[ResultRandomIndex]
|
|
DEBUGVAR ListOfTea[ResultRandomIndex]
|
|
|
|
Var OreoGuarantee = 0
|
|
Else
|
|
|
|
Var IndexOfRateupOreoTea = IndexOfRateupOreoTea - 1
|
|
Random2 0 IndexOfRateupOreoTea ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfOreoTea[ResultRandomIndex]
|
|
DEBUGVAR ListOfOreoTea[ResultRandomIndex]
|
|
|
|
EndIf
|
|
|
|
DEBUGVAR ResultRandomIndex
|
|
|
|
Topping "Load" ProductCodeRandom
|
|
Var OpenFromXML = CurrentXMLFileName2
|
|
Open "ROOT/taobin_project/xml/page_topping_select_35.xml"
|
|
</EventClick>
|
|
</Button>
|
|
<Text>
|
|
<X> 349 </X>
|
|
<Y> 635 </Y>
|
|
<Size> 32 </Size>
|
|
<Width>128</Width>
|
|
<Height>64</Height>
|
|
<Font> MITRegularTTF </Font>
|
|
<Color> 0x5A5A5A </Color>
|
|
<Mode> "disable-show" </Mode>
|
|
<State> SubRandTeaButtonEnable </State>
|
|
<Value> text_unavailable </Value>
|
|
<Align> center-vertical-horizontal </Align>
|
|
</Text>
|
|
|
|
|
|
<Button>
|
|
<X> 43 </X>
|
|
<Y> 837 </Y>
|
|
<State> SubRandCoffButtonEnable </State>
|
|
<Filename>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_coffee.png"
|
|
)
|
|
</Filename>
|
|
<FilenamePress>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_coffee.png"
|
|
)
|
|
</FilenamePress>
|
|
<FilenameDisable>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bd_random_coffee.png"
|
|
)
|
|
</FilenameDisable>
|
|
<EventClick>
|
|
Var OreoGuarantee = OreoGuarantee + 1
|
|
Var ResultRandomIndex = 0
|
|
DEBUGVAR OreoGuarantee
|
|
DEBUGVAR IndexOfCoffee
|
|
DEBUGVAR IndexOfRateupOreoCoffee
|
|
If OreoGuarantee > 4 Then
|
|
|
|
Var IndexOfCoffee = IndexOfCoffee - 1
|
|
Random2 0 IndexOfCoffee ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfCoffee[ResultRandomIndex]
|
|
DEBUGVAR ListOfCoffee[ResultRandomIndex]
|
|
|
|
Var OreoGuarantee = 0
|
|
|
|
Else
|
|
|
|
Var IndexOfRateupOreoCoffee = IndexOfRateupOreoCoffee - 1
|
|
Random2 0 IndexOfRateupOreoCoffee ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfOreoCoffee[ResultRandomIndex]
|
|
DEBUGVAR ListOfOreoCoffee[ResultRandomIndex]
|
|
|
|
EndIf
|
|
DEBUGVAR ResultRandomIndex
|
|
|
|
Topping "Load" ProductCodeRandom
|
|
Var OpenFromXML = CurrentXMLFileName2
|
|
Open "ROOT/taobin_project/xml/page_topping_select_35.xml"
|
|
</EventClick>
|
|
</Button>
|
|
<Text>
|
|
<X> 91</X>
|
|
<Y> 953 </Y>
|
|
<Size> 32 </Size>
|
|
<Width>128</Width>
|
|
<Height>64</Height>
|
|
<Font> MITRegularTTF </Font>
|
|
<Color> 0x5A5A5A </Color>
|
|
<Mode> "disable-show" </Mode>
|
|
<State> SubRandCoffButtonEnable </State>
|
|
<Value> text_unavailable </Value>
|
|
<Align> center-vertical-horizontal </Align>
|
|
</Text>
|
|
|
|
<Button>
|
|
<X> 301 </X>
|
|
<Y> 837 </Y>
|
|
<State> SubRandAllButtonEnable </State>
|
|
<Filename>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_all.png"
|
|
)
|
|
</Filename>
|
|
<FilenamePress>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bn_random_all.png"
|
|
)
|
|
</FilenamePress>
|
|
<FilenameDisable>
|
|
eval(
|
|
Var return = "ROOT/taobin_project/image/event/bd_random_all.png"
|
|
)
|
|
</FilenameDisable>
|
|
<EventClick>
|
|
Var OreoGuarantee = OreoGuarantee + 1
|
|
Var ResultRandomIndex = 0
|
|
DEBUGVAR OreoGuarantee
|
|
If OreoGuarantee > 4 Then
|
|
Var IndexOfAllRandom = IndexOfAllRandom - 1
|
|
Random2 0 IndexOfAllRandom ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfAllRandom[ResultRandomIndex]
|
|
DEBUGVAR ListOfAllRandom[ResultRandomIndex]
|
|
Var OreoGuarantee = 0
|
|
Else
|
|
Var IndexOfRateupOreoAll = IndexOfRateupOreoAll - 1
|
|
Random2 0 IndexOfRateupOreoAll ResultRandomIndex
|
|
Var ProductCodeRandom = ListOfOreoAll[ResultRandomIndex]
|
|
DEBUGVAR ListOfOreoAll[ResultRandomIndex]
|
|
|
|
EndIf
|
|
DEBUGVAR ResultRandomIndex
|
|
|
|
Topping "Load" ProductCodeRandom
|
|
Var OpenFromXML = CurrentXMLFileName2
|
|
Open "ROOT/taobin_project/xml/page_topping_select_35.xml"
|
|
</EventClick>
|
|
</Button>
|
|
<Text>
|
|
<X> 349</X>
|
|
<Y> 953 </Y>
|
|
<Size> 32 </Size>
|
|
<Width>128</Width>
|
|
<Height>64</Height>
|
|
<Font> MITRegularTTF </Font>
|
|
<Color> 0x5A5A5A </Color>
|
|
<Mode> "disable-show" </Mode>
|
|
<State> SubRandAllButtonEnable </State>
|
|
<Value> text_unavailable </Value>
|
|
<Align> center-vertical-horizontal </Align>
|
|
</Text>
|
|
|
|
;
|
|
;
|
|
;
|
|
;
|
|
; Big button for mys event
|
|
;
|
|
;
|
|
;
|
|
|
|
<Button>
|
|
<X> 42 </X>
|
|
<Y> 518 </Y>
|
|
<State> BigButtonEnable </State>
|
|
<Filename>
|
|
eval(
|
|
If show_eng = "true" Then
|
|
Var return = "ROOT/taobin_project/image/event/pro_mystery_cup_en.png"
|
|
Else
|
|
Var return = "ROOT/taobin_project/image/event/pro_mystery_cup_th.png"
|
|
EndIf
|
|
)
|
|
</Filename>
|
|
<FilenamePress>
|
|
eval(
|
|
If show_eng = "true" Then
|
|
Var return = "ROOT/taobin_project/image/event/pro_mystery_cup_en.png"
|
|
Else
|
|
Var return = "ROOT/taobin_project/image/event/pro_mystery_cup_th.png"
|
|
EndIf
|
|
)
|
|
</FilenamePress>
|
|
<FilenameDisable>
|
|
eval(
|
|
If show_eng = "true" Then
|
|
Var return = "ROOT/taobin_project/image/event/pro_mystery_cup_en.png"
|
|
Else
|
|
Var return = "ROOT/taobin_project/image/event/pro_mystery_cup_th.png"
|
|
EndIf
|
|
)
|
|
</FilenameDisable>
|
|
<EventOnClick>
|
|
###EventOnClick
|
|
</EventOnClick>
|
|
</Button>
|
|
|
|
<EventUnitTest1>
|
|
Var BigButtonEnable = "Enable"
|
|
Refresh
|
|
</EventUnitTest1>
|
|
<EventUnitTest2>
|
|
Var BigButtonEnable = "Invisible"
|
|
Refresh
|
|
</EventUnitTest2>
|