mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-03 06:13:45 +01:00
Add redraw buttons and tutorial.
This commit is contained in:
parent
b34999a1a5
commit
8597070063
3 changed files with 44 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ using ImGuiNET;
|
|||
using OtterGui;
|
||||
using OtterGui.Raii;
|
||||
using OtterGui.Widgets;
|
||||
using Penumbra.GameData.Enums;
|
||||
using Penumbra.UI.Classes;
|
||||
|
||||
namespace Penumbra.UI;
|
||||
|
|
@ -52,6 +53,8 @@ public partial class ConfigWindow
|
|||
: _window.Flags & ~( ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize );
|
||||
} );
|
||||
|
||||
DrawRedrawButton();
|
||||
|
||||
ImGui.NewLine();
|
||||
DrawRootFolder();
|
||||
DrawRediscoverButton();
|
||||
|
|
@ -335,6 +338,34 @@ public partial class ConfigWindow
|
|||
+ "Not directly affiliated and potentially, but not usually out of date." );
|
||||
}
|
||||
|
||||
private void DrawRedrawButton()
|
||||
{
|
||||
using( var group = ImRaii.Group() )
|
||||
{
|
||||
using var disabled = ImRaii.Disabled( Dalamud.ClientState.LocalPlayer == null );
|
||||
|
||||
if( ImGui.Button( "Redraw Self" ) )
|
||||
{
|
||||
_window._penumbra.ObjectReloader.RedrawObject( "self", RedrawType.Redraw );
|
||||
}
|
||||
|
||||
ImGuiUtil.HoverTooltip( "Executes '/penumbra redraw self'." );
|
||||
|
||||
ImGui.SameLine();
|
||||
if( ImGui.Button( "Redraw All" ) )
|
||||
{
|
||||
_window._penumbra.ObjectReloader.RedrawAll( RedrawType.Redraw );
|
||||
}
|
||||
ImGuiUtil.HoverTooltip( "Executes '/penumbra redraw'." );
|
||||
|
||||
ImGui.SameLine();
|
||||
|
||||
ImGuiComponents.HelpMarker( $"The supported modifiers for '/penumbra redraw' are:\n{SupportedRedrawModifiers}" );
|
||||
}
|
||||
|
||||
OpenTutorial( BasicTutorialSteps.Redrawing );
|
||||
}
|
||||
|
||||
private void DrawSupportButtons()
|
||||
{
|
||||
var width = ImGui.CalcTextSize( SupportInfoButtonText ).X + ImGui.GetStyle().FramePadding.X * 2;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ public partial class ConfigWindow
|
|||
public const string ConditionalIndividual = "Character";
|
||||
public const string IndividualAssignments = "Individual Assignments";
|
||||
|
||||
public const string SupportedRedrawModifiers = " - 'self' or '<me>': your own character\n"
|
||||
+ " - 'target' or '<t>': your target\n"
|
||||
+ " - 'focus' or '<f>: your focus target\n"
|
||||
+ " - 'mouseover' or '<mo>': the actor you are currently hovering\n"
|
||||
+ " - any specific actor name to redraw all actors of that exactly matching name.";
|
||||
|
||||
private static void UpdateTutorialStep()
|
||||
{
|
||||
var tutorial = Tutorial.CurrentEnabledId( Penumbra.Config.TutorialStep );
|
||||
|
|
@ -43,6 +49,7 @@ public partial class ConfigWindow
|
|||
EnableMods,
|
||||
AdvancedSettings,
|
||||
GeneralSettings,
|
||||
Redrawing,
|
||||
Collections,
|
||||
EditingCollections,
|
||||
CurrentCollection,
|
||||
|
|
@ -82,6 +89,10 @@ public partial class ConfigWindow
|
|||
+ "If you need to do any editing of your mods, you will have to turn it on later." )
|
||||
.Register( "General Settings", "Look through all of these settings before starting, they might help you a lot!\n\n"
|
||||
+ "If you do not know what some of these do yet, return to this later!" )
|
||||
.Register( "Redrawing",
|
||||
"Whenever you change your mod configuration, changes do not immediately take effect. You will need to force the game to reload the relevant files (or if this is not possible, restart the game).\n\n"
|
||||
+ "For this, Penumbra has these buttons as well as the '/penumbra redraw' command, which redraws all actors at once. You can also use several modifiers described in the help marker instead.\n\n"
|
||||
+ "Feel free to use these slash commands (e.g. '/penumbra redraw self') as a macro, too." )
|
||||
.Register( "Initial Setup, Step 3: Collections", "Collections are lists of settings for your installed mods.\n\n"
|
||||
+ "This is our next stop!\n\n"
|
||||
+ "Go here after setting up your root folder to continue the tutorial!" )
|
||||
|
|
@ -104,7 +115,7 @@ public partial class ConfigWindow
|
|||
.Register( GroupAssignment + 's',
|
||||
"Collections assigned here are used for groups of characters for which specific conditions are met.\n\n"
|
||||
+ "The more specific the condition, the higher its priority (i.e. Your Character > Player Characters > Race).\n\n"
|
||||
+ $"{IndividualAssignments} always take precedence before groups.")
|
||||
+ $"{IndividualAssignments} always take precedence before groups." )
|
||||
.Register( IndividualAssignments,
|
||||
"Collections assigned here are used only for individual characters or NPCs that have the specified name.\n\n"
|
||||
+ "They may also apply to objects 'owned' by those characters, e.g. minions or mounts - see the general settings for options on this.\n\n" )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue