mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Added hints to input texts in edit mode.
This commit is contained in:
parent
67415db7c0
commit
4655364b98
3 changed files with 12 additions and 10 deletions
|
|
@ -215,7 +215,7 @@ namespace Penumbra.UI
|
|||
if( _editMode )
|
||||
{
|
||||
ImGui.SetNextItemWidth( -1 );
|
||||
if( ImGui.InputText( LabelChangedItemNew, ref newItem, 128, flags )
|
||||
if( ImGui.InputTextWithHint( LabelChangedItemNew, "Enter new changed item...", ref newItem, 128, flags )
|
||||
&& newItem.Length > 0 )
|
||||
{
|
||||
Meta.ChangedItems.Add( newItem );
|
||||
|
|
@ -483,7 +483,7 @@ namespace Penumbra.UI
|
|||
ImGui.TextUnformatted( LabelGamePathsEdit );
|
||||
ImGui.SameLine();
|
||||
ImGui.SetNextItemWidth( -1 );
|
||||
ImGui.InputText( LabelGamePathsEditBox, ref _currentGamePaths, 128 );
|
||||
ImGui.InputTextWithHint( LabelGamePathsEditBox, "Hover for help...", ref _currentGamePaths, 128 );
|
||||
if( ImGui.IsItemHovered() )
|
||||
{
|
||||
ImGui.SetTooltip( TooltipGamePathsEdit );
|
||||
|
|
|
|||
|
|
@ -137,7 +137,8 @@ namespace Penumbra.UI
|
|||
var newOption = "";
|
||||
ImGui.SetCursorPosX( nameBoxStart );
|
||||
ImGui.SetNextItemWidth( MultiEditBoxWidth );
|
||||
if( ImGui.InputText( $"##new_{group.GroupName}_l", ref newOption, 64, ImGuiInputTextFlags.EnterReturnsTrue )
|
||||
if( ImGui.InputTextWithHint( $"##new_{group.GroupName}_l", "Add new option...", ref newOption, 64,
|
||||
ImGuiInputTextFlags.EnterReturnsTrue )
|
||||
&& newOption.Length != 0 )
|
||||
{
|
||||
group.Options.Add( new Option()
|
||||
|
|
@ -315,12 +316,13 @@ namespace Penumbra.UI
|
|||
|
||||
private void DrawAddSingleGroupField( float labelEditPos )
|
||||
{
|
||||
const string hint = "Add new Single Group...";
|
||||
var newGroup = "";
|
||||
if( labelEditPos == CheckMarkSize )
|
||||
{
|
||||
ImGui.SetCursorPosX( CheckMarkSize );
|
||||
ImGui.SetNextItemWidth( MultiEditBoxWidth );
|
||||
if( ImGui.InputText( LabelNewSingleGroup, ref newGroup, 64, ImGuiInputTextFlags.EnterReturnsTrue ) )
|
||||
if( ImGui.InputTextWithHint( LabelNewSingleGroup, hint, ref newGroup, 64, ImGuiInputTextFlags.EnterReturnsTrue ) )
|
||||
{
|
||||
AddNewGroup( newGroup, SelectType.Single );
|
||||
}
|
||||
|
|
@ -328,7 +330,7 @@ namespace Penumbra.UI
|
|||
else
|
||||
{
|
||||
ImGuiCustom.RightJustifiedLabel( labelEditPos, LabelNewSingleGroup );
|
||||
if( ImGui.InputText( LabelNewSingleGroupEdit, ref newGroup, 64, ImGuiInputTextFlags.EnterReturnsTrue ) )
|
||||
if( ImGui.InputTextWithHint( LabelNewSingleGroupEdit, hint, ref newGroup, 64, ImGuiInputTextFlags.EnterReturnsTrue ) )
|
||||
{
|
||||
AddNewGroup( newGroup, SelectType.Single );
|
||||
}
|
||||
|
|
@ -340,7 +342,7 @@ namespace Penumbra.UI
|
|||
var newGroup = "";
|
||||
ImGui.SetCursorPosX( CheckMarkSize );
|
||||
ImGui.SetNextItemWidth( MultiEditBoxWidth );
|
||||
if( ImGui.InputText( LabelNewMultiGroup, ref newGroup, 64, ImGuiInputTextFlags.EnterReturnsTrue ) )
|
||||
if( ImGui.InputTextWithHint( LabelNewMultiGroup, "Add new Multi Group...", ref newGroup, 64, ImGuiInputTextFlags.EnterReturnsTrue ) )
|
||||
{
|
||||
AddNewGroup( newGroup, SelectType.Multi );
|
||||
}
|
||||
|
|
@ -404,7 +406,7 @@ namespace Penumbra.UI
|
|||
_selector.SaveCurrentMod();
|
||||
if( Mod.Enabled )
|
||||
{
|
||||
Save();
|
||||
_selector.ReloadCurrentMod();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -427,7 +429,7 @@ namespace Penumbra.UI
|
|||
_selector.SaveCurrentMod();
|
||||
if( Mod.Enabled )
|
||||
{
|
||||
Save();
|
||||
_selector.ReloadCurrentMod();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ namespace Penumbra.UI
|
|||
{
|
||||
ImGui.SetNextItemWidth( SelectorButtonSizes.X * 4 );
|
||||
var tmp = _modFilter;
|
||||
if( ImGui.InputText( LabelModFilter, ref tmp, 256 ) )
|
||||
if( ImGui.InputTextWithHint( LabelModFilter, "Filter Mods...", ref tmp, 256 ) )
|
||||
{
|
||||
_modFilter = tmp.ToLowerInvariant();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue