Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
network_stats.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../debug_ui.h"
4 
6 
8 {
18  {
19  public:
22 
23  void Draw()
24  {
25  // shows all network info too be noted..
26  if (show)
27  {
28  ImGui::Begin("Network Stats", &show);
29 
30  ImVec4 statusColor;
31 
33  {
34  statusColor = ImColor(0, 255, 0);
35  }
36  else
37  {
38  statusColor = ImColor(255, 0, 0);
39  }
40 
41  ImGui::Text("Status:");
42  ImGui::SameLine();
43  ImGui::TextColored(statusColor, Blam::Network::IsConnected() ? "Connected!" : "Disconnected!");
44  ImGui::Text("Host: localhost");
45  ImGui::Text("Ping: 0ms");
46 
47  ImGui::End();
48  }
49 
50  }
51  };
52 }
Blam::DebugUI::Windows::NetworkStats::~NetworkStats
~NetworkStats()
Definition: network_stats.hpp:21
Blam::Network::IsConnected
BLAM bool IsConnected()
Definition: socket.cpp:380
Blam::DebugUI::Windows::NetworkStats
Class for the Network Stats dialog.
Definition: network_stats.hpp:17
Blam::DebugUI::Windows::NetworkStats::Draw
void Draw()
Draws the contents of the group.
Definition: network_stats.hpp:23
Blam::DebugUI::ImGUIDrawingGroup::show
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: debug_ui.h:362
Blam::DebugUI::Windows::NetworkStats::NetworkStats
NetworkStats()
Definition: network_stats.hpp:20
Blam::DebugUI::ImGUIDrawingGroup
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
socket.h
Blam::DebugUI::Windows
Legacy namespace to contain data for the legacy ImGUI console.
Definition: debug_ui.h:434
Text
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73