4 #include "../../debug_ui.h"
22 bool show_license_key_failed =
false;
47 ImGui::OpenPopup(
" Access Restricted");
48 if (ImGui::BeginPopupModal(
" Access Restricted", NULL, ImGuiWindowFlags_AlwaysAutoResize))
50 static char key1[255] =
"haloman30@CUND82443161A";
51 static char key2[255] =
"00000000000000000000000";
52 static char key3[255] =
"haloman30@CUND82443161A";
53 static char key4[255] =
"haloman30@CUND82443161A";
54 static char key_generic[255] =
"altkey";
57 ImGui::Text(
"You are attempting to launch a development build of the engine.\nTo continue, you must input your developer access key.\nThis can be found on the Gitlab repository.");
60 ImGui::InputText(
"Access Key", access_key, IM_ARRAYSIZE(access_key));
131 std::string strAKey(access_key);
132 std::string strKey1(key1);
133 std::string strKey2(key2);
134 std::string strKey3(key3);
135 std::string strKey4(key4);
136 std::string strKeyGeneric(key_generic);
138 if (ImGui::Button(
"Accept", ImVec2(120, 0)))
147 if (access_key == strKey1)
151 show_license_key_failed =
false;
153 else if (access_key == strKeyGeneric)
157 show_license_key_failed =
false;
159 else if (access_key == strKey2)
163 show_license_key_failed =
false;
165 else if (access_key == strKey3)
169 show_license_key_failed =
false;
171 else if (access_key == strKey4)
175 show_license_key_failed =
false;
181 show_license_key_failed =
true;
189 if (show_license_key_failed)
191 ImGui::OpenPopup(
" Wrong Access Key");
193 if (ImGui::BeginPopupModal(
" Wrong Access Key", NULL, ImGuiWindowFlags_AlwaysAutoResize))
201 if (ImGui::Button(
"Retry", ImVec2(120, 0)))
203 show_license_key_failed =
false;
207 if (ImGui::Button(
"Cancel", ImVec2(120, 0)))