Zeiten
Resource contributor
- Messages
- 444
- Country

Hi.
I'm trying to make a button work so it moves back into position when the mouse is released.
My current code works, I only need to press the button one more time to make it pop back out.
tried with
Think I'm on the right track, but not sure.
The code works to some degree.
The hand courser comes up and the tooltip works, but nothing happens when I press the button.
Edit.
Think I had a little aha moment.
Instead of enum it should be bool as enum returns 3 states and bool only 2?
Too bad I cant test it right now:/
I'm trying to make a button work so it moves back into position when the mouse is released.
My current code works, I only need to press the button one more time to make it pop back out.
Code:
<PartInfo>
<Name>oh_rain_rep_co</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>
(L:repellent co,number) 50 *
</Code>
<Lag>200</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Rain Repellent</TooltipText>
<MouseFlags>LeftSingle</MouseFlags>
<CallbackCode>
(L:repellent co) ! (>L:repellent co)
</CallbackCode>
</MouseRect>
</PartInfo>
tried with
Code:
<MouseFlags>LeftSingle+Leftrelease</MouseFlags>
<CallbackCode>
(M:Event) 'LeftSingle' scmp 0 ==
if{ 1 (>L:repellent co, enum) }
(M:Event) 'LeftRelease' scmp 0 ==
if{ 0 (>L:repellent co, enum) }
</CallbackCode>
Think I'm on the right track, but not sure.
The code works to some degree.
The hand courser comes up and the tooltip works, but nothing happens when I press the button.
Edit.
Think I had a little aha moment.
Instead of enum it should be bool as enum returns 3 states and bool only 2?
Too bad I cant test it right now:/
Last edited:




