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 )
|
if( _editMode )
|
||||||
{
|
{
|
||||||
ImGui.SetNextItemWidth( -1 );
|
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 )
|
&& newItem.Length > 0 )
|
||||||
{
|
{
|
||||||
Meta.ChangedItems.Add( newItem );
|
Meta.ChangedItems.Add( newItem );
|
||||||
|
|
@ -483,7 +483,7 @@ namespace Penumbra.UI
|
||||||
ImGui.TextUnformatted( LabelGamePathsEdit );
|
ImGui.TextUnformatted( LabelGamePathsEdit );
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.SetNextItemWidth( -1 );
|
ImGui.SetNextItemWidth( -1 );
|
||||||
ImGui.InputText( LabelGamePathsEditBox, ref _currentGamePaths, 128 );
|
ImGui.InputTextWithHint( LabelGamePathsEditBox, "Hover for help...", ref _currentGamePaths, 128 );
|
||||||
if( ImGui.IsItemHovered() )
|
if( ImGui.IsItemHovered() )
|
||||||
{
|
{
|
||||||
ImGui.SetTooltip( TooltipGamePathsEdit );
|
ImGui.SetTooltip( TooltipGamePathsEdit );
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,8 @@ namespace Penumbra.UI
|
||||||
var newOption = "";
|
var newOption = "";
|
||||||
ImGui.SetCursorPosX( nameBoxStart );
|
ImGui.SetCursorPosX( nameBoxStart );
|
||||||
ImGui.SetNextItemWidth( MultiEditBoxWidth );
|
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 )
|
&& newOption.Length != 0 )
|
||||||
{
|
{
|
||||||
group.Options.Add( new Option()
|
group.Options.Add( new Option()
|
||||||
|
|
@ -315,12 +316,13 @@ namespace Penumbra.UI
|
||||||
|
|
||||||
private void DrawAddSingleGroupField( float labelEditPos )
|
private void DrawAddSingleGroupField( float labelEditPos )
|
||||||
{
|
{
|
||||||
var newGroup = "";
|
const string hint = "Add new Single Group...";
|
||||||
|
var newGroup = "";
|
||||||
if( labelEditPos == CheckMarkSize )
|
if( labelEditPos == CheckMarkSize )
|
||||||
{
|
{
|
||||||
ImGui.SetCursorPosX( CheckMarkSize );
|
ImGui.SetCursorPosX( CheckMarkSize );
|
||||||
ImGui.SetNextItemWidth( MultiEditBoxWidth );
|
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 );
|
AddNewGroup( newGroup, SelectType.Single );
|
||||||
}
|
}
|
||||||
|
|
@ -328,7 +330,7 @@ namespace Penumbra.UI
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ImGuiCustom.RightJustifiedLabel( labelEditPos, LabelNewSingleGroup );
|
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 );
|
AddNewGroup( newGroup, SelectType.Single );
|
||||||
}
|
}
|
||||||
|
|
@ -340,7 +342,7 @@ namespace Penumbra.UI
|
||||||
var newGroup = "";
|
var newGroup = "";
|
||||||
ImGui.SetCursorPosX( CheckMarkSize );
|
ImGui.SetCursorPosX( CheckMarkSize );
|
||||||
ImGui.SetNextItemWidth( MultiEditBoxWidth );
|
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 );
|
AddNewGroup( newGroup, SelectType.Multi );
|
||||||
}
|
}
|
||||||
|
|
@ -404,7 +406,7 @@ namespace Penumbra.UI
|
||||||
_selector.SaveCurrentMod();
|
_selector.SaveCurrentMod();
|
||||||
if( Mod.Enabled )
|
if( Mod.Enabled )
|
||||||
{
|
{
|
||||||
Save();
|
_selector.ReloadCurrentMod();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -427,7 +429,7 @@ namespace Penumbra.UI
|
||||||
_selector.SaveCurrentMod();
|
_selector.SaveCurrentMod();
|
||||||
if( Mod.Enabled )
|
if( Mod.Enabled )
|
||||||
{
|
{
|
||||||
Save();
|
_selector.ReloadCurrentMod();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ namespace Penumbra.UI
|
||||||
{
|
{
|
||||||
ImGui.SetNextItemWidth( SelectorButtonSizes.X * 4 );
|
ImGui.SetNextItemWidth( SelectorButtonSizes.X * 4 );
|
||||||
var tmp = _modFilter;
|
var tmp = _modFilter;
|
||||||
if( ImGui.InputText( LabelModFilter, ref tmp, 256 ) )
|
if( ImGui.InputTextWithHint( LabelModFilter, "Filter Mods...", ref tmp, 256 ) )
|
||||||
{
|
{
|
||||||
_modFilter = tmp.ToLowerInvariant();
|
_modFilter = tmp.ToLowerInvariant();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue