LoadingScreen ​
Inherits: Control
LoadingScreen manages the visual feedback during loading processes, providing step-by-step progress updates and status information. It handles multiple loading steps and calculates overall progress while displaying current operations.
Description ​
Key features:
- Tracks and displays overall loading progress
- Shows current step information and completion status
- Supports multi-step loading processes with individual progress tracking
- Provides visual feedback through progress bar and text updates
- Manages loading screen visibility states
- Calculates and displays accurate progress percentages
Variables ​
bool | loading | false |
int | total_steps | 1 |
int | current_step | 0 |
float | progress_per_step | 100.0 |
float | current_step_progress | 0.0 |
Tween | current_tween |
Methods ​
void | reset_loading_state() |
void | set_total_steps( steps: int ) |
void | update_step_progress( progress: float ) |
void | complete_step( step: String ) |
void | start_loading() |
void | end_loading() |
void | force_end_loading() |
Signals ​
loading_finished() ​
Called when the loading screen has finished
Variable descriptions ​
bool loading = false ​
Flag indicating if loading process is active
int total_steps = 1 ​
Total number of steps in current loading process
int current_step = 0 ​
Index of current step being processed
float progress_per_step = 100.0 ​
Progress percentage allocated per step
float current_step_progress = 0.0 ​
Current progress within the active step
Tween current_tween ​
Progress bar tween
Method descriptions ​
void reset_loading_state() ​
Resets the loading state
void set_total_steps( steps: int ) ​
Set the total number of steps for this loading process
void update_step_progress( progress: float ) ​
Update progress for the current step (progress should be 0.0 to 1.0)
void complete_step( step: String ) ​
Complete the current step and move to the next
void start_loading() ​
Start the loading screen
void end_loading() ​
Cleans up and ends the loading screen normally
void force_end_loading() ​
Emergency cleanup function to immediately stop the loading screen