|
OpenTTD Source 20260218-master-g2123fca5ea
|
Template version of Button, with callback support. More...
Public Member Functions | |
| Button (SpriteID sprite, StringID tooltip, Colours colour, T id, ButtonCallback proc, bool disabled=false) | |
| void | OnClick (struct NetworkClientListWindow *w, Point pt) override |
| OnClick handler for when the button is pressed. | |
| Public Member Functions inherited from ButtonCommon | |
| ButtonCommon (SpriteID sprite, StringID tooltip, Colours colour, bool disabled=false) | |
Private Types | |
| typedef void(* | ButtonCallback) (struct NetworkClientListWindow *w, Point pt, T id) |
| Callback function to call on click. | |
Private Attributes | |
| T | id |
| ID this button belongs to. | |
| ButtonCallback | proc |
| Callback proc to call when button is pressed. | |
Additional Inherited Members | |
| Data Fields inherited from ButtonCommon | |
| SpriteID | sprite |
| The sprite to use on the button. | |
| StringID | tooltip |
| The tooltip of the button. | |
| Colours | colour |
| The colour of the button. | |
| bool | disabled |
| Is the button disabled? | |
| uint | height |
| Calculated height of the button. | |
| uint | width |
| Calculated width of the button. | |
Template version of Button, with callback support.
Definition at line 1352 of file network_gui.cpp.
|
private |
Callback function to call on click.
Definition at line 1354 of file network_gui.cpp.
|
inline |
Definition at line 1359 of file network_gui.cpp.
|
inlineoverridevirtual |
OnClick handler for when the button is pressed.
| w | The window the click was in. |
| pt | The location the click was at. |
Implements ButtonCommon.
Definition at line 1367 of file network_gui.cpp.
|
private |
ID this button belongs to.
Definition at line 1355 of file network_gui.cpp.
|
private |
Callback proc to call when button is pressed.
Definition at line 1356 of file network_gui.cpp.
Referenced by Button< CompanyID >::OnClick().