28 ImGui::OpenPopup(
"Import from URL##ImportModal");
31 ImGuiWindowFlags_AlwaysAutoResize))
33 ImGui::Text(
"Paste an Armory, Battle.net, or Wowhead URL:");
38 ImGui::SetKeyboardFocusHere();
42 ImGui::SetNextItemWidth(500);
46 if (ImGui::Button(
"Import", ImVec2(120, 0)))
49 if (ImGui::Button(
"Cancel", ImVec2(120, 0)))
52 ImGui::CloseCurrentPopup();
115 ImGui::OpenPopup(
"About WoW Model Viewer");
118 ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove))
126 int n = WideCharToMultiByte(CP_UTF8, 0, wTitle.c_str(),
127 static_cast<int>(wTitle.size()),
nullptr, 0,
nullptr,
nullptr);
129 WideCharToMultiByte(CP_UTF8, 0, wTitle.c_str(),
130 static_cast<int>(wTitle.size()), title.data(), n,
nullptr,
nullptr);
132 title.assign(wTitle.begin(), wTitle.end());
135 ImGui::TextColored(ImVec4(0.4f, 0.8f, 1.0f, 1.0f),
"%s", title.c_str());
138 ImGui::Text(
"A 3D model viewer for World of Warcraft game assets.");
140 ImGui::Text(
"Built with GLFW, OpenGL, and Dear ImGui.");
141 ImGui::Text(
"Uses CASCLib for game data access.");
144 ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f),
"https://wowmodelviewer.net");
145 ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1.0f),
"https://github.com/wowmodelviewer/wowmodelviewer");
147 ImGui::Text(
"GL_RENDERER: %s", glGetString(GL_RENDERER));
148 ImGui::Text(
"GL_VERSION: %s", glGetString(GL_VERSION));
151 if (ImGui::Button(
"Close", ImVec2(120, 0)))
154 ImGui::CloseCurrentPopup();
165 ImGui::OpenPopup(
"Language / Locale");
168 ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoMove))
172 ImGui::TextWrapped(
"Game data is not loaded. Load WoW first, then change the locale here.");
174 if (ImGui::Button(
"OK", ImVec2(120, 0)))
177 ImGui::CloseCurrentPopup();
182 ImGui::Text(
"Current locale: %s",
GAMEDIRECTORY.locale().c_str());
184 ImGui::Text(
"Select a different locale to reload game data:");
188 for (
int i = 0; i < static_cast<int>(configs.size()); ++i)
190 std::string label = configs[i].locale +
" - " + configs[i].product;
191 bool isCurrent = (configs[i].locale ==
GAMEDIRECTORY.locale());
193 ImGui::BeginDisabled();
195 if (ImGui::Button(label.c_str(), ImVec2(-1, 0)))
198 ImGui::CloseCurrentPopup();
208 ImGui::EndDisabled();
212 if (ImGui::Button(
"Cancel", ImVec2(120, 0)))
215 ImGui::CloseCurrentPopup();