Skip to content

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 ​

boolloadingfalse
inttotal_steps1
intcurrent_step0
floatprogress_per_step100.0
floatcurrent_step_progress0.0
Tweencurrent_tween

Methods ​

voidreset_loading_state()
voidset_total_steps( steps: int )
voidupdate_step_progress( progress: float )
voidcomplete_step( step: String )
voidstart_loading()
voidend_loading()
voidforce_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