Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
47
Task/Animation/MAXScript/animation.max
Normal file
47
Task/Animation/MAXScript/animation.max
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
try destroydialog animGUI catch ()
|
||||
|
||||
global userDirection = "right"
|
||||
|
||||
fn reverseStr str: direction: =
|
||||
(
|
||||
local lastChar = str[str.count]
|
||||
local firstChar = str[1]
|
||||
local newStr = ""
|
||||
local dir
|
||||
|
||||
if direction == unsupplied then dir = "left" else dir = direction
|
||||
|
||||
case dir of
|
||||
(
|
||||
"right": (newstr = lastChar + (substring str 1 (str.count-1)))
|
||||
"left": (newstr = (substring str 2 (str.count))+firstChar)
|
||||
)
|
||||
|
||||
return newstr
|
||||
)
|
||||
|
||||
rollout animGUI "Hello World" width:200
|
||||
(
|
||||
button switchToLeft "<--" pos:[40,0] height:15
|
||||
label HelloWorldLabel "Hello World! " pos:[80,0]
|
||||
button switchToRight "-->" pos:[150,0] height:15
|
||||
|
||||
timer activeTimer interval:70 active:true
|
||||
|
||||
on activeTimer tick do
|
||||
(
|
||||
HelloWorldLabel.text = reverseStr str:(HelloWorldLabel.text) direction:userDirection
|
||||
)
|
||||
|
||||
on switchToLeft pressed do
|
||||
(
|
||||
userDirection = "left"
|
||||
)
|
||||
|
||||
on switchToRight pressed do
|
||||
(
|
||||
userDirection = "right"
|
||||
)
|
||||
)
|
||||
|
||||
createdialog animGUI
|
||||
Loading…
Add table
Add a link
Reference in a new issue