messages.impl module¶
Provides user message implementations.
-
class
messages.impl.
UserMessageData
(**kwargs)[source]¶ Bases:
dict
A dict that keeps track whether it has been modified.
-
class
messages.impl.
UserMessageImpl
[source]¶ Bases:
object
Base class for user message implementations.
-
classmethod
read
(buffer)[source]¶ A wrapper for
read_protobuf()
andread_bitbuffer()
.Parameters: buffer – The buffer to read. Return type: UserMessageData
-
static
read_bitbuffer
(buffer)[source]¶ Read data from the given buffer.
Parameters: buffer (BitBufferRead) – The buffer to read. Return type: UserMessageData
-
static
read_protobuf
(buffer)[source]¶ Read data from the given buffer.
Parameters: buffer (ProtobufMessage) – The buffer to read. Return type: UserMessageData
-
classmethod
write
(buffer, data)[source]¶ A wrapper for
write_protobuf()
andwrite_bitbuffer()
.Parameters: buffer – The buffer to write. Return type: UserMessageData
-
static
write_bitbuffer
(buffer, data)[source]¶ Write data to the given buffer.
Parameters: - buffer (BitBufferWrite) – The buffer to write to.
- data (UserMessageData) – User message data that should be written to the buffer.
-
static
write_protobuf
(buffer, data)[source]¶ Write data to the given buffer.
Parameters: - buffer (ProtobufMessage) – The buffer to write to.
- data (UserMessageData) – User message data that should be written to the buffer.
-
classmethod
-
class
messages.impl.
SayText2Impl
[source]¶ Bases:
messages.impl.UserMessageImpl
SayText2 implementation.
-
class
messages.impl.
ShowMenuImpl
[source]¶ Bases:
messages.impl.UserMessageImpl
ShowMenu implementation.
-
class
messages.impl.
VGUIMenuImpl
[source]¶ Bases:
messages.impl.UserMessageImpl
VGUIMenu implementation.
-
messages.impl.
get_user_message_impl
(msg_index)[source]¶ Return the user message implementation for the given message index.
Parameters: msg_index (int) – The index of the user message. Raises: NotImplementedError – Raised if the given user message is not implemented. Return type: UserMessageImpl