mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-15 05:04:16 +01:00
Mask name edit field in automated designs as readonly password in incognito mode.
This commit is contained in:
parent
b47164ad4f
commit
df35e287e4
1 changed files with 6 additions and 5 deletions
|
|
@ -39,8 +39,8 @@ public class SetPanel
|
||||||
|
|
||||||
private Action? _endAction;
|
private Action? _endAction;
|
||||||
|
|
||||||
public SetPanel(SetSelector selector, AutoDesignManager manager, DesignManager designs, JobService jobs, ItemUnlockManager itemUnlocks,
|
public SetPanel(SetSelector selector, AutoDesignManager manager, JobService jobs, ItemUnlockManager itemUnlocks, DesignCombo designCombo,
|
||||||
CustomizeUnlockManager customizeUnlocks, CustomizationService customizations, IdentifierDrawer identifierDrawer, Configuration config, DesignCombo designCombo)
|
CustomizeUnlockManager customizeUnlocks, CustomizationService customizations, IdentifierDrawer identifierDrawer, Configuration config)
|
||||||
{
|
{
|
||||||
_selector = selector;
|
_selector = selector;
|
||||||
_manager = manager;
|
_manager = manager;
|
||||||
|
|
@ -73,8 +73,9 @@ public class SetPanel
|
||||||
if (!child || !_selector.HasSelection)
|
if (!child || !_selector.HasSelection)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var name = _tempName ?? Selection.Name;
|
var name = _tempName ?? Selection.Name;
|
||||||
if (ImGui.InputText("##Name", ref name, 64))
|
var flags = _selector.IncognitoMode ? ImGuiInputTextFlags.ReadOnly | ImGuiInputTextFlags.Password : ImGuiInputTextFlags.None;
|
||||||
|
if (ImGui.InputText("##Name", ref name, 128, flags))
|
||||||
_tempName = name;
|
_tempName = name;
|
||||||
|
|
||||||
if (ImGui.IsItemDeactivated())
|
if (ImGui.IsItemDeactivated())
|
||||||
|
|
@ -365,4 +366,4 @@ public class SetPanel
|
||||||
protected override string ToString(JobGroup obj)
|
protected override string ToString(JobGroup obj)
|
||||||
=> obj.Name;
|
=> obj.Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue