OpenTD.AddIn.UserBreak Class Reference
Last update: 16.07.2025Allow 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:

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()
|
inline |
Member Function Documentation
◆ BreakRequested()
|
inline |
Test whether ESC has been pressed.
Implements OpenTD.AddIn.IUserBreak.
◆ ConfirmationOff()
|
inline |
If confirmation is off, BreakRequested will immediately return true if the user hit ESC.
Implements OpenTD.AddIn.IUserBreak.
◆ ConfirmationOn()
|
inline |
If confirmation is on, BreakRequested will confirm that the user meant to hit ESC before returning true.
Implements OpenTD.AddIn.IUserBreak.
◆ Disable()
|
inline |
Stop listening for ESC.
Implements OpenTD.AddIn.IUserBreak.
◆ 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/OpenTD/OpenTD/AddIn/UserBreak.cs