feat: add help system
This commit is contained in:
parent
e9f075fa9c
commit
14dfe22d9c
|
@ -0,0 +1,3 @@
|
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Resourcer/>
|
||||
</Weavers>
|
|
@ -54,10 +54,16 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="DalamudLinter" Version="1.0.3"/>
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.4"/>
|
||||
<PackageReference Include="Fody" Version="6.6.0" PrivateAssets="all"/>
|
||||
<PackageReference Include="Resourcer.Fody" Version="1.8.0" PrivateAssets="all"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="..\icon.png" Link="images/icon.png" CopyToOutputDirectory="PreserveNewest" Visible="false"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="help.txt"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FFXIVClientStructs.FFXIV.Client.System.Framework;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
||||
using Glamaholic.Ui;
|
||||
|
@ -16,10 +17,24 @@ namespace Glamaholic {
|
|||
private EditorHelper EditorHelper { get; }
|
||||
private ExamineHelper ExamineHelper { get; }
|
||||
internal List<AlternativeFinder> AlternativeFinders { get; } = new();
|
||||
internal List<(string, string)> Help { get; } = new();
|
||||
|
||||
internal PluginUi(Plugin plugin) {
|
||||
this.Plugin = plugin;
|
||||
|
||||
foreach (var entry in Resourcer.Resource.AsString("help.txt").Split("---")) {
|
||||
var lines = entry.Trim().Split(new[] { "\n", "\r\n" }, StringSplitOptions.TrimEntries);
|
||||
if (lines.Length == 0 || !lines[0].StartsWith("#")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var title = lines[0][1..].Trim();
|
||||
var content = string.Join(" ", lines[1..]
|
||||
.SkipWhile(string.IsNullOrWhiteSpace)
|
||||
.Select(line => string.IsNullOrWhiteSpace(line) ? "\n" : line));
|
||||
this.Help.Add((title, content));
|
||||
}
|
||||
|
||||
this.MainInterface = new MainInterface(this);
|
||||
this.EditorHelper = new EditorHelper(this);
|
||||
this.ExamineHelper = new ExamineHelper(this);
|
||||
|
|
|
@ -164,6 +164,22 @@ namespace Glamaholic.Ui {
|
|||
ImGui.EndMenu();
|
||||
}
|
||||
|
||||
if (ImGui.BeginMenu("Help")) {
|
||||
foreach (var (title, content) in this.Ui.Help) {
|
||||
if (!ImGui.BeginMenu(title)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ImGui.PushTextWrapPos(ImGui.CalcTextSize("0").X * 60f * ImGuiHelpers.GlobalScale);
|
||||
ImGui.TextUnformatted(content);
|
||||
ImGui.PopTextWrapPos();
|
||||
|
||||
ImGui.EndMenu();
|
||||
}
|
||||
|
||||
ImGui.EndMenu();
|
||||
}
|
||||
|
||||
if (this.Ui.Plugin.Config.ShowKofiButton) {
|
||||
const string kofiText = "Support on Ko-fi";
|
||||
var kofiTextSize = ImGui.CalcTextSize(kofiText);
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
# How to use Glamaholic
|
||||
|
||||
Thank you for installing Glamaholic! This plugin can act as your home for
|
||||
glamours, since you can store as many as you would like in it. To get started,
|
||||
try reading the section called "Adding glamour plates". Keep in mind that you'll
|
||||
need to be editing your plates at the Glamour Dresser to be able to copy those
|
||||
plates into the plugin or apply new plates.
|
||||
|
||||
---
|
||||
|
||||
# Adding glamour plates
|
||||
|
||||
Click on the Plates menu and you can add plates to Glamaholic.
|
||||
|
||||
|
||||
- Click "New" to add an empty plate, starting from scratch.
|
||||
|
||||
- Hover over "Add from current plate", type in a name, and press Enter to copy a
|
||||
plate from your glamour dresser into Glamaholic.
|
||||
|
||||
- Hover over "Import" and paste in a shared glamour plate to import a plate from
|
||||
elsewhere.
|
||||
|
||||
- Open the Examine window a character, click the "Glamaholic" menu, then click
|
||||
"Create glamour plate" to create a glamour plate from someone else's outfit.
|
||||
|
||||
---
|
||||
|
||||
# Finding items that share a model
|
||||
|
||||
You can search for items that share the same model as another item by either
|
||||
middle-clicking (click with mouse wheel) or holding Control and left-clicking on
|
||||
any item name or item icon. This will open a window listing items with the same
|
||||
model where you can link or try them on.
|
Loading…
Reference in New Issue