Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
44
Task/Animation/FutureBasic/animation.basic
Normal file
44
Task/Animation/FutureBasic/animation.basic
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
include "NSLog.incl"
|
||||
|
||||
_window = 1
|
||||
_label = 1
|
||||
|
||||
void local fn DoIt
|
||||
window _window, @"Animation", (0,0,480,270)
|
||||
|
||||
subclass textlabel _label, @"Hello World! ", (140,112,210,45)
|
||||
ControlSetFont( _label, fn FontLabelFontOfSize( 36 ) )
|
||||
ViewSetProperty( _label, @"MoveRight", @(YES) )
|
||||
|
||||
timerbegin , 0.1, YES
|
||||
CFStringRef string = fn ControlStringValue(_label)
|
||||
CFStringRef chr
|
||||
BOOL moveRight = fn NumberBoolValue(fn ViewProperty( _label, @"MoveRight" ))
|
||||
if ( moveRight )
|
||||
chr = right( string, 1 )
|
||||
string = fn StringWithFormat( @"%@%@",chr,left(string,len(string)-1) )
|
||||
else
|
||||
chr = left( string, 1 )
|
||||
string = fn StringWithFormat( @"%@%@",right(string,len(string)-1),chr )
|
||||
end if
|
||||
textlabel _label, string
|
||||
timerend
|
||||
end fn
|
||||
|
||||
void local fn DoDialog( ev as long, tag as long )
|
||||
select ( ev )
|
||||
case _viewMouseDown
|
||||
select ( tag )
|
||||
case _label
|
||||
BOOL moveRight = fn NumberBoolValue(fn ViewProperty( _label, @"MoveRight" ))
|
||||
if ( moveRight ) then moveRight == NO else moveRight = YES
|
||||
ViewSetProperty( _label, @"MoveRight", @(moveRight) )
|
||||
end select
|
||||
end select
|
||||
end fn
|
||||
|
||||
fn DoIt
|
||||
|
||||
on dialog fn DoDialog
|
||||
|
||||
HandleEvents
|
||||
Loading…
Add table
Add a link
Reference in a new issue