Skip to content

Commit

Permalink
ADD: windows alpha semi-transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1t3lord committed Sep 21, 2024
1 parent 3a5d187 commit e9e35c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/xrGame/ImUtils/SearchManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ void RenderSearchManagerWindow()
if (g_pClsidManager == nullptr)
return;

ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.0f, 0.0f, 0.0f, 0.4f));
if (ImGui::Begin("Search Manager"), &Engine.External.EditorStates[static_cast<u8>(EditorUI::Game_SearchManager)])
{
constexpr size_t kItemSize = sizeof(imgui_search_manager.combo_items) / sizeof(imgui_search_manager.combo_items[0]);
Expand Down Expand Up @@ -246,6 +247,7 @@ void RenderSearchManagerWindow()

ImGui::End();
}
ImGui::PopStyleColor(1);
}

clsid_manager imgui_clsid_manager;
Expand Down Expand Up @@ -311,10 +313,10 @@ void InitImGuiCLSIDInGame()
imgui_clsid_manager.add_ammo(imgui_clsid_manager.ammo_m209);
imgui_clsid_manager.add_ammo(imgui_clsid_manager.ammo_f1);
imgui_clsid_manager.add_ammo(imgui_clsid_manager.ammo_rgd5);

imgui_clsid_manager.add_outfit(imgui_clsid_manager.outfit);
imgui_clsid_manager.add_outfit(imgui_clsid_manager.helmet);

imgui_clsid_manager.add_addon(imgui_clsid_manager.addon_scope);
imgui_clsid_manager.add_addon(imgui_clsid_manager.addon_silen);
imgui_clsid_manager.add_addon(imgui_clsid_manager.addon_glaun);
Expand Down Expand Up @@ -350,7 +352,7 @@ void InitImGuiCLSIDInGame()
imgui_clsid_manager.add_mp_stuff(imgui_clsid_manager.mp_weapon_val);
imgui_clsid_manager.add_mp_stuff(imgui_clsid_manager.mp_weapon_vintorez);
imgui_clsid_manager.add_mp_stuff(imgui_clsid_manager.mp_weapon_walther);

imgui_clsid_manager.add_mp_stuff(imgui_clsid_manager.mp_ammo_base);
imgui_clsid_manager.add_mp_stuff(imgui_clsid_manager.mp_ammo_og7b);
imgui_clsid_manager.add_mp_stuff(imgui_clsid_manager.mp_ammo_m209);
Expand Down
2 changes: 2 additions & 0 deletions src/xrGame/ImUtils/SpawnManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ void RenderSpawnManagerWindow() {
});
};

ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.0f, 0.0f, 0.0f, 0.4f));
if (ImGui::Begin("Spawn Manager", &Engine.External.EditorStates[static_cast<u8>(EditorUI::Game_SpawnManager)]))
{
if (ImGui::Checkbox("spawn on Level", &imgui_spawn_manager.spawn_on_level))
Expand Down Expand Up @@ -756,6 +757,7 @@ void RenderSpawnManagerWindow() {

ImGui::End();
}
ImGui::PopStyleColor(1);
}

void SpawnManager_ProcessSections(Section& sections, size_t& number_imgui)
Expand Down
4 changes: 3 additions & 1 deletion src/xrGame/ImUtils/WeaponManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void RenderWeaponManagerWindow()
imgui_weapon_manager.inv_grid_y = pItem->GetInvGridRect().y1;
imgui_weapon_manager.inv_grid_width = pItem->GetInvGridRect().x2;
imgui_weapon_manager.inv_grid_height = pItem->GetInvGridRect().y2;

if (Render)
{
imgui_weapon_manager.ui_icons = Render->getSurface("ui\\ui_icon_equipment");
Expand Down Expand Up @@ -1059,6 +1059,7 @@ void RenderWeaponManagerWindow()
}
};

ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.0f, 0.0f, 0.0f, 0.4f));
if (ImGui::Begin("Weapon Manager", &Engine.External.EditorStates[static_cast<u8>(EditorUI::Game_WeaponManager)]))
{
if (ImGui::BeginTabBar("##TB_InGameWeaponManager"))
Expand Down Expand Up @@ -1112,4 +1113,5 @@ void RenderWeaponManagerWindow()

ImGui::End();
}
ImGui::PopStyleColor(1);
}

0 comments on commit e9e35c7

Please sign in to comment.