Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ccae50150 | |||
| 77006670ae | |||
| 49722e0a0a | |||
| 9bd14fb5e8 |
+20
-2
@@ -34,6 +34,7 @@ internal static unsafe class ContextMenuHandler
|
|||||||
Trade,
|
Trade,
|
||||||
Sell,
|
Sell,
|
||||||
HandOver,
|
HandOver,
|
||||||
|
Use,
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool ContextLabelMatches(AutoContextAction desiredAction, string menuText)
|
public static bool ContextLabelMatches(AutoContextAction desiredAction, string menuText)
|
||||||
@@ -98,6 +99,10 @@ internal static unsafe class ContextMenuHandler
|
|||||||
(Has(t, "Hand") && Has(t, "Over")) ||
|
(Has(t, "Hand") && Has(t, "Over")) ||
|
||||||
(Has(t, "Hand Over") && Has(t, "Item")),
|
(Has(t, "Hand Over") && Has(t, "Item")),
|
||||||
|
|
||||||
|
AutoContextAction.Use =>
|
||||||
|
t.Equals("Use", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
t.StartsWith("Use", StringComparison.OrdinalIgnoreCase),
|
||||||
|
|
||||||
_ => false,
|
_ => false,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -123,8 +128,8 @@ internal static unsafe class ContextMenuHandler
|
|||||||
// Single-pass: decode each label once, record first match per action.
|
// Single-pass: decode each label once, record first match per action.
|
||||||
var foundAny = false;
|
var foundAny = false;
|
||||||
|
|
||||||
int removeIdx = -1, addIdx = -1, placeIdx = -1, returnIdx = -1, entrustIdx = -1, retrieveIdx = -1, companyRemoveIdx = -1, splitIdx = -1, tradeIdx = -1, sellIdx = -1, handOverIdx = -1;
|
int removeIdx = -1, addIdx = -1, placeIdx = -1, returnIdx = -1, entrustIdx = -1, retrieveIdx = -1, companyRemoveIdx = -1, splitIdx = -1, tradeIdx = -1, sellIdx = -1, handOverIdx = -1, useIdx = -1;
|
||||||
string? removeTxt = null, addTxt = null, placeTxt = null, returnTxt = null, entrustTxt = null, retrieveTxt = null, companyRemoveTxt = null, splitTxt = null, tradeTxt = null, sellTxt = null, handOverTxt = null;
|
string? removeTxt = null, addTxt = null, placeTxt = null, returnTxt = null, entrustTxt = null, retrieveTxt = null, companyRemoveTxt = null, splitTxt = null, tradeTxt = null, sellTxt = null, handOverTxt = null, useTxt = null;
|
||||||
|
|
||||||
var max = Math.Min(agent->ContextItemCount, 64);
|
var max = Math.Min(agent->ContextItemCount, 64);
|
||||||
for (var i = 0; i < max; i++)
|
for (var i = 0; i < max; i++)
|
||||||
@@ -213,6 +218,12 @@ internal static unsafe class ContextMenuHandler
|
|||||||
handOverIdx = i;
|
handOverIdx = i;
|
||||||
handOverTxt = text;
|
handOverTxt = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (useIdx < 0 && ContextLabelMatches(AutoContextAction.Use, text))
|
||||||
|
{
|
||||||
|
useIdx = i;
|
||||||
|
useTxt = text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foundAny)
|
if (!foundAny)
|
||||||
@@ -249,6 +260,13 @@ internal static unsafe class ContextMenuHandler
|
|||||||
// Quest/dialogue: hand over item to NPC
|
// Quest/dialogue: hand over item to NPC
|
||||||
chosen = (handOverIdx, handOverTxt);
|
chosen = (handOverIdx, handOverTxt);
|
||||||
}
|
}
|
||||||
|
else if (mode == ModifierMode.Shift &&
|
||||||
|
!saddlebagOpen && !retainerOpen && !companyChestOpen && !tradeOpen && !vendorOpen &&
|
||||||
|
useIdx >= 0 && configuration.EnableQuickUse)
|
||||||
|
{
|
||||||
|
// No other inventories open: quick Use for usable items (potions, food, etc.)
|
||||||
|
chosen = (useIdx, useTxt);
|
||||||
|
}
|
||||||
else if (mode == ModifierMode.Ctrl)
|
else if (mode == ModifierMode.Ctrl)
|
||||||
{
|
{
|
||||||
chosen = returnIdx >= 0 ? (returnIdx, returnTxt) :
|
chosen = returnIdx >= 0 ? (returnIdx, returnTxt) :
|
||||||
|
|||||||
+9
-8
@@ -29,7 +29,7 @@ namespace QuickTransfer;
|
|||||||
[Serializable]
|
[Serializable]
|
||||||
public sealed class Configuration : IPluginConfiguration
|
public sealed class Configuration : IPluginConfiguration
|
||||||
{
|
{
|
||||||
public int Version { get; set; } = 3;
|
public int Version { get; set; } = 4;
|
||||||
|
|
||||||
public bool Enabled { get; set; } = true;
|
public bool Enabled { get; set; } = true;
|
||||||
// Default OFF (explicitly requested).
|
// Default OFF (explicitly requested).
|
||||||
@@ -46,6 +46,8 @@ public sealed class Configuration : IPluginConfiguration
|
|||||||
public bool EnableVendorQuickSell { get; set; } = true;
|
public bool EnableVendorQuickSell { get; set; } = true;
|
||||||
public bool AutoConfirmVendorSell { get; set; } = true;
|
public bool AutoConfirmVendorSell { get; set; } = true;
|
||||||
|
|
||||||
|
public bool EnableQuickUse { get; set; } = true;
|
||||||
|
|
||||||
public void Save() => Plugin.PluginInterface.SavePluginConfig(this);
|
public void Save() => Plugin.PluginInterface.SavePluginConfig(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1392,16 +1394,15 @@ public sealed unsafe class Plugin : IDalamudPlugin
|
|||||||
Configuration.Version = 3;
|
Configuration.Version = 3;
|
||||||
Configuration.Save();
|
Configuration.Save();
|
||||||
}
|
}
|
||||||
else if (Configuration.Version > 3)
|
else if (Configuration.Version < 4)
|
||||||
|
{
|
||||||
|
Configuration.Version = 4;
|
||||||
|
Configuration.Save();
|
||||||
|
}
|
||||||
|
else if (Configuration.Version > 4)
|
||||||
{
|
{
|
||||||
// If the user downgrades, don't overwrite their config; just keep their stored values.
|
// If the user downgrades, don't overwrite their config; just keep their stored values.
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// Version == 3: still ensure debug isn't accidentally on by default after updates.
|
|
||||||
// (User can re-enable it explicitly.)
|
|
||||||
// No auto-save here to avoid writing config every startup.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
<RootNamespace>QuickTransfer</RootNamespace>
|
<RootNamespace>QuickTransfer</RootNamespace>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<Version>1.0.5</Version>
|
<Version>1.0.7</Version>
|
||||||
<AssemblyVersion>1.0.5.0</AssemblyVersion>
|
<AssemblyVersion>1.0.7.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.5.0</FileVersion>
|
<FileVersion>1.0.7.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Local builds: some setups have DALAMUD_HOME pointing at the XIVLauncher root,
|
<!-- Local builds: some setups have DALAMUD_HOME pointing at the XIVLauncher root,
|
||||||
@@ -22,4 +22,10 @@
|
|||||||
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows')) and Exists('$(_DalamudDevHooksPath)Dalamud.dll') and !Exists('$(DalamudLibPath)Dalamud.dll')">
|
<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows')) and Exists('$(_DalamudDevHooksPath)Dalamud.dll') and !Exists('$(DalamudLibPath)Dalamud.dll')">
|
||||||
<DalamudLibPath>$(_DalamudDevHooksPath)</DalamudLibPath>
|
<DalamudLibPath>$(_DalamudDevHooksPath)</DalamudLibPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Exclude nested QuickTransfer folder (duplicates) and external (SimpleTweaks has different deps) -->
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="QuickTransfer\**" />
|
||||||
|
<Compile Remove="external\**" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@
|
|||||||
"Author": "Knack117",
|
"Author": "Knack117",
|
||||||
"Name": "QuickTransfer",
|
"Name": "QuickTransfer",
|
||||||
"InternalName": "QuickTransfer",
|
"InternalName": "QuickTransfer",
|
||||||
"AssemblyVersion": "1.0.5.0",
|
"AssemblyVersion": "1.0.7.0",
|
||||||
"Description": "Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Trade window, vendor quick sell, FC chest, Hand Over to NPCs.",
|
"Description": "Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Quick Use on usable items, trade window, vendor quick sell, FC chest, Hand Over to NPCs.",
|
||||||
"ApplicableVersion": "any",
|
"ApplicableVersion": "any",
|
||||||
"RepoUrl": "https://github.com/Knack117/QuickTransfer",
|
"RepoUrl": "https://github.com/Knack117/QuickTransfer",
|
||||||
"Tags": [
|
"Tags": [
|
||||||
|
|||||||
@@ -109,6 +109,16 @@ public class QuickTransferWindow : Window, IDisposable
|
|||||||
}
|
}
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.7f, 0.7f), "(Auto-fill quantity, confirm \"How many?\", and click OK on \"Are you certain?\")");
|
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.7f, 0.7f), "(Auto-fill quantity, confirm \"How many?\", and click OK on \"Are you certain?\")");
|
||||||
|
|
||||||
|
// Quick Use
|
||||||
|
var enableQuickUse = _config.EnableQuickUse;
|
||||||
|
if (ImGui.Checkbox("Enable Quick Use###EnableQuickUse", ref enableQuickUse))
|
||||||
|
{
|
||||||
|
_config.EnableQuickUse = enableQuickUse;
|
||||||
|
_config.Save();
|
||||||
|
}
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.7f, 0.7f), "(Shift+RClick: auto-select \"Use\" on usable items when no other inventories are open)");
|
||||||
|
|
||||||
// Transfer cooldown
|
// Transfer cooldown
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
@@ -139,6 +149,7 @@ public class QuickTransferWindow : Window, IDisposable
|
|||||||
ImGui.BulletText("Company Chest (FreeCompanyChest) open: Shift+RClick Inventory/Armoury deposits, Shift+RClick Company Chest withdraws (\"Remove\")");
|
ImGui.BulletText("Company Chest (FreeCompanyChest) open: Shift+RClick Inventory/Armoury deposits, Shift+RClick Company Chest withdraws (\"Remove\")");
|
||||||
ImGui.BulletText("Vendor Shop open: Shift+RClick to auto-select \"Sell\"; enable \"Auto-confirm vendor sell\" to auto-fill quantity and confirm.");
|
ImGui.BulletText("Vendor Shop open: Shift+RClick to auto-select \"Sell\"; enable \"Auto-confirm vendor sell\" to auto-fill quantity and confirm.");
|
||||||
ImGui.BulletText("Quest/dialogue: Shift+RClick on an item to auto-select \"Hand Over\" when handing items to an NPC.");
|
ImGui.BulletText("Quest/dialogue: Shift+RClick on an item to auto-select \"Hand Over\" when handing items to an NPC.");
|
||||||
|
ImGui.BulletText("Inventory only (no other panels open): Shift+RClick on a usable item (potions, food, etc.) to auto-select \"Use\".");
|
||||||
ImGui.BulletText("Middle-Click: Sort the clicked container when a \"Sort\" menu entry exists. In Company Chest, MMB runs an organize pass (stack + compact).");
|
ImGui.BulletText("Middle-Click: Sort the clicked container when a \"Sort\" menu entry exists. In Company Chest, MMB runs an organize pass (stack + compact).");
|
||||||
ImGui.BulletText("Use /qt or click 'Open Config' in plugin list to reopen this window");
|
ImGui.BulletText("Use /qt or click 'Open Config' in plugin list to reopen this window");
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
A Dalamud plugin for Final Fantasy XIV that adds quick inventory actions via the game's existing context menus:
|
A Dalamud plugin for Final Fantasy XIV that adds quick inventory actions via the game's existing context menus:
|
||||||
|
|
||||||
- **Shift + Right Click**: quick transfers (including vendor sell when shop is open, and Hand Over to NPCs in quest/dialogue)
|
- **Shift + Right Click**: quick transfers (including Quick Use on usable items when no other inventories are open, vendor sell when shop is open, and Hand Over to NPCs in quest/dialogue)
|
||||||
- **Ctrl + Right Click**: armoury-mode transfers (when a special container is open)
|
- **Ctrl + Right Click**: armoury-mode transfers (when a special container is open)
|
||||||
- **Alt + Right Click**: split a stack in half
|
- **Alt + Right Click**: split a stack in half
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Quick Transfer**: Hold Shift and right-click an item to automatically trigger the matching context menu action
|
- **Quick Transfer**: Hold Shift and right-click an item to automatically trigger the matching context menu action
|
||||||
|
- **Quick Use**: When no other inventories (saddlebag, retainer, company chest, trade, vendor) are open, Shift + Right Click on a usable item (potions, food, etc.) auto-selects **Use**
|
||||||
- **Vendor Quick Sell**: With a vendor shop open, Shift + Right Click auto-selects **Sell**. With **Auto-confirm vendor sell** enabled, quantity dialogs and "Are you certain?" confirmations are auto-filled and confirmed
|
- **Vendor Quick Sell**: With a vendor shop open, Shift + Right Click auto-selects **Sell**. With **Auto-confirm vendor sell** enabled, quantity dialogs and "Are you certain?" confirmations are auto-filled and confirmed
|
||||||
- **Trade Window Support**: Shift + Right Click items from inventory into Trade window with auto-fill max quantity
|
- **Trade Window Support**: Shift + Right Click items from inventory into Trade window with auto-fill max quantity
|
||||||
- **Company Chest**: Shift + Right Click to deposit/withdraw when Free Company Chest is open; middle-click runs organize (stack + compact)
|
- **Company Chest**: Shift + Right Click to deposit/withdraw when Free Company Chest is open; middle-click runs organize (stack + compact)
|
||||||
@@ -68,6 +69,8 @@ The plugin only clicks **existing** context menu options when they are available
|
|||||||
- Shift + Right Click Inventory/Armoury → deposit; Shift + Right Click Company Chest → **Remove** (withdraw)
|
- Shift + Right Click Inventory/Armoury → deposit; Shift + Right Click Company Chest → **Remove** (withdraw)
|
||||||
- **Hand Over to NPCs (quest/dialogue)**
|
- **Hand Over to NPCs (quest/dialogue)**
|
||||||
- When an NPC is asking for items (e.g. quest turn-in), Shift + Right Click the item → **Hand Over**
|
- When an NPC is asking for items (e.g. quest turn-in), Shift + Right Click the item → **Hand Over**
|
||||||
|
- **Inventory only (no other panels open)**
|
||||||
|
- Shift + Right Click on a usable item (potions, food, etc.) → **Use**
|
||||||
|
|
||||||
If an option is not present for the clicked item, **nothing happens**.
|
If an option is not present for the clicked item, **nothing happens**.
|
||||||
|
|
||||||
@@ -99,6 +102,7 @@ If an option is not present for the clicked item, **nothing happens**.
|
|||||||
| Company Chest: Middle-Click Organize | Enable MMB organize (stack+compact) in FC chest | True |
|
| Company Chest: Middle-Click Organize | Enable MMB organize (stack+compact) in FC chest | True |
|
||||||
| Auto-confirm quantity prompts | Auto-fill and confirm InputNumeric prompts (Split / FC chest) | True |
|
| Auto-confirm quantity prompts | Auto-fill and confirm InputNumeric prompts (Split / FC chest) | True |
|
||||||
| Enable Vendor Quick Sell | Shift+RClick auto-selects "Sell" when vendor is open | True |
|
| Enable Vendor Quick Sell | Shift+RClick auto-selects "Sell" when vendor is open | True |
|
||||||
|
| Enable Quick Use | Shift+RClick auto-selects "Use" on usable items when no other inventories are open | True |
|
||||||
| Auto-confirm vendor sell | Auto-fill quantity and click OK on sell dialogs ("How many?", "Are you certain?") | True |
|
| Auto-confirm vendor sell | Auto-fill quantity and click OK on sell dialogs ("How many?", "Are you certain?") | True |
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|||||||
+1
-21
@@ -1,21 +1 @@
|
|||||||
[
|
[{"Author":"Knack117","Name":"QuickTransfer","Punchline":"Quick item transfer + split helpers.","Description":"Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Quick Use on usable items, trade window, vendor quick sell, FC chest, Hand Over to NPCs.","InternalName":"QuickTransfer","AssemblyVersion":"1.0.7.0","RepoUrl":"http://brassnet.ddns.net:33983/KnackAtNite/QuickTransfer","ApplicableVersion":"any","DalamudApiLevel":14,"Tags":["inventory","utility","quality of life"],"AcceptsFeedback":true,"DownloadLinkInstall":"http://brassnet.ddns.net:33983/KnackAtNite/QuickTransfer/releases/download/v1.0.7/QuickTransfer.zip","DownloadLinkUpdate":"http://brassnet.ddns.net:33983/KnackAtNite/QuickTransfer/releases/download/v1.0.7/QuickTransfer.zip","LastUpdate":"1739020800"}]
|
||||||
{
|
|
||||||
"Author": "Knack117",
|
|
||||||
"Name": "QuickTransfer",
|
|
||||||
"InternalName": "QuickTransfer",
|
|
||||||
"AssemblyVersion": "1.0.5.0",
|
|
||||||
"Description": "Automate inventory transfers with Shift/Ctrl/Alt + Right-Click. Trade window, vendor quick sell, FC chest, Hand Over to NPCs.",
|
|
||||||
"ApplicableVersion": "any",
|
|
||||||
"RepoUrl": "https://github.com/Knack117/QuickTransfer",
|
|
||||||
"DalamudApiLevel": 14,
|
|
||||||
"Punchline": "Quick item transfer + split helpers.",
|
|
||||||
"Tags": [
|
|
||||||
"inventory",
|
|
||||||
"utility",
|
|
||||||
"quality of life"
|
|
||||||
],
|
|
||||||
"AcceptsFeedback": true,
|
|
||||||
"DownloadLinkInstall": "https://github.com/Knack117/QuickTransfer/releases/latest/download/QuickTransfer.zip",
|
|
||||||
"DownloadLinkUpdate": "https://github.com/Knack117/QuickTransfer/releases/latest/download/QuickTransfer.zip"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user