|
OpenTTD Source
1.10.0-RC1
|
Public Member Functions | |
| GUITimer (uint interval) | |
| bool | HasElapsed () const |
| void | SetInterval (uint interval) |
| uint | CountElapsed (uint delta) |
| Count how many times the interval has elapsed. More... | |
| bool | Elapsed (uint delta) |
| Test if a timer has elapsed. More... | |
Protected Attributes | |
| uint | timer |
| uint | interval |
Definition at line 13 of file guitimer_func.h.
|
inline |
Count how many times the interval has elapsed.
Use to ensure a specific amount of events happen within a timeframe, e.g. for animation.
| delta | Time since last test. |
Definition at line 40 of file guitimer_func.h.
Referenced by Elapsed(), StatusBarWindow::OnRealtimeTick(), AboutWindow::OnRealtimeTick(), and NewsWindow::OnRealtimeTick().
|
inline |
Test if a timer has elapsed.
Use to ensure an event happens only once within a timeframe, e.g. for window updates.
| delta | Time since last test. |
Definition at line 55 of file guitimer_func.h.
References CountElapsed().
Referenced by StatusBarWindow::OnRealtimeTick(), MainWindow::OnRealtimeTick(), DropdownWindow::OnRealtimeTick(), FramerateWindow::OnRealtimeTick(), NewGRFParametersWindow::OnRealtimeTick(), AISettingsWindow::OnRealtimeTick(), FrametimeGraphWindow::OnRealtimeTick(), NetworkGameWindow::OnRealtimeTick(), MainToolbarWindow::OnRealtimeTick(), ScenarioEditorToolbarWindow::OnRealtimeTick(), and UpdateWindows().