ItemReminder: Flipped up/down navigation buttons to make it more intuitive to use
This commit is contained in:
1 parent
038d50ae68
commit
0635e3436e
2 files changed
+18
-14
No files matched your search
+7
-7
@@ -337,18 +337,18 @@ EID.UserConfig = {
|
|||||||
-- Look into the AB+ or Repentance documentation for the key names here: https://wofsauge.github.io/IsaacDocs/rep/enums/ButtonAction.html
|
-- Look into the AB+ or Repentance documentation for the key names here: https://wofsauge.github.io/IsaacDocs/rep/enums/ButtonAction.html
|
||||||
-- Default = ButtonAction.ACTION_SHOOTLEFT
|
-- Default = ButtonAction.ACTION_SHOOTLEFT
|
||||||
["ItemReminderNavigateRightButton"] = ButtonAction.ACTION_SHOOTRIGHT,
|
["ItemReminderNavigateRightButton"] = ButtonAction.ACTION_SHOOTRIGHT,
|
||||||
-- Set the keybinding that is used to scroll thru the players in the left direction
|
-- Set the keybinding that is used to scroll thru the players or item entries in the left direction
|
||||||
-- Look into the AB+ or Repentance documentation for the key names here: https://wofsauge.github.io/IsaacDocs/rep/enums/ButtonAction.html
|
|
||||||
-- Default = ButtonAction.ACTION_SHOOTDOWN
|
|
||||||
["ItemReminderNavigateDownButton"] = ButtonAction.ACTION_SHOOTDOWN,
|
|
||||||
-- Number of entries to display per category of the item description.
|
|
||||||
-- Set the keybinding that is used to scroll thru the players in the right direction
|
|
||||||
-- Look into the AB+ or Repentance documentation for the key names here: https://wofsauge.github.io/IsaacDocs/rep/enums/ButtonAction.html
|
-- Look into the AB+ or Repentance documentation for the key names here: https://wofsauge.github.io/IsaacDocs/rep/enums/ButtonAction.html
|
||||||
-- Default = ButtonAction.ACTION_SHOOTUP
|
-- Default = ButtonAction.ACTION_SHOOTUP
|
||||||
["ItemReminderNavigateUpButton"] = ButtonAction.ACTION_SHOOTUP,
|
["ItemReminderNavigateUpButton"] = ButtonAction.ACTION_SHOOTUP,
|
||||||
|
-- Set the keybinding that is used to scroll thru the players or item entries in the right direction
|
||||||
|
-- Look into the AB+ or Repentance documentation for the key names here: https://wofsauge.github.io/IsaacDocs/rep/enums/ButtonAction.html
|
||||||
|
-- Default = ButtonAction.ACTION_SHOOTDOWN
|
||||||
|
["ItemReminderNavigateDownButton"] = ButtonAction.ACTION_SHOOTDOWN,
|
||||||
-- Limits the number of description bullet points to be displayed on the overview page for each item
|
-- Limits the number of description bullet points to be displayed on the overview page for each item
|
||||||
-- Default = 2
|
-- Default = 2
|
||||||
["ItemReminderOverviewHideAfterRows"] = 2,
|
["ItemReminderOverviewHideAfterRows"] = 2,
|
||||||
|
-- Number of entries to display per category of the item description.
|
||||||
-- Default = 3
|
-- Default = 3
|
||||||
["ItemReminderMaxEntriesCount"] = 3,
|
["ItemReminderMaxEntriesCount"] = 3,
|
||||||
-- Items that grant you items without saying what they are (like Zodiac, Liberty Cap) can have their current granted item revealed in the Item Reminder
|
-- Items that grant you items without saying what they are (like Zodiac, Liberty Cap) can have their current granted item revealed in the Item Reminder
|
||||||
@@ -603,8 +603,8 @@ EID.DefaultConfig = {
|
|||||||
["BagOfCraftingToggleKey"] = ButtonAction.ACTION_MAP,
|
["BagOfCraftingToggleKey"] = ButtonAction.ACTION_MAP,
|
||||||
["ItemReminderNavigateLeftButton"] = ButtonAction.ACTION_SHOOTLEFT,
|
["ItemReminderNavigateLeftButton"] = ButtonAction.ACTION_SHOOTLEFT,
|
||||||
["ItemReminderNavigateRightButton"] = ButtonAction.ACTION_SHOOTRIGHT,
|
["ItemReminderNavigateRightButton"] = ButtonAction.ACTION_SHOOTRIGHT,
|
||||||
["ItemReminderNavigateDownButton"] = ButtonAction.ACTION_SHOOTDOWN,
|
|
||||||
["ItemReminderNavigateUpButton"] = ButtonAction.ACTION_SHOOTUP,
|
["ItemReminderNavigateUpButton"] = ButtonAction.ACTION_SHOOTUP,
|
||||||
|
["ItemReminderNavigateDownButton"] = ButtonAction.ACTION_SHOOTDOWN,
|
||||||
["ItemReminderOverviewHideAfterRows"] = 2,
|
["ItemReminderOverviewHideAfterRows"] = 2,
|
||||||
["ItemReminderMaxEntriesCount"] = 5,
|
["ItemReminderMaxEntriesCount"] = 5,
|
||||||
["ItemReminderShowHiddenInfo"] = false,
|
["ItemReminderShowHiddenInfo"] = false,
|
||||||
|
|||||||
+11
-7
@@ -433,8 +433,8 @@ function EID:ItemReminderHandleInputs()
|
|||||||
EID.ForceRefreshCache = true
|
EID.ForceRefreshCache = true
|
||||||
lastInputTime = Isaac.GetTime()
|
lastInputTime = Isaac.GetTime()
|
||||||
lastScrollDirection = 1
|
lastScrollDirection = 1
|
||||||
elseif Input.IsActionTriggered(EID.Config["ItemReminderNavigateDownButton"], EID.holdTabPlayer.ControllerIndex) and Isaac.GetTime() - lastInputTime > 50 then
|
elseif Input.IsActionTriggered(EID.Config["ItemReminderNavigateUpButton"], EID.holdTabPlayer.ControllerIndex) and Isaac.GetTime() - lastInputTime > 50 then
|
||||||
if not EID:IsCategorySelected("Passives") then
|
if not EID:IsScrollableCategorySelected() then
|
||||||
EID.ItemReminderSelectedPlayer = (EID.ItemReminderSelectedPlayer - 1) % #EID.coopAllPlayers
|
EID.ItemReminderSelectedPlayer = (EID.ItemReminderSelectedPlayer - 1) % #EID.coopAllPlayers
|
||||||
else
|
else
|
||||||
EID.ItemReminderSelectedItem = EID.ItemReminderSelectedItem - 1 -- clamp later
|
EID.ItemReminderSelectedItem = EID.ItemReminderSelectedItem - 1 -- clamp later
|
||||||
@@ -442,8 +442,8 @@ function EID:ItemReminderHandleInputs()
|
|||||||
|
|
||||||
EID.ForceRefreshCache = true
|
EID.ForceRefreshCache = true
|
||||||
lastInputTime = Isaac.GetTime()
|
lastInputTime = Isaac.GetTime()
|
||||||
elseif Input.IsActionTriggered(EID.Config["ItemReminderNavigateUpButton"], EID.holdTabPlayer.ControllerIndex) and Isaac.GetTime() - lastInputTime > 50 then
|
elseif Input.IsActionTriggered(EID.Config["ItemReminderNavigateDownButton"], EID.holdTabPlayer.ControllerIndex) and Isaac.GetTime() - lastInputTime > 50 then
|
||||||
if not EID:IsCategorySelected("Passives") then
|
if not EID:IsScrollableCategorySelected() then
|
||||||
EID.ItemReminderSelectedPlayer = (EID.ItemReminderSelectedPlayer + 1) % #EID.coopAllPlayers
|
EID.ItemReminderSelectedPlayer = (EID.ItemReminderSelectedPlayer + 1) % #EID.coopAllPlayers
|
||||||
else
|
else
|
||||||
EID.ItemReminderSelectedItem = EID.ItemReminderSelectedItem + 1 -- clamp later
|
EID.ItemReminderSelectedItem = EID.ItemReminderSelectedItem + 1 -- clamp later
|
||||||
@@ -455,6 +455,10 @@ function EID:ItemReminderHandleInputs()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function EID:IsScrollableCategorySelected()
|
||||||
|
return EID.ItemReminderCategories[EID.ItemReminderSelectedCategory + 1].isScrollable
|
||||||
|
end
|
||||||
|
|
||||||
function EID:IsCategorySelected(categoryID)
|
function EID:IsCategorySelected(categoryID)
|
||||||
return EID.ItemReminderCategories[EID.ItemReminderSelectedCategory + 1].id == categoryID
|
return EID.ItemReminderCategories[EID.ItemReminderSelectedCategory + 1].id == categoryID
|
||||||
end
|
end
|
||||||
@@ -499,9 +503,9 @@ function EID:ItemReminderGetTitle()
|
|||||||
local playerIcon = EID:GetPlayerIcon(currentPlayer:GetPlayerType(), "P" .. curPlayerID )
|
local playerIcon = EID:GetPlayerIcon(currentPlayer:GetPlayerType(), "P" .. curPlayerID )
|
||||||
|
|
||||||
local playerSelectWidget = playerIcon .. " "
|
local playerSelectWidget = playerIcon .. " "
|
||||||
if not EID:IsCategorySelected("Passives") and EID.Config["ItemReminderDisplayMode"] ~= "Classic" then
|
if not EID:IsScrollableCategorySelected() and EID.Config["ItemReminderDisplayMode"] ~= "Classic" then
|
||||||
playerSelectWidget = EID.ButtonToIconMap[EID.Config["ItemReminderNavigateDownButton"]] ..
|
playerSelectWidget = EID.ButtonToIconMap[EID.Config["ItemReminderNavigateUpButton"]] ..
|
||||||
playerIcon .. EID.ButtonToIconMap[EID.Config["ItemReminderNavigateUpButton"]] .. "|"
|
playerIcon .. EID.ButtonToIconMap[EID.Config["ItemReminderNavigateDownButton"]] .. "|"
|
||||||
end
|
end
|
||||||
combinedText = "{{ColorText}}" .. playerSelectWidget .. combinedText
|
combinedText = "{{ColorText}}" .. playerSelectWidget .. combinedText
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user