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
1 change: 1 addition & 0 deletions CentrED/Data/Languages/English.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ CLOSE_MINIMAP=Close minimap
OPEN_MINIMAP=Open minimap
AREA=Area
SELECTED_TILE=Selected tile
SELECTED_TILE_TOOLTIP=Grabs coordinates from the currently selected tile in the Info Window
TOOLS=Tools
PARAMETERS=Parameters
VALIDATE=Validate
Expand Down
1 change: 1 addition & 0 deletions CentrED/Languages/LangEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public enum LangEntry
OPEN_MINIMAP,
AREA,
SELECTED_TILE,
SELECTED_TILE_TOOLTIP,
TOOLS,
PARAMETERS,
VALIDATE,
Expand Down
19 changes: 19 additions & 0 deletions CentrED/Tools/LargeScale/Operations/CopyMove.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using CentrED.Client.Map;
using CentrED.Network;
using CentrED.UI;
using CentrED.UI.Windows; // Required for InfoWindow
using Hexa.NET.ImGui;
using static CentrED.Application;
using static CentrED.LangEntry;
Expand Down Expand Up @@ -50,6 +51,24 @@ public override bool DrawUI()
ImGui.SameLine();
changed |= ImGui.RadioButton(LangManager.Get(COORD_MODE_ABSOLUTE), ref copyMove_coordMode, 1);

// Only show if Absolute Mode is enabled, on the same line
if (copyMove_coordMode == 1)
{
ImGui.SameLine();
if (ImGui.Button(LangManager.Get(SELECTED_TILE) + "##target"))
{
var tile = CEDGame.UIManager.GetWindow<InfoWindow>().Selected;
if (tile != null)
{
copyMove_inputX = tile.Tile.X;
copyMove_inputY = tile.Tile.Y;
changed = true; // Updates inputs immediately
}
}
ImGui.SetItemTooltip(LangManager.Get(SELECTED_TILE_TOOLTIP));
}
// --------------------------

if (prevMode != copyMove_coordMode && _hasArea)
{
if (copyMove_coordMode == 1)
Expand Down
7 changes: 7 additions & 0 deletions CentrED/UI/Windows/LargeScaleOperationsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ protected override void InternalDraw()

ImGui.Text(LangManager.Get(AREA));
ImGui.PushItemWidth(90);

// --- X1 / Y1 SECTION ---
if(ImGuiEx.InputUInt16("X1", ref x1, 0, (ushort)(CEDClient.WidthInTiles - 1)))
canSubmit = false;
ImGui.SameLine();
Expand All @@ -74,6 +76,9 @@ protected override void InternalDraw()
canSubmit = false;
}
}
ImGui.SetItemTooltip(LangManager.Get(SELECTED_TILE_TOOLTIP));

// --- X2 / Y2 SECTION ---
if (ImGuiEx.InputUInt16("X2", ref x2, 0, (ushort)(CEDClient.WidthInTiles - 1)))
canSubmit = false;
ImGui.SameLine();
Expand All @@ -90,6 +95,8 @@ protected override void InternalDraw()
canSubmit = false;
}
}
ImGui.SetItemTooltip(LangManager.Get(SELECTED_TILE_TOOLTIP));

ImGui.PopItemWidth();
ImGui.Separator();

Expand Down
Loading