Added feature to get descriptions of HUD elements
This commit is contained in:
1 parent
b0a12ea770
commit
4b1ebfc1c8
8 files changed
+259
-25
No files matched your search
+40
@@ -800,6 +800,46 @@ function EID:tableToCraftingIconsMerged(craftTable)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function EID:handleHUDElement(hudElement)
|
||||||
|
local alteredHudElement = {}
|
||||||
|
for k,v in pairs(hudElement) do
|
||||||
|
alteredHudElement[k] = v
|
||||||
|
end
|
||||||
|
local screenSize = EID:GetScreenSize()
|
||||||
|
for _,v in ipairs(hudElement.anchors) do
|
||||||
|
if v == "TOP" then
|
||||||
|
if EID.MCMLoaded then
|
||||||
|
alteredHudElement.y = hudElement.y + EID.MCMHudOffset * 2
|
||||||
|
end
|
||||||
|
elseif v == "LEFT" then
|
||||||
|
if EID.MCMLoaded then
|
||||||
|
alteredHudElement.x = hudElement.x + EID.MCMHudOffset * 2
|
||||||
|
end
|
||||||
|
elseif v == "BOTTOM" then
|
||||||
|
alteredHudElement.y = screenSize.Y*2 - alteredHudElement.y - alteredHudElement.height
|
||||||
|
if EID.MCMLoaded then
|
||||||
|
alteredHudElement.y = alteredHudElement.y - EID.MCMHudOffset * 2
|
||||||
|
end
|
||||||
|
elseif v == "RIGHT" then
|
||||||
|
alteredHudElement.x = screenSize.X*2 - alteredHudElement.x - alteredHudElement.width
|
||||||
|
if EID.MCMLoaded then
|
||||||
|
alteredHudElement.x = alteredHudElement.x - EID.MCMHudOffset * 2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return alteredHudElement
|
||||||
|
end
|
||||||
|
|
||||||
|
function EID:GetScreenSize()
|
||||||
|
local room = game:GetRoom()
|
||||||
|
local pos = room:WorldToScreenPosition(Vector(0,0)) - room:GetRenderScrollOffset() - Game().ScreenShakeOffset
|
||||||
|
|
||||||
|
local rx = pos.X + 60 * 26 / 40
|
||||||
|
local ry = pos.Y + 140 * (26 / 40)
|
||||||
|
|
||||||
|
return Vector(rx*2 + 13*26, ry*2 + 7*26)
|
||||||
|
end
|
||||||
|
|
||||||
-- Creates a copy of a KColor object. This prevents overwriting existing
|
-- Creates a copy of a KColor object. This prevents overwriting existing
|
||||||
function EID:copyKColor(colorObj)
|
function EID:copyKColor(colorObj)
|
||||||
return KColor(colorObj.Red, colorObj.Green, colorObj.Blue, colorObj.Alpha)
|
return KColor(colorObj.Red, colorObj.Green, colorObj.Blue, colorObj.Alpha)
|
||||||
|
|||||||
@@ -158,6 +158,16 @@ EID.UserConfig = {
|
|||||||
-- Default = 7
|
-- Default = 7
|
||||||
["BagOfCraftingResults"] = 7,
|
["BagOfCraftingResults"] = 7,
|
||||||
|
|
||||||
|
---------Mouse Controls-----------
|
||||||
|
|
||||||
|
-- Toggles HUD descriptions based on the mouse position
|
||||||
|
-- Default = "false"
|
||||||
|
["EnableMouseControls"] = "false",
|
||||||
|
|
||||||
|
-- Toggles the custom mouse cursor
|
||||||
|
-- Default = "true"
|
||||||
|
["ShowCursor"] = "true",
|
||||||
|
|
||||||
-------------MISC---------------
|
-------------MISC---------------
|
||||||
|
|
||||||
-- Changes the number of Results shown for the additional Spindown dice description
|
-- Changes the number of Results shown for the additional Spindown dice description
|
||||||
@@ -236,6 +246,8 @@ EID.DefaultConfig = {
|
|||||||
["DisplayBagOfCrafting"] = "always",
|
["DisplayBagOfCrafting"] = "always",
|
||||||
["BagOfCraftingResults"] = 7,
|
["BagOfCraftingResults"] = 7,
|
||||||
["SpindownDiceResults"] = 3,
|
["SpindownDiceResults"] = 3,
|
||||||
|
["UseMouseControls"] = "false",
|
||||||
|
["ShowCursor"] = "true",
|
||||||
["ErrorMessage"] = "[Effect not defined]",
|
["ErrorMessage"] = "[Effect not defined]",
|
||||||
["TextColor"] = "ColorEIDText",
|
["TextColor"] = "ColorEIDText",
|
||||||
["ErrorColor"] = "ColorEIDError",
|
["ErrorColor"] = "ColorEIDError",
|
||||||
|
|||||||
+53
-1
@@ -21,6 +21,57 @@ EID.SpindownDiceSkipIDs = {
|
|||||||
[718]=true
|
[718]=true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EID.HUDElements = {
|
||||||
|
["Active1"] = {x = 20,y = 5, width = 65, height = 65, anchors={"TOP","LEFT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetActiveItem(ActiveSlot.SLOT_PRIMARY)
|
||||||
|
if id == 0 then return nil end
|
||||||
|
return EID:getDescriptionObj(5, 100, id)
|
||||||
|
end},
|
||||||
|
["Active2"] = {x = -5,y = 0, width = 35, height = 35, anchors={"TOP","LEFT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetActiveItem(ActiveSlot.SLOT_SECONDARY)
|
||||||
|
if id == 0 then return nil end
|
||||||
|
return EID:getDescriptionObj(5, 100, id)
|
||||||
|
end},
|
||||||
|
["Trinket1"] = {x = 50,y = 0, width = 55, height = 65, anchors={"BOTTOM","LEFT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetTrinket(0)
|
||||||
|
if id == 0 then return nil end
|
||||||
|
return EID:getDescriptionObj(5, 350, id)
|
||||||
|
end},
|
||||||
|
["Trinket2"] = {x = 0,y = 40, width = 55, height = 65, anchors={"BOTTOM","LEFT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetTrinket(1)
|
||||||
|
if id == 0 then return nil end
|
||||||
|
return EID:getDescriptionObj(5, 350, id)
|
||||||
|
end},
|
||||||
|
["Pocket1"] = {x = 0,y = 5, width = 250, height = 40, anchors={"BOTTOM","RIGHT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetCard(0)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 300, id) end
|
||||||
|
id = EID.player:GetPill(0)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 70, id) end
|
||||||
|
return nil
|
||||||
|
end},
|
||||||
|
["Pocket2"] = {x = 0,y = 40, width = 30, height = 30, anchors={"BOTTOM","RIGHT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetCard(1)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 300, id) end
|
||||||
|
id = EID.player:GetPill(1)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 70, id) end
|
||||||
|
return nil
|
||||||
|
end},
|
||||||
|
["Pocket3"] = {x = 0,y = 70, width = 30, height = 25, anchors={"BOTTOM","RIGHT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetCard(2)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 300, id) end
|
||||||
|
id = EID.player:GetPill(2)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 70, id) end
|
||||||
|
return nil
|
||||||
|
end},
|
||||||
|
["Pocket4"] = {x = 0,y = 95, width = 30, height = 20, anchors={"BOTTOM","RIGHT"}, descriptionObj = function()
|
||||||
|
local id = EID.player:GetCard(3)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 300, id) end
|
||||||
|
id = EID.player:GetPill(3)
|
||||||
|
if id ~= 0 then return EID:getDescriptionObj(5, 70, id) end
|
||||||
|
return nil
|
||||||
|
end}
|
||||||
|
}
|
||||||
|
|
||||||
-- Specific strings that will be replaced with something else. This is used to convert Shortcuts into internal markup.
|
-- Specific strings that will be replaced with something else. This is used to convert Shortcuts into internal markup.
|
||||||
EID.TextReplacementPairs = {
|
EID.TextReplacementPairs = {
|
||||||
{"!!!", "{{Warning}}"}, -- Turn 3 Exclamations into Warning
|
{"!!!", "{{Warning}}"}, -- Turn 3 Exclamations into Warning
|
||||||
@@ -35,6 +86,7 @@ EID.TextReplacementPairs = {
|
|||||||
{"\8\189", "{{Bomb}}"}, -- Legacy BOMB
|
{"\8\189", "{{Bomb}}"}, -- Legacy BOMB
|
||||||
{"{{Hashtag}}", "ǂ"}, -- Hashtag
|
{"{{Hashtag}}", "ǂ"}, -- Hashtag
|
||||||
{"{{CR}}", "{{ColorReset}}"}, -- Shortcut for Color Resetting
|
{"{{CR}}", "{{ColorReset}}"}, -- Shortcut for Color Resetting
|
||||||
|
{"{{EthernalHeart}}", "{{EternalHeart}}"} -- fix spelling error
|
||||||
}
|
}
|
||||||
|
|
||||||
--Format: [SHORTCUT]= {Animationname, Frame, Width, Height, LeftOffset [Default: -1], TopOffset [Default: 0], SpriteObject [Default: EID.InlineIconSprite]}
|
--Format: [SHORTCUT]= {Animationname, Frame, Width, Height, LeftOffset [Default: -1], TopOffset [Default: 0], SpriteObject [Default: EID.InlineIconSprite]}
|
||||||
@@ -61,7 +113,7 @@ EID.InlineIcons = {
|
|||||||
-- Hearts
|
-- Hearts
|
||||||
["Heart"] = {"hearts", 0, 9, 9},
|
["Heart"] = {"hearts", 0, 9, 9},
|
||||||
["HalfHeart"] = {"hearts", 1, 9, 9},
|
["HalfHeart"] = {"hearts", 1, 9, 9},
|
||||||
["EthernalHeart"] = {"hearts", 2, 9, 9},
|
["EternalHeart"] = {"hearts", 2, 9, 9},
|
||||||
["EmptyHeart"] = {"hearts", 3, 9, 9},
|
["EmptyHeart"] = {"hearts", 3, 9, 9},
|
||||||
["BlendedHeart"] = {"hearts", 4, 9, 9},
|
["BlendedHeart"] = {"hearts", 4, 9, 9},
|
||||||
["BoneHeart"] = {"hearts", 5, 9, 9},
|
["BoneHeart"] = {"hearts", 5, 9, 9},
|
||||||
|
|||||||
@@ -102,6 +102,8 @@ EID:addColor("ColorBlackBlink", nil, function(color)
|
|||||||
|
|
||||||
|
|
||||||
local function onDebugRender(t)
|
local function onDebugRender(t)
|
||||||
|
EID:renderHUDLocationIndicators()
|
||||||
|
|
||||||
for i,v in ipairs(Isaac.FindByType(5,10,3,true,false)) do
|
for i,v in ipairs(Isaac.FindByType(5,10,3,true,false)) do
|
||||||
if v:GetData()["EID_Description"] == nil then
|
if v:GetData()["EID_Description"] == nil then
|
||||||
v:GetData()["EID_Description"] = "Test specific description#Init seed: ".. v.InitSeed
|
v:GetData()["EID_Description"] = "Test specific description#Init seed: ".. v.InitSeed
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ local ArrowSprite = Sprite()
|
|||||||
ArrowSprite:Load("gfx/eid_transform_icons.anm2", true)
|
ArrowSprite:Load("gfx/eid_transform_icons.anm2", true)
|
||||||
ArrowSprite:Play("Arrow", false)
|
ArrowSprite:Play("Arrow", false)
|
||||||
|
|
||||||
|
local hudBBSprite = Sprite()
|
||||||
|
hudBBSprite:Load("gfx/eid_transform_icons.anm2", true)
|
||||||
|
hudBBSprite:Play("boundingBox")
|
||||||
|
|
||||||
------- Load all modules and other stuff ------
|
------- Load all modules and other stuff ------
|
||||||
require("mod_config_menu")
|
require("mod_config_menu")
|
||||||
|
|
||||||
@@ -403,6 +407,33 @@ function EID:renderIndicator(entity)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function EID:renderHUDLocationIndicators()
|
||||||
|
local mousePos = Input.GetMousePosition(false)
|
||||||
|
Isaac.RenderScaledText("Mouse pos X:"..mousePos.X.." Y:"..mousePos.Y, 100, 10, 0.5, 0.5, 1 ,1 ,1 ,1 )
|
||||||
|
Isaac.RenderScaledText("HUD Adjustment Preview!", 200, 10, 1, 1, 1 ,0.25 ,0.25 ,1 )
|
||||||
|
for k, v in pairs(EID.HUDElements) do
|
||||||
|
local hudElement = EID:handleHUDElement(v)
|
||||||
|
hudBBSprite.Scale = Vector(hudElement.width/2, hudElement.height/2)
|
||||||
|
hudBBSprite.Color = Color(1, 1, 1, EID.Config["Transparency"], 0, 0, 0)
|
||||||
|
hudBBSprite:Render(Vector(hudElement.x/2, hudElement.y/2), nullVector, nullVector)
|
||||||
|
Isaac.RenderScaledText(k, hudElement.x/2, hudElement.y/2, 0.5, 0.5, 1, 1, 1 ,1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EID:handleHoverHUD()
|
||||||
|
local mousePos = Input.GetMousePosition(false)
|
||||||
|
if EID.Config["ShowCursor"] then
|
||||||
|
EID.IconSprite:Play("Cursor")
|
||||||
|
EID:renderIcon(EID.IconSprite, mousePos.X/2, mousePos.Y/2)
|
||||||
|
end
|
||||||
|
for k, v in pairs(EID.HUDElements) do
|
||||||
|
local hudElement = EID:handleHUDElement(v)
|
||||||
|
if hudElement.x <= mousePos.X and (hudElement.x + hudElement.width) >= mousePos.X and hudElement.y <= mousePos.Y and (hudElement.y + hudElement.height) >= mousePos.Y then
|
||||||
|
return hudElement.descriptionObj() or nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------On Update Function------------------------------
|
---------------------------On Update Function------------------------------
|
||||||
@@ -502,8 +533,17 @@ local function onRender(t)
|
|||||||
EID.lastDescriptionEntity = nil
|
EID.lastDescriptionEntity = nil
|
||||||
EID.lastDist = 10000
|
EID.lastDist = 10000
|
||||||
local searchGroups = {}
|
local searchGroups = {}
|
||||||
|
local sourcePos = EID.player.Position
|
||||||
|
|
||||||
table.insert(searchGroups, Isaac.FindInRadius(EID.player.Position, tonumber(EID.Config["MaxDistance"])*40, searchPartitions))
|
if EID.Config["EnableMouseControls"] then
|
||||||
|
local hudDescription = EID:handleHoverHUD()
|
||||||
|
if hudDescription then
|
||||||
|
EID:printDescription(hudDescription)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(searchGroups, Isaac.FindInRadius(sourcePos, tonumber(EID.Config["MaxDistance"])*40, searchPartitions))
|
||||||
for k,_ in pairs(EID.effectList) do
|
for k,_ in pairs(EID.effectList) do
|
||||||
table.insert(searchGroups, Isaac.FindByType(EntityType.ENTITY_EFFECT, k, -1, true, false))
|
table.insert(searchGroups, Isaac.FindByType(EntityType.ENTITY_EFFECT, k, -1, true, false))
|
||||||
end
|
end
|
||||||
@@ -511,7 +551,7 @@ local function onRender(t)
|
|||||||
for _, entitySearch in ipairs(searchGroups) do
|
for _, entitySearch in ipairs(searchGroups) do
|
||||||
for i, entity in ipairs(entitySearch) do
|
for i, entity in ipairs(entitySearch) do
|
||||||
if EID:hasDescription(entity) and entity.FrameCount > 0 then
|
if EID:hasDescription(entity) and entity.FrameCount > 0 then
|
||||||
local diff = entity.Position:__sub(EID.player.Position)
|
local diff = entity.Position:__sub(sourcePos)
|
||||||
if diff:Length() < EID.lastDist then
|
if diff:Length() < EID.lastDist then
|
||||||
EID.lastDescriptionEntity = entity
|
EID.lastDescriptionEntity = entity
|
||||||
EID.lastDist = diff:Length()
|
EID.lastDist = diff:Length()
|
||||||
|
|||||||
+84
-21
@@ -1,42 +1,57 @@
|
|||||||
|
|
||||||
-- MOD CONFIG MENU Compatibility
|
-- MOD CONFIG MENU Compatibility
|
||||||
local MCMLoaded, MCM = pcall(require, "scripts.modconfig")
|
local MCMLoaded, MCM = pcall(require, "scripts.modconfig")
|
||||||
EID.MCMCompat_isDisplayingEIDTab = false
|
EID.MCMCompat_isDisplayingEIDTab = ""
|
||||||
local MCMCompat_isDisplayingDummyMCMObj = false
|
local MCMCompat_isDisplayingDummyMCMObj = false
|
||||||
local MCMCompat_oldPermanentObj = false
|
local MCMCompat_oldPermanentObj = false
|
||||||
EID.MCMLoaded = MCMLoaded
|
EID.MCMLoaded = MCMLoaded
|
||||||
local colorNameArray = {}
|
local colorNameArray = {}
|
||||||
|
EID.MCMHudOffset = ModConfigMenu.Config["General"].HudOffset
|
||||||
|
|
||||||
function EID:renderMCMDummyDescription()
|
local function renderDummyDesc()
|
||||||
if MCMLoaded then
|
|
||||||
local mcmHudOffset = ModConfigMenu.Config["General"].HudOffset
|
|
||||||
if mcmHudOffset == nil and ScreenHelper then
|
|
||||||
mcmHudOffset = ScreenHelper.GetOffset()
|
|
||||||
end
|
|
||||||
EID:addTextPosModifier("MCM_HudOffset", Vector(mcmHudOffset * 2, mcmHudOffset))
|
|
||||||
if MCM.IsVisible and EID.permanentDisplayTextObj == nil and EID.MCMCompat_isDisplayingEIDTab then
|
|
||||||
MCMCompat_oldPermanentObj = EID.permanentDisplayTextObj
|
MCMCompat_oldPermanentObj = EID.permanentDisplayTextObj
|
||||||
local demoDescObj = EID:getDescriptionObj(5, 100, 33)
|
local demoDescObj = EID:getDescriptionObj(5, 100, 33)
|
||||||
demoDescObj.Name = "Demo Object Name"
|
demoDescObj.Name = "Demo Object Name"
|
||||||
demoDescObj.Transformation = "Demo Transformation"
|
demoDescObj.Transformation = "Demo Transformation"
|
||||||
demoDescObj.Description = "A very cool description as a demonstration of the power of EID!#\1 This is also a cool line#This line loves you {{Heart}}"
|
demoDescObj.Description = "A very cool description as a demonstration of the power of EID!#\1 This is also a cool line#This line loves you {{Heart}}"
|
||||||
EID:displayPermanentText(demoDescObj)
|
EID:displayPermanentText(demoDescObj)
|
||||||
MCMCompat_isDisplayingDummyMCMObj = true
|
end
|
||||||
EID:buildColorArray()
|
|
||||||
elseif not MCM.IsVisible and MCMCompat_isDisplayingDummyMCMObj then
|
local function clearRenderDummyDesc()
|
||||||
if MCMCompat_oldPermanentObj == nil then
|
if MCMCompat_oldPermanentObj == nil then
|
||||||
EID:hidePermanentText()
|
EID:hidePermanentText()
|
||||||
else
|
else
|
||||||
EID.permanentDisplayTextObj = MCMCompat_oldPermanentObj
|
EID.permanentDisplayTextObj = MCMCompat_oldPermanentObj
|
||||||
end
|
end
|
||||||
EID.MCMCompat_isDisplayingEIDTab = false
|
|
||||||
MCMCompat_oldPermanentObj = nil
|
MCMCompat_oldPermanentObj = nil
|
||||||
MCMCompat_isDisplayingDummyMCMObj = false
|
MCMCompat_isDisplayingDummyMCMObj = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function EID:renderMCMDummyDescription()
|
||||||
|
if MCMLoaded then
|
||||||
|
EID.MCMHudOffset = ModConfigMenu.Config["General"].HudOffset
|
||||||
|
if EID.MCMHudOffset == nil and ScreenHelper then
|
||||||
|
EID.MCMHudOffset = ScreenHelper.GetOffset()
|
||||||
|
end
|
||||||
|
EID:addTextPosModifier("MCM_HudOffset", Vector(EID.MCMHudOffset * 2, EID.MCMHudOffset))
|
||||||
|
if MCM.IsVisible and EID.MCMCompat_isDisplayingEIDTab ~= "" then
|
||||||
|
if EID.MCMCompat_isDisplayingEIDTab == "Mouse" and EID.Config["EnableMouseControls"] then
|
||||||
|
clearRenderDummyDesc()
|
||||||
|
EID:renderHUDLocationIndicators()
|
||||||
|
elseif EID.MCMCompat_isDisplayingEIDTab == "Visuals" and EID.permanentDisplayTextObj == nil then
|
||||||
|
renderDummyDesc()
|
||||||
|
end
|
||||||
|
MCMCompat_isDisplayingDummyMCMObj = true
|
||||||
|
EID:buildColorArray()
|
||||||
|
elseif not MCM.IsVisible and MCMCompat_isDisplayingDummyMCMObj then
|
||||||
|
clearRenderDummyDesc()
|
||||||
|
EID.MCMCompat_isDisplayingEIDTab = ""
|
||||||
colorNameArray = {}
|
colorNameArray = {}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function EID:buildColorArray()
|
function EID:buildColorArray()
|
||||||
colorNameArray = {}
|
colorNameArray = {}
|
||||||
for k,v in pairs(EID.InlineColors) do
|
for k,v in pairs(EID.InlineColors) do
|
||||||
@@ -85,7 +100,7 @@ if MCMLoaded then
|
|||||||
Minimum = 1,
|
Minimum = 1,
|
||||||
Maximum = #(EID.Languages),
|
Maximum = #(EID.Languages),
|
||||||
Display = function()
|
Display = function()
|
||||||
EID.MCMCompat_isDisplayingEIDTab = false;
|
EID.MCMCompat_isDisplayingEIDTab = "";
|
||||||
return "Language: " .. displayLanguage[AnIndexOf(EID.Languages, EID.Config["Language"])]
|
return "Language: " .. displayLanguage[AnIndexOf(EID.Languages, EID.Config["Language"])]
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
@@ -308,7 +323,7 @@ if MCMLoaded then
|
|||||||
return EID.Config["DisplayItemInfo"]
|
return EID.Config["DisplayItemInfo"]
|
||||||
end,
|
end,
|
||||||
Display = function()
|
Display = function()
|
||||||
EID.MCMCompat_isDisplayingEIDTab = false;
|
EID.MCMCompat_isDisplayingEIDTab = "";
|
||||||
local onOff = "False"
|
local onOff = "False"
|
||||||
if EID.Config["DisplayItemInfo"] then
|
if EID.Config["DisplayItemInfo"] then
|
||||||
onOff = "True"
|
onOff = "True"
|
||||||
@@ -644,7 +659,7 @@ if MCMLoaded then
|
|||||||
Minimum = 1,
|
Minimum = 1,
|
||||||
Maximum = #fontTypes,
|
Maximum = #fontTypes,
|
||||||
Display = function()
|
Display = function()
|
||||||
EID.MCMCompat_isDisplayingEIDTab = true;
|
EID.MCMCompat_isDisplayingEIDTab = "Visuals";
|
||||||
return "Font Type: " .. EID.Config["FontType"]
|
return "Font Type: " .. EID.Config["FontType"]
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
@@ -824,9 +839,60 @@ if MCMLoaded then
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
---------------------------------------------------------------------------
|
||||||
|
-----------------------------Mouse Controls--------------------------------
|
||||||
|
MCM.AddText("EID", "Mouse", function() return "! THIS FEATURE IS IN EARLY DEVELOPMENT !" end)
|
||||||
|
MCM.AddSpace("EID", "Mouse")
|
||||||
|
MCM.AddText("EID", "Mouse", function() return "MCM -> General -> Hud Offset" end)
|
||||||
|
MCM.AddText("EID", "Mouse", function() return "to adjust Hud Offset" end)
|
||||||
|
MCM.AddSpace("EID", "Mouse")
|
||||||
|
-- Enable mouse controls
|
||||||
|
MCM.AddSetting(
|
||||||
|
"EID",
|
||||||
|
"Mouse",
|
||||||
|
{
|
||||||
|
Type = ModConfigMenu.OptionType.BOOLEAN,
|
||||||
|
CurrentSetting = function()
|
||||||
|
return EID.Config["EnableMouseControls"]
|
||||||
|
end,
|
||||||
|
Display = function()
|
||||||
|
EID.MCMCompat_isDisplayingEIDTab = "Mouse";
|
||||||
|
local onOff = "False"
|
||||||
|
if EID.Config["EnableMouseControls"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Enable Mouse controls: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EID.Config["EnableMouseControls"] = currentBool
|
||||||
|
end,
|
||||||
|
Info = {"If enabled, allows to hover over certain HUD elements to get descriptions"}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
-- Enable mouse controls
|
||||||
|
MCM.AddSetting(
|
||||||
|
"EID",
|
||||||
|
"Mouse",
|
||||||
|
{
|
||||||
|
Type = ModConfigMenu.OptionType.BOOLEAN,
|
||||||
|
CurrentSetting = function()
|
||||||
|
return EID.Config["ShowCursor"]
|
||||||
|
end,
|
||||||
|
Display = function()
|
||||||
|
local onOff = "False"
|
||||||
|
if EID.Config["ShowCursor"] then
|
||||||
|
onOff = "True"
|
||||||
|
end
|
||||||
|
return "Show Cursor: " .. onOff
|
||||||
|
end,
|
||||||
|
OnChange = function(currentBool)
|
||||||
|
EID.Config["ShowCursor"] = currentBool
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
---------------------------------Visuals-----------------------------------
|
---------------------------------Colors-----------------------------------
|
||||||
|
|
||||||
-- Text Color
|
-- Text Color
|
||||||
MCM.AddSetting(
|
MCM.AddSetting(
|
||||||
@@ -840,7 +906,7 @@ if MCMLoaded then
|
|||||||
Minimum = 0,
|
Minimum = 0,
|
||||||
Maximum = 1000,
|
Maximum = 1000,
|
||||||
Display = function()
|
Display = function()
|
||||||
EID.MCMCompat_isDisplayingEIDTab = true;
|
EID.MCMCompat_isDisplayingEIDTab = "Visuals";
|
||||||
return "Descriptions: " .. string.gsub(EID.Config["TextColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["TextColor"]).."/"..#colorNameArray..")"
|
return "Descriptions: " .. string.gsub(EID.Config["TextColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["TextColor"]).."/"..#colorNameArray..")"
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
@@ -863,7 +929,6 @@ if MCMLoaded then
|
|||||||
Minimum = 0,
|
Minimum = 0,
|
||||||
Maximum = 1000,
|
Maximum = 1000,
|
||||||
Display = function()
|
Display = function()
|
||||||
EID.MCMCompat_isDisplayingEIDTab = true;
|
|
||||||
return "Names: " .. string.gsub(EID.Config["ItemNameColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemNameColor"]).."/"..#colorNameArray..")"
|
return "Names: " .. string.gsub(EID.Config["ItemNameColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ItemNameColor"]).."/"..#colorNameArray..")"
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
@@ -886,7 +951,6 @@ if MCMLoaded then
|
|||||||
Minimum = 0,
|
Minimum = 0,
|
||||||
Maximum = 1000,
|
Maximum = 1000,
|
||||||
Display = function()
|
Display = function()
|
||||||
EID.MCMCompat_isDisplayingEIDTab = true;
|
|
||||||
return "Transformations: " .. string.gsub(EID.Config["TransformationColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["TransformationColor"]).."/"..#colorNameArray..")"
|
return "Transformations: " .. string.gsub(EID.Config["TransformationColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["TransformationColor"]).."/"..#colorNameArray..")"
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
@@ -909,7 +973,6 @@ if MCMLoaded then
|
|||||||
Minimum = 0,
|
Minimum = 0,
|
||||||
Maximum = 1000,
|
Maximum = 1000,
|
||||||
Display = function()
|
Display = function()
|
||||||
EID.MCMCompat_isDisplayingEIDTab = true;
|
|
||||||
return "Errors: " .. string.gsub(EID.Config["ErrorColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ErrorColor"]).."/"..#colorNameArray..")"
|
return "Errors: " .. string.gsub(EID.Config["ErrorColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ErrorColor"]).."/"..#colorNameArray..")"
|
||||||
end,
|
end,
|
||||||
OnChange = function(currentNum)
|
OnChange = function(currentNum)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<AnimatedActor>
|
<AnimatedActor>
|
||||||
<Info CreatedBy="Unknown" CreatedOn="29.05.2021 01:01:14" Version="29" Fps="30"/>
|
<Info CreatedBy="Unknown" CreatedOn="17.06.2021 22:02:47" Version="30" Fps="30"/>
|
||||||
<Content>
|
<Content>
|
||||||
<Spritesheets>
|
<Spritesheets>
|
||||||
<Spritesheet Path="eid_transform_icons.png" Id="0"/>
|
<Spritesheet Path="eid_transform_icons.png" Id="0"/>
|
||||||
@@ -257,5 +257,30 @@
|
|||||||
<NullAnimations/>
|
<NullAnimations/>
|
||||||
<Triggers/>
|
<Triggers/>
|
||||||
</Animation>
|
</Animation>
|
||||||
|
<Animation Name="boundingBox" FrameNum="1" Loop="false">
|
||||||
|
<RootAnimation>
|
||||||
|
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||||
|
</RootAnimation>
|
||||||
|
<LayerAnimations>
|
||||||
|
<LayerAnimation LayerId="0" Visible="true">
|
||||||
|
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="80" YCrop="16" Width="1" Height="1" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||||
|
</LayerAnimation>
|
||||||
|
</LayerAnimations>
|
||||||
|
<NullAnimations/>
|
||||||
|
<Triggers/>
|
||||||
|
</Animation>
|
||||||
|
<Animation Name="Cursor" FrameNum="2" Loop="false">
|
||||||
|
<RootAnimation>
|
||||||
|
<Frame XPosition="0" YPosition="0" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||||
|
</RootAnimation>
|
||||||
|
<LayerAnimations>
|
||||||
|
<LayerAnimation LayerId="0" Visible="true">
|
||||||
|
<Frame XPosition="0" YPosition="0" XPivot="0" YPivot="0" XCrop="64" YCrop="0" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||||
|
<Frame XPosition="0" YPosition="0" XPivot="6" YPivot="0" XCrop="80" YCrop="0" Width="16" Height="16" XScale="100" YScale="100" Delay="1" Visible="true" RedTint="255" GreenTint="255" BlueTint="255" AlphaTint="255" RedOffset="0" GreenOffset="0" BlueOffset="0" Rotation="0" Interpolated="false"/>
|
||||||
|
</LayerAnimation>
|
||||||
|
</LayerAnimations>
|
||||||
|
<NullAnimations/>
|
||||||
|
<Triggers/>
|
||||||
|
</Animation>
|
||||||
</Animations>
|
</Animations>
|
||||||
</AnimatedActor>
|
</AnimatedActor>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Reference in new issue
Block a user