Empeld
Empeld plugin documentation.
essentials.Subsystems.Chat.ChatClient Class Reference
Inheritance diagram for essentials.Subsystems.Chat.ChatClient:
pluginbase.Objects.Game.IClientSubsystem pluginbase.Objects.Game.ISubsystem

Public Member Functions

 ChatClient ()
 
void OnStart ()
 
void OnStop ()
 
void Simulate (IFrameTimeState frameTime)
 

Properties

IBuiScreen BuiScreen [get]
 
IRpcManager RpcManager [get]
 
IResourceResolver ResourceResolver [get]
 
IInputManager InputManager [get]
 

Constructor & Destructor Documentation

◆ ChatClient()

essentials.Subsystems.Chat.ChatClient.ChatClient ( )
30  {
31  this.InjectDependencies();
32  this.RpcManager.RegisterClass<ChatClient>(this);
33  _chatServer = this.RpcManager.GetClass<ChatServer>();
34 
35  _chatControl = this.BuiScreen.AddControl(this.ResourceResolver.Resolve("ui/chatroom.xml"));
36  _chatControl.AddCallback(this);
37 
38  _binding = this.InputManager.GetBinding(typeof(ChatClient));
39  _binding.Description = "Chat";
40  _binding.Bind("ShowChat", Key.Slash, () => _chatControl.Invoke("ShowChat"));
41  _binding.StartListening();
42  }
void StartListening()
Start listening to bindings
IBuiScreen BuiScreen
Definition: ChatClient.cs:14
string Description
Gets or sets the description.
Definition: IInputBinding.cs:22
void Bind(string bindName, Action action)
Do an action when the event attached to the bind occurs
void AddCallback(string name, BuiCallbackDelegate method)
Add a callback, by name, that the BUI script can call
IRpcManager RpcManager
Definition: ChatClient.cs:17
ChatClient()
Definition: ChatClient.cs:29
IInputManager InputManager
Definition: ChatClient.cs:23
string Resolve(string resource)
Resolves the data.
IBoundInput GetBinding(string name)
Get or create a new binding class by name
IResourceResolver ResourceResolver
Definition: ChatClient.cs:20
IBuiControl AddControl(string filename)
Add a control by filename

Member Function Documentation

◆ OnStart()

void essentials.Subsystems.Chat.ChatClient.OnStart ( )

Implements pluginbase.Objects.Game.ISubsystem.

45  {
46 
47  }

◆ OnStop()

void essentials.Subsystems.Chat.ChatClient.OnStop ( )

◆ Simulate()

void essentials.Subsystems.Chat.ChatClient.Simulate ( IFrameTimeState  frameTime)

Implements pluginbase.Objects.Game.ISubsystem.

53  {
54  //nada
55  }

Property Documentation

◆ BuiScreen

IBuiScreen essentials.Subsystems.Chat.ChatClient.BuiScreen
getprotected

Attribute: Dependency

◆ InputManager

IInputManager essentials.Subsystems.Chat.ChatClient.InputManager
getprotected

Attribute: Dependency

◆ ResourceResolver

IResourceResolver essentials.Subsystems.Chat.ChatClient.ResourceResolver
getprotected

Attribute: Dependency

◆ RpcManager

IRpcManager essentials.Subsystems.Chat.ChatClient.RpcManager
getprotected

Attribute: Dependency


The documentation for this class was generated from the following file: