From c55bd54d069dfc07509c755d165872abadadfd08 Mon Sep 17 00:00:00 2001 From: ironmonk88 <75920956+ironmonk88@users.noreply.github.com> Date: Fri, 23 Sep 2022 15:44:44 -0700 Subject: [PATCH] 10.1 changes --- CHANGELOG.md | 8 ++++++++ css/hotbar-expansion.css | 4 ++-- hotbar-expansion.js | 15 +++++++++++---- module.json | 4 ++-- templates/hotbar.html | 28 ++++++++++++++++++---------- 5 files changed, 41 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f7ba5b..df8a5a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# Version 10.1 + +Fixed issue with the initial opening of the bar when the reverse order setting is on. + +Added a confirmation dialog when the clear entire row is clicked + +Fixed tooltip issue in v10. + # Version 1.0.14 Rebuilt the hotbar so that it should integrate better with Foundry diff --git a/css/hotbar-expansion.css b/css/hotbar-expansion.css index 3d64718..bc03294 100644 --- a/css/hotbar-expansion.css +++ b/css/hotbar-expansion.css @@ -15,8 +15,8 @@ z-index: 10; overflow:hidden; } -.hotbar-page.custom-hotbar{ - bottom:110px; +.hotbar-page.custom-hotbar { + bottom: 110px; } /* .hotbar-page.rpg-ui { diff --git a/hotbar-expansion.js b/hotbar-expansion.js index f10e05e..f42e5ae 100644 --- a/hotbar-expansion.js +++ b/hotbar-expansion.js @@ -106,6 +106,7 @@ const WithMonksHotbarExpansion = (Hotbar) => { return new Promise(resolve => { page.slideDown(200, () => { page.removeClass("collapsed"); + page.css({"display":""}); this._pagecollapsed = false; resolve(true); }); @@ -135,10 +136,16 @@ const WithMonksHotbarExpansion = (Hotbar) => { } async clearMacroRow(event) { - let page = $(event.currentTarget).closest('.hotbar-page-row').data('page'); - for (let i = 1; i <= 10; i++) { - await game.user.assignHotbarMacro(null, ((page - 1) * 10) + i); - } + return Dialog.confirm({ + title: `Clearing Macro Row`, + content: `

${game.i18n.localize("AreYouSure")}

You are about to remove all macros from this row

`, + yes: async () => { + let page = $(event.currentTarget).closest('.hotbar-page-row').data('page'); + for (let i = 1; i <= 10; i++) { + await game.user.assignHotbarMacro(null, ((page - 1) * 10) + i); + } + } + }); } } diff --git a/module.json b/module.json index d28a449..1f69e70 100644 --- a/module.json +++ b/module.json @@ -1,7 +1,7 @@ { "title": "Monk's Hotbar Expansion", "description": "Click to show all rows of the Hotbar, so that you can select the row by sight rather than clicking through pages. Drag and Drop on any of the rows, and clear an entire row if needed.", - "version": "1.0.14", + "version": "10.1", "authors": [ { "name": "IronMonk", @@ -25,7 +25,7 @@ "css/hotbar-expansion.css" ], "url": "https://github.com/ironmonk88/hotbar-expansion", - "download": "https://github.com/ironmonk88/hotbar-expansion/archive/1.0.14.zip", + "download": "https://github.com/ironmonk88/hotbar-expansion/archive/10.1.zip", "manifest": "https://github.com/ironmonk88/hotbar-expansion/releases/latest/download/module.json", "bugs": "https://github.com/ironmonk88/hotbar-expansion/issues", "allowBugReporter": true, diff --git a/templates/hotbar.html b/templates/hotbar.html index 5bab71e..8ebfd62 100644 --- a/templates/hotbar.html +++ b/templates/hotbar.html @@ -1,4 +1,4 @@ -
+
-