mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-14 15:04:14 +01:00
Resized nick field
This commit is contained in:
parent
98e608d852
commit
5a3ae5154c
1 changed files with 3 additions and 2 deletions
|
|
@ -145,6 +145,7 @@ namespace MareSynchronos.UI
|
||||||
var trashButtonSize = GetIconButtonSize(FontAwesomeIcon.Trash);
|
var trashButtonSize = GetIconButtonSize(FontAwesomeIcon.Trash);
|
||||||
var textSize = ImGui.CalcTextSize(entry.OtherUID);
|
var textSize = ImGui.CalcTextSize(entry.OtherUID);
|
||||||
var originalY = ImGui.GetCursorPosY();
|
var originalY = ImGui.GetCursorPosY();
|
||||||
|
var buttonSizes = buttonSize.Y + trashButtonSize.Y;
|
||||||
|
|
||||||
var textPos = originalY + buttonSize.Y / 2 - textSize.Y / 2;
|
var textPos = originalY + buttonSize.Y / 2 - textSize.Y / 2;
|
||||||
ImGui.SetCursorPosY(textPos);
|
ImGui.SetCursorPosY(textPos);
|
||||||
|
|
@ -226,8 +227,8 @@ namespace MareSynchronos.UI
|
||||||
{
|
{
|
||||||
ImGui.SetCursorPosY(originalY);
|
ImGui.SetCursorPosY(originalY);
|
||||||
|
|
||||||
ImGui.InputTextWithHint("", "Nick/Notes", ref _editCharComment, 255);
|
ImGui.SetNextItemWidth(ImGui.GetWindowContentRegionWidth() - ImGui.GetCursorPosX() - buttonSizes - ImGui.GetStyle().ItemSpacing.X * 2);
|
||||||
if (ImGui.GetIO().KeysDown[(int)ImGuiKey.Enter])
|
if (ImGui.InputTextWithHint("", "Nick/Notes", ref _editCharComment, 255, ImGuiInputTextFlags.EnterReturnsTrue))
|
||||||
{
|
{
|
||||||
_configuration.SetCurrentServerUidComment(entry.OtherUID, _editCharComment);
|
_configuration.SetCurrentServerUidComment(entry.OtherUID, _editCharComment);
|
||||||
_configuration.Save();
|
_configuration.Save();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue