Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CentrED/Languages/LangEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,4 +282,12 @@ public enum LangEntry
EDGE_FALLOFF,
FALLOFF_START,
FALLOFF_START_TOOLTIP,
WALL,
SURFACE,
ROOF,
FOLIAGE,
WINDOW,
WATER,
STAIRS,

}
11 changes: 10 additions & 1 deletion CentrED/Map/MapManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ public Tool ActiveTool

private readonly CentrEDClient Client;

public bool ShowStairs = true;
public bool ShowWater = true;
public bool ShowWindow = true;
public bool ShowFoliage = true;
public bool ShowRoof = true;
public bool ShowWall = true;
public bool ShowSurface = true;
public bool ShowLand = true;
public bool ShowStatics = true;
public bool ShowVirtualLayer = false;
Expand Down Expand Up @@ -867,7 +874,9 @@ public bool CanDrawStatic(StaticObject so)
// Outlands specific
// if ((data.Flags & TileFlag.NoDraw) != 0)
// return false;

if((!ShowWall && data.IsWall) || (!ShowSurface && data.IsSurface) || (!ShowFoliage && data.IsFoliage) || (!ShowRoof && data.IsRoof) || (!ShowWindow && data.IsWindow) || (!ShowWater && data.IsWet) || (!ShowStairs && data.IsBridge) )
return false;

if (!ShowNoDraw)
{
switch (id)
Expand Down
16 changes: 16 additions & 0 deletions CentrED/UI/Windows/FilterWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ protected override void InternalDraw()
ImGui.Checkbox(LangManager.Get(OBJECTS), ref CEDGame.MapManager.ShowStatics);
ImGui.SameLine();
ImGui.Checkbox(LangManager.Get(NODRAW), ref CEDGame.MapManager.ShowNoDraw);

ImGui.Checkbox(LangManager.Get(WALL), ref CEDGame.MapManager.ShowWall);
ImGui.SameLine();
ImGui.Checkbox(LangManager.Get(WINDOW), ref CEDGame.MapManager.ShowWindow);
ImGui.SameLine();
ImGui.Checkbox(LangManager.Get(ROOF), ref CEDGame.MapManager.ShowRoof);

ImGui.Checkbox(LangManager.Get(SURFACE), ref CEDGame.MapManager.ShowSurface);
ImGui.SameLine();
ImGui.Checkbox(LangManager.Get(WATER), ref CEDGame.MapManager.ShowWater);
ImGui.SameLine();
ImGui.Checkbox(LangManager.Get(FOLIAGE), ref CEDGame.MapManager.ShowFoliage);


ImGui.Checkbox(LangManager.Get(STAIRS), ref CEDGame.MapManager.ShowStairs);

if (ImGui.BeginChild("Filters"))
{
if (ImGui.BeginTabBar("FiltersTabs"))
Expand Down