Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
update_checker.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 
22 {
23 private:
24  bool update_availible = false;
25 
26  //add update checker logic here (RSync via Michaels suggestion?)
27 
28 public:
32  void Draw()
33  {
34  if (!update_availible)
35  {
36  return;
37  }
38 
39  if (!show)
40  {
41  return;
42  }
43 
44  ImGui::OpenPopup(" Update Checker");
45 
47  {
48  ImGui::Text("An update is availible!\nDownload the update?");
50 
51  if (ImGui::Button("Yes", ImVec2(120, 0)))
52  {
53  /*run haloupdate*/
54  }
56 
57  if (ImGui::Button("No", ImVec2(120, 0)))
58  {
59  ImGui::CloseCurrentPopup(); show = false;
60  }
61 
63  }
64  }
65 };
ImGui::EndPopup
IMGUI_API void EndPopup()
Definition: imgui.cpp:7675
BlamImGuiWindow::show
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: imgui.h:34
ImGui::BeginPopupModal
IMGUI_API bool BeginPopupModal(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:7647
BlamImGuiWindow_UpdateChecker
A class containing a theoretical update check dialog.
Definition: update_checker.hpp:21
ImGui::SameLine
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
BlamImGuiWindow
Class representing an ImGUI window.
Definition: imgui.h:31
ImVec2
Definition: imgui.h:179
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
ImGui::OpenPopup
IMGUI_API void OpenPopup(const char *str_id)
Definition: imgui.cpp:7453
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:238
BlamImGuiWindow_UpdateChecker::Draw
void Draw()
Draws the update check dialog.
Definition: update_checker.hpp:32
ImGuiWindowFlags_AlwaysAutoResize
@ ImGuiWindowFlags_AlwaysAutoResize
Definition: imgui.h:720
ImGui::CloseCurrentPopup
IMGUI_API void CloseCurrentPopup()
Definition: imgui.cpp:7581
imgui.h
ImGui::Separator
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
ImGui::Button
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:644