File: screen_image1.ssc

package info (click to toggle)
stellarium 24.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 911,396 kB
  • sloc: ansic: 317,377; cpp: 204,602; xml: 48,590; javascript: 26,348; python: 1,254; perl: 1,108; sh: 207; makefile: 190; pascal: 169
file content (34 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// Name: ScreenImageMgr Demo
// License: Public Domain
// Author: Matthew Gates
// Description: An example script showing how to use the ScreenImageMgr module.
//

include("status_label.inc");
useStatusLabel("ScreenImageMgr test 1: ", 50, 50, 16, "#ff0000");

status("image start off, fades in (1 sec), wait a second, fades off (1 sec)");
core.wait(2.0);
ScreenImageMgr.createScreenImage("logo", "../textures/earthmap.png", 50, 150, 1.0, false, 1.0, 1.0);
status("loaded");
core.wait(1);
status("fading in...");
ScreenImageMgr.showImage("logo", true);
core.wait(2);
status("fading out...");
ScreenImageMgr.showImage("logo", false);
core.wait(2);
status("Again, but with alpha maximum = 0.5...");
ScreenImageMgr.setImageAlpha("logo", 0.5);
core.wait(2.0);
status("fading in...");
ScreenImageMgr.showImage("logo", true);
core.wait(2);
status("fading out...");
ScreenImageMgr.showImage("logo", false);
core.wait(2);

ScreenImageMgr.deleteAllImages();
LabelMgr.deleteAllLabels();