|
OpenTTD Source 20260525-master-g39d4fe24a0
|
Container for the text colour and some text colour related flags for drawing. More...
#include <gfx_type.h>
Public Member Functions | |
| constexpr | ExtendedTextColour (TextColour colour=TextColour::Invalid, ExtendedTextColourFlags flags={}) |
| Create the extended text colour based on a TextColour and optional flags. | |
| constexpr | ExtendedTextColour (PixelColour pc) |
| Create the extended text colour based on a PixelColour. | |
| constexpr auto | operator<=> (const ExtendedTextColour &) const =default |
| Compare with another instance of this class. | |
| constexpr uint16_t | ToNetwork () const |
| Encode this text colour for sending over the network. | |
Static Public Member Functions | |
| static constexpr ExtendedTextColour | FromNetwork (uint16_t tc) |
| Decode the network encoded text colour. | |
Data Fields | |
| TextColour | colour |
| The colour. | |
| ExtendedTextColourFlags | flags {} |
| The flags. | |
Container for the text colour and some text colour related flags for drawing.
Definition at line 348 of file gfx_type.h.
|
inlineconstexpr |
Create the extended text colour based on a TextColour and optional flags.
Definition at line 354 of file gfx_type.h.
References colour, flags, and Invalid.
Referenced by FromNetwork(), and operator<=>().
|
inlineconstexpr |
Create the extended text colour based on a PixelColour.
| pc | The pixel colour for this colour. |
Definition at line 360 of file gfx_type.h.
|
inlinestaticconstexpr |
Decode the network encoded text colour.
| tc | The network encoded colour. |
Definition at line 376 of file gfx_type.h.
References ExtendedTextColour().
Referenced by ServerNetworkAdminSocketHandler::ReceiveAdminExternalChat(), ClientNetworkGameSocketHandler::ReceiveServerExternalChat(), and ClientNetworkGameSocketHandler::ReceiveServerRemoteConsoleCommand().
|
constexprdefault |
Compare with another instance of this class.
References ExtendedTextColour().
|
inlineconstexpr |
Encode this text colour for sending over the network.
Definition at line 382 of file gfx_type.h.
References BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::base(), and to_underlying().
Referenced by NetworkServerSendAdminRcon(), NetworkServerSendRcon(), ServerNetworkAdminSocketHandler::ReceiveAdminExternalChat(), and ServerNetworkGameSocketHandler::SendExternalChat().
| TextColour ExtendedTextColour::colour |
The colour.
Definition at line 362 of file gfx_type.h.
Referenced by ExtendedTextColour(), ExtendedTextColour(), IsValidConsoleColour(), FontState::SetColour(), and SetColourRemap().
| ExtendedTextColourFlags ExtendedTextColour::flags {} |
The flags.
Definition at line 363 of file gfx_type.h.
Referenced by DrawLayoutLine(), ExtendedTextColour(), ExtendedTextColour(), IsValidConsoleColour(), FontState::SetColour(), and SetColourRemap().