Skip to main content

OpenTD .NET4 reference 2025 R2

OpenTD.AddIn.UserBreak Class Reference

Last update: 16.07.2025

Allow end users to cancel long-running tasks by pressing ESC. Only works with OpenTD AddIn's created using the IAddIn interface. More...

Inheritance diagram for OpenTD.AddIn.UserBreak:
OpenTD.TdConnectedOpenTD.AddIn.IUserBreak

Public Member Functions

 UserBreak (ThermalDesktop _td)
 
void Enable ()
 Start listening for ESC.
 
void Disable ()
 Stop listening for ESC.
 
bool BreakRequested ()
 Test whether ESC has been pressed.
 
void ConfirmationOn ()
 If confirmation is on, BreakRequested will confirm that the user meant to hit ESC before returning true.
 
void ConfirmationOff ()
 If confirmation is off, BreakRequested will immediately return true if the user hit ESC.
 

Detailed Description

Allow end users to cancel long-running tasks by pressing ESC. Only works with OpenTD AddIn's created using the IAddIn interface.

<exclude >

Constructor & Destructor Documentation

◆ UserBreak()

OpenTD.AddIn.UserBreak.UserBreak ( ThermalDesktop _td)
inline

Member Function Documentation

◆ BreakRequested()

bool OpenTD.AddIn.UserBreak.BreakRequested ( )
inline

Test whether ESC has been pressed.

Implements OpenTD.AddIn.IUserBreak.

◆ ConfirmationOff()

void OpenTD.AddIn.UserBreak.ConfirmationOff ( )
inline

If confirmation is off, BreakRequested will immediately return true if the user hit ESC.

Implements OpenTD.AddIn.IUserBreak.

◆ ConfirmationOn()

void OpenTD.AddIn.UserBreak.ConfirmationOn ( )
inline

If confirmation is on, BreakRequested will confirm that the user meant to hit ESC before returning true.

Implements OpenTD.AddIn.IUserBreak.

◆ Disable()

void OpenTD.AddIn.UserBreak.Disable ( )
inline

Stop listening for ESC.

Implements OpenTD.AddIn.IUserBreak.

◆ Enable()

void OpenTD.AddIn.UserBreak.Enable ( )
inline

Start listening for ESC.

Implements OpenTD.AddIn.IUserBreak.


The documentation for this class was generated from the following file:
  • C:/Users/mgarrett/source/repos/BuildsTdSuite/builds/TDDEV_ALPHA/buildXX/OpenTD/AddIn/UserBreak.cs

Connect with Ansys