-
-
Notifications
You must be signed in to change notification settings - Fork 491
ScriptingFloatingImage
SuperTux Bot edited this page Aug 12, 2024
·
7 revisions
This file is auto-generated from the SuperTux source code, using the template ScriptingPage.md.
This class provides the ability to create, edit, and remove images floating in midair on the screen.
Floating Images are created in a script or from the console. Constructor:
<floatimage> <- FloatingImage(string filename)
This creates a FloatingImage
from filename
(which is relative to the data directory root).
This class inherits functions and variables from the following base classes:
Method | Explanation |
---|---|
void set_layer(int layer) |
Sets the layer of the floating image. |
int get_layer() |
Returns the layer the floating image is on. |
void set_pos(float x, float y) |
Sets the location of the image in relation to the current anchor point. |
float get_x() |
Returns the image's X coordinate relative to the current anchor point. |
float get_y() |
Returns the image's Y coordinate relative to the current anchor point. |
float get_pos_x() |
Deprecated! Use get_x() instead! Returns the image's X coordinate relative to the current anchor point. |
float get_pos_y() |
Deprecated! Use get_y() instead! Returns the image's Y coordinate relative to the current anchor point. |
void set_anchor_point(int anchor) |
Sets the image's anchor point.anchor - Anchor point as represented by the ANCHOR_* constants (see AnchorPoints). |
int get_anchor_point() |
Returns the current anchor point. |
void set_visible(bool visible) |
Sets the visibility of the floating image. |
bool get_visible() |
Returns the visibility state of the floating image. |
void set_action(string action) |
Sets the action of the image.action - Name of the action, as defined in the sprite. |
string get_action() |
Returns the name of the action of the image, as defined in the sprite. |
void fade_in(float time) |
Fades in the image for the next time seconds. |
void fade_out(float time) |
Fades out the image for the next time seconds. |
Variable | Explanation |
---|---|
int layer |
|
bool visible |
|
int anchor_point |
The current anchor point. |
None.
Home
Guidelines
Game Mechanics
Tools
Engine
- Cameras in other games
- Collision
- Configuration File
- Console
- Cutscenes
- Game_Engine
- Lighting
- Map_transformer
- Portables
- SceneGraph
- Scripting
Specifications
Milestones
- Milestone 1 Analysis
- Milestone 2 Design Document
- Milestone 2 Design Document Old
- Milestone 3 Design Document
Building (mostly outdated)
- INSTALL.md
- Building
- Building on macOS
- Building SuperTux
- Building on Windows
- Building with MXE (cross-compile)
Meetings