MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / MenuInit

Method MenuInit

KBotExt/DirectX.cpp:243–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241}
242
243void Direct3D11Render::MenuInit()
244{
245 ImGuiIO& io = ImGui::GetIO();
246 (void)io;
247 io.IniFilename = nullptr;
248 io.LogFilename = nullptr;
249 io.FontGlobalScale = S.fontScale;
250
251 InitializeFonts();
252
253 ImGuiStyle& style = ImGui::GetStyle();
254
255 //Main
256 style.WindowPadding = ImVec2(4.f, 4.f);
257 style.FramePadding = ImVec2(3.f, 3.f);
258 style.ItemSpacing = ImVec2(5.f, 5.f);
259 style.ItemInnerSpacing = ImVec2(5.f, 5.f);
260 style.TouchExtraPadding = ImVec2(0.f, 0.f);
261 style.ScrollbarSize = 15.f;
262 style.GrabMinSize = 15.f;
263 //Borders
264 style.WindowBorderSize = 1.f;
265 style.ChildBorderSize = 1.f;
266 style.PopupBorderSize = 1.f;
267 style.FrameBorderSize = 1.f;
268 style.TabBorderSize = 1.f;
269 //Rounding
270 style.WindowRounding = 0.f;
271 style.ChildRounding = 0.f;
272 style.FrameRounding = 0.f;
273 style.PopupRounding = 0.f;
274 style.ScrollbarRounding = 0.f;
275 style.GrabRounding = 0.f;
276 style.LogSliderDeadzone = 5.f;
277 style.TabRounding = 0.f;
278 //Alignment
279 style.WindowTitleAlign = ImVec2(0.f, 0.f);
280 style.WindowMenuButtonPosition = 0;
281 style.ColorButtonPosition = 1;
282 style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
283 style.SelectableTextAlign = ImVec2(0.5f, 0.5f);
284 //AntiAliasing
285 style.AntiAliasedLines = false;
286 style.AntiAliasedLinesUseTex = false;
287 style.AntiAliasedFill = false;
288
289 ImVec4* colors = ImGui::GetStyle().Colors;
290 colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
291 colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
292 colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.50f);
293 colors[ImGuiCol_ChildBg] = ImVec4(0.01f, 0.00f, 0.00f, 0.00f);
294 colors[ImGuiCol_PopupBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.50f);
295 colors[ImGuiCol_Border] = ImVec4(1.00f, 1.00f, 1.00f, 0.20f);
296 colors[ImGuiCol_BorderShadow] = ImVec4(1.00f, 1.00f, 1.00f, 0.04f);
297 colors[ImGuiCol_FrameBg] = ImVec4(0.01f, 0.00f, 0.00f, 0.00f);
298 colors[ImGuiCol_FrameBgHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.39f);
299 colors[ImGuiCol_FrameBgActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.39f);
300 colors[ImGuiCol_TitleBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.50f);

Callers

nothing calls this directly

Calls 2

ImVec2Function · 0.85
ImVec4Class · 0.85

Tested by

no test coverage detected