diff options
| author | TrickyLeifa <date.epoch@gmail.com> | 2024-05-16 03:09:21 +0200 |
|---|---|---|
| committer | TrickyLeifa <date.epoch@gmail.com> | 2024-05-16 03:09:21 +0200 |
| commit | 39e4354b1dae5d8487ea5b84be9f304b1950a61a (patch) | |
| tree | 734c99d3ef1a8e69007dd870a8b6763deca5ffce /src/datatypes.h | |
| parent | a0cee58c048772b2dcfe3992f60728d5a6f7d786 (diff) | |
Reimplemented favorite server widget, ...
* Reworked favorite server widget
* Renamed `server_type` to `ServerInfo`
* Renamed `connection_type` to `ServerConnectionType`
* Refactored `AOCharButton`
* Reimplemented `AOButton`
* Partially reimplemented `AOEmoteButton`
* Refactored `AOEvidenceButton`
Diffstat (limited to 'src/datatypes.h')
| -rw-r--r-- | src/datatypes.h | 60 |
1 files changed, 9 insertions, 51 deletions
diff --git a/src/datatypes.h b/src/datatypes.h index 19263f84..1258136b 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -3,35 +3,24 @@ #include <QMap> #include <QString> -enum connection_type +enum ServerConnectionType { - TCP, - WEBSOCKETS, + TcpServerConnection, + WebSocketServerConnection, }; -static QMap<QString, connection_type> to_connection_type = {{"tcp", connection_type::TCP}, {"ws", connection_type::WEBSOCKETS}}; +static const QMap<QString, ServerConnectionType> SERVER_CONNECTION_TYPE_STRING_MAP = {{"tcp", ServerConnectionType::TcpServerConnection}, {"ws", ServerConnectionType::WebSocketServerConnection}}; -struct server_type +struct ServerInfo { QString name; - QString desc; + QString description; QString ip; int port; - connection_type socket_type; -}; - -struct emote_type -{ - QString comment; - QString preanim; - QString anim; - int mod; - QString sfx_name; - int sfx_delay; - int sfx_duration; + ServerConnectionType socket_type; }; -struct char_type +struct CharacterSlot { QString name; QString description; @@ -39,44 +28,13 @@ struct char_type bool taken; }; -struct evi_type +struct EvidenceItem { QString name; QString description; QString image; }; -struct chatmessage_type -{ - QString message; - QString character; - QString side; - QString sfx_name; - QString pre_emote; - QString emote; - int emote_modifier; - int objection_modifier; - int realization; - int text_color; - int evidence; - int cid; - int sfx_delay; - int flip; -}; - -struct area_type -{ - QString name; - QString background; - bool passworded; -}; - -struct pos_type -{ - int x; - int y; -}; - struct pos_size_type { int x = 0; |
