Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
ip_test.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../debug_ui.h"
4 
5 
7 {
19  {
20  public:
24  IPTest() {};
25 
29  ~IPTest() {};
30 
34  void Draw()
35  {
36  //Master server connection
37  if (show)
38  {
39  ImGui::Begin("Test Master Server Connection", &show, ImGuiWindowFlags_AlwaysAutoResize/* | ImGuiWindowFlags_HasBorder*/);
40  static char iptest[255] = "343.host.elaztek.com"; //dedicatedHost
41 
42 
43 
44  ImGui::Text("This tool is used to test the connection to the Elaztek Master Server.\nAlternatively, you can test any of the fallback servers by changing the IP.\n");
45 
46  ImGui::InputText("IP:", iptest, IM_ARRAYSIZE(iptest));
47  ImGui::SameLine(); Blam::DebugUI::Widgets::ShowHelpMarker("Input the IP address to test in this box.\nYou may use a DNS host (dns.domain.com) or a direct IP (1.2.3.4)");
48 
50  if (ImGui::Button("Test", ImVec2(120, 0))) { /*ping*/ }
51 
52  ImGui::End();
53 
54  }
55  }
56  };
57 }
Blam::DebugUI::Widgets::ShowHelpMarker
BLAM void ShowHelpMarker(const char *desc)
Shows a help indicator.
Definition: widgets.cpp:7
Blam::DebugUI::Windows::IPTest::IPTest
IPTest()
Empty constructor.
Definition: ip_test.hpp:24
ImGui::InputText
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition: imgui_widgets.cpp:3068
ImGui::End
IMGUI_API void End()
Definition: imgui.cpp:6016
Blam::DebugUI::Windows::IPTest
Legacy IP test dialog.
Definition: ip_test.hpp:18
ImGui::SameLine
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
ImVec2
Definition: imgui.h:179
ImGui::Begin
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:238
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::ImGUIDrawingGroup
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
IM_ARRAYSIZE
#define IM_ARRAYSIZE(_ARR)
Definition: imgui.h:75
Blam::DebugUI::Windows::IPTest::Draw
void Draw()
Draws the window.
Definition: ip_test.hpp:34
ImGuiWindowFlags_AlwaysAutoResize
@ ImGuiWindowFlags_AlwaysAutoResize
Definition: imgui.h:720
ImGui::Separator
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
Blam::DebugUI::Windows::IPTest::~IPTest
~IPTest()
Empty destructor.
Definition: ip_test.hpp:29
Blam::DebugUI::Windows
Legacy namespace to contain data for the legacy ImGUI console.
Definition: ui.h:14
ImGui::Button
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:644