OpenTTD
Functions | Variables
progress.cpp File Reference

Functions for modal progress windows. More...

#include "stdafx.h"
#include "thread/thread.h"
#include "safeguards.h"

Go to the source code of this file.

Functions

void SetModalProgress (bool state)
 Set the modal progress state. More...
 
bool IsFirstModalProgressLoop ()
 Check whether this is the first modal progress loop. More...
 

Variables

bool _in_modal_progress = false
 Are we in a modal progress or not?
 
bool _first_in_modal_loop = false
 
ThreadMutex_modal_progress_work_mutex = ThreadMutex::New()
 Rights for the performing work. More...
 
ThreadMutex_modal_progress_paint_mutex = ThreadMutex::New()
 Rights for the painting. More...
 

Detailed Description

Functions for modal progress windows.

Definition in file progress.cpp.

Function Documentation

◆ IsFirstModalProgressLoop()

bool IsFirstModalProgressLoop ( )

Check whether this is the first modal progress loop.

Note
Set by SetModalProgress, unset by calling this method.
Returns
True if this is the first loop.

Definition at line 41 of file progress.cpp.

Referenced by HasModalProgress().

◆ SetModalProgress()

void SetModalProgress ( bool  state)

Set the modal progress state.

Note
Makes IsFirstModalProgressLoop return true for the next call.
Parameters
stateThe new state; are we modal or not?

Definition at line 30 of file progress.cpp.

References _in_modal_progress.

Referenced by DoScanNewGRFFiles(), GenerateWorld(), HasModalProgress(), and ScanNewGRFFiles().

Variable Documentation

◆ _modal_progress_paint_mutex

ThreadMutex* _modal_progress_paint_mutex = ThreadMutex::New()

Rights for the painting.

Definition at line 23 of file progress.cpp.

Referenced by GRFFileScanner::AddFile(), DoScanNewGRFFiles(), HasModalProgress(), ScanNewGRFFiles(), and WaitTillGeneratedWorld().

◆ _modal_progress_work_mutex

ThreadMutex* _modal_progress_work_mutex = ThreadMutex::New()

Rights for the performing work.

Definition at line 21 of file progress.cpp.

Referenced by GRFFileScanner::AddFile(), DoScanNewGRFFiles(), HasModalProgress(), ScanNewGRFFiles(), and WaitTillGeneratedWorld().