diff options
author | Charles Brej <cbrej@cs.man.ac.uk> | 2009-10-29 13:36:27 +0000 |
---|---|---|
committer | Charles Brej <cbrej@cs.man.ac.uk> | 2009-10-29 13:36:27 +0000 |
commit | a086ae755b635229efc90c22a8fef3d0b981de74 (patch) | |
tree | de69321173e9e83e3e6ccf352441082e94e47c67 /themes | |
parent | 36a1b3557030ef39d97f7d4b8d435944f87ad11b (diff) |
[script] Convert example script functions to use objects
The example script had some old style function names. These still work due to
the compatibility translations, but are not recommended in new code.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/script/script.script | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/themes/script/script.script b/themes/script/script.script index 897d3c5d..d99217d0 100644 --- a/themes/script/script.script +++ b/themes/script/script.script @@ -13,7 +13,7 @@ fun refresh_callback () { logo.opacity_angle += ((2 * 3.14) / 50) * 0.5; # 0.5 HZ min_opacity = 0.3; - opacity = (MathCos(logo.opacity_angle) + 1) / 2; + opacity = (Math.Cos(logo.opacity_angle) + 1) / 2; opacity *= 1 - min_opacity; opacity += min_opacity; logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2); @@ -28,7 +28,7 @@ fun refresh_callback () } } -PlymouthSetRefreshFunction (refresh_callback); +Plymouth.SetRefreshFunction (refresh_callback); #----------------------------------------- Dialogue -------------------------------- @@ -111,8 +111,8 @@ fun display_password_callback (prompt, bullets) } } -PlymouthSetDisplayNormalFunction(display_normal_callback); -PlymouthSetDisplayPasswordFunction(display_password_callback); +Plymouth.SetDisplayNormalFunction(display_normal_callback); +Plymouth.SetDisplayPasswordFunction(display_password_callback); #----------------------------------------- Progress Bar -------------------------------- @@ -132,14 +132,14 @@ progress_bar.sprite.SetPosition(progress_bar.x, progress_bar.y, 1); fun progress_callback (duration, progress) { - if (progress_bar.image.GetWidth () != MathInt (progress_bar.original_image.GetWidth () * progress)) + if (progress_bar.image.GetWidth () != Math.Int (progress_bar.original_image.GetWidth () * progress)) { progress_bar.image = progress_bar.original_image.Scale(progress_bar.original_image.GetWidth(progress_bar.original_image) * progress, progress_bar.original_image.GetHeight()); progress_bar.sprite.SetImage (progress_bar.image); } } -PlymouthSetBootProgressFunction(progress_callback); +Plymouth.SetBootProgressFunction(progress_callback); #----------------------------------------- Quit -------------------------------- @@ -148,4 +148,4 @@ fun quit_callback () logo.sprite.SetOpacity (1); } -PlymouthSetQuitFunction(quit_callback); +Plymouth.SetQuitFunction(quit_callback); |