Skip to content

Commit

Permalink
Add an ability to disable inventory grid
Browse files Browse the repository at this point in the history
  • Loading branch information
St4lker0k765 authored and Drombeys committed Nov 30, 2024
1 parent 67944b4 commit 2388f65
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 259 deletions.
1 change: 1 addition & 0 deletions gamedata/configs/engine_external.ltx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ title = st_ixray_title ; Mod name
[ui]
HQIcons = false
DisableCharacterInfo = false
DisableInventoryGrid = false ; Uses ui\ui_grid_alt.dds instead of ui\ui_grid.dds

[physics]
DeadBodyRagdoll = false
Expand Down
258 changes: 0 additions & 258 deletions gamedata/textures/ui/ui_font_menu.ini

This file was deleted.

Binary file added gamedata/textures/ui/ui_grid_alt.dds
Binary file not shown.
1 change: 1 addition & 0 deletions src/xrEngine/EngineExternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
enum class EEngineExternalUI {
HQIcons,
DisableCharacterInfo,
DisableInventoryGrid,
None
};

Expand Down
10 changes: 9 additions & 1 deletion src/xrGame/ui/UIDragDropListEx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,15 @@ CUICell& CUIDragDropListEx::GetCellAt(const Ivector2& pos)
CUICellContainer::CUICellContainer(CUIDragDropListEx* parent)
{
m_pParentDragDropList = parent;
hShader->create ( "hud\\fog_of_war", "ui\\ui_grid" );
const static bool isGridDisabled = EngineExternal()[EEngineExternalUI::DisableInventoryGrid];
if (isGridDisabled)
{
hShader->create("hud\\fog_of_war", "ui\\ui_grid_alt");
}
else
{
hShader->create("hud\\fog_of_war", "ui\\ui_grid");
}
// hShader_selected->create ( "hud\\fog_of_war", "ui_grid_selected" );
m_cellSpacing.set ( 0, 0 );
}
Expand Down

0 comments on commit 2388f65

Please sign in to comment.