Skip to content

Commit

Permalink
Removed Id from Window
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczy93 committed Nov 9, 2023
1 parent 451abd6 commit 4ce7969
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CentrED/UI/Windows/ConnectWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class ConnectWindow : Window {
public override void Draw() {
if (!Show) return;

ImGui.Begin(Id, ref _show, ImGuiWindowFlags.NoResize);
ImGui.SetWindowSize(Id, new Vector2(510, 250));
ImGui.Begin(Name, ref _show, ImGuiWindowFlags.NoResize);
ImGui.SetWindowSize(Name, new Vector2(510, 250));
// CenterWindow();
if (ImGui.Combo("Profile", ref _profileIndex, ProfileManager.ProfileNames,
ProfileManager.Profiles.Count)) {
Expand Down
2 changes: 1 addition & 1 deletion CentrED/UI/Windows/DebugWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public override void Draw() {
// ImGuiCond.FirstUseEver);
var uiManager = Application.CEDGame.UIManager;
var mapManager = Application.CEDGame.MapManager;
ImGui.Begin(Id, ref _show, ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize);
ImGui.Begin(Name, ref _show, ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize);
ImGui.Text($"FPS: {uiManager._framesPerSecond:F1}");
ImGui.Text($"Resolution: {uiManager._graphicsDevice.PresentationParameters.BackBufferWidth}x{uiManager._graphicsDevice.PresentationParameters.BackBufferHeight}");
ImGui.Text($"Land tiles: {mapManager.LandTiles.Count}");
Expand Down
2 changes: 1 addition & 1 deletion CentrED/UI/Windows/InfoWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class InfoWindow : Window{
public override void Draw() {
if (!Show) return;

ImGui.Begin(Id, ref _show);
ImGui.Begin(Name, ref _show);
if (Selected is LandObject lo) {
var land = lo.Tile;
ImGui.Text("Land");
Expand Down
2 changes: 1 addition & 1 deletion CentrED/UI/Windows/ServerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ServerWindow : Window {
public override void Draw() {
if (!Show) return;

ImGui.Begin(Id, ref _show );
ImGui.Begin(Name, ref _show );
ImGui.InputText("Config File", ref _configPath, 512);
ImGui.SameLine();
if (ImGui.Button("...")) {
Expand Down
2 changes: 1 addition & 1 deletion CentrED/UI/Windows/TilesWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void FilterTiles() {
public override void Draw() {
if (!Show) return;
ImGui.SetNextWindowSize(new Vector2(250, CEDGame._gdm.GraphicsDevice.PresentationParameters.BackBufferHeight - CEDGame.UIManager._mainMenuHeight), ImGuiCond.FirstUseEver);
ImGui.Begin(Id, ref _show);
ImGui.Begin(Name, ref _show);
if (ImGui.Button("Scroll to selected")) {
_updateScroll = true;
}
Expand Down
2 changes: 1 addition & 1 deletion CentrED/UI/Windows/ToolboxWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ToolboxWindow : Window {
public override void Draw() {
if (!Show) return;

ImGui.Begin(Id, ref _show);
ImGui.Begin(Name, ref _show);
CEDGame.UIManager.tools.ForEach(ToolButton);
ImGui.End();
CEDGame.MapManager.ActiveTool?.DrawWindow();
Expand Down
2 changes: 0 additions & 2 deletions CentrED/UI/Windows/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ public abstract string Name {
get;
}

public string Id => Name.Replace(" ", "");

public virtual string Shortcut => "";

protected bool _show;
Expand Down

0 comments on commit 4ce7969

Please sign in to comment.