Added {{Indent}} and {{IND}} to allow for bulletpoint indentations
closes #910
This commit is contained in:
1 parent
9b00e86ff4
commit
86ebf590a6
3 files changed
+20
-4
No files matched your search
@@ -1340,6 +1340,14 @@ function EID:handleBulletpointIcon(text, ignoreBPConfig)
|
||||
return "\007"
|
||||
end
|
||||
|
||||
-- Find indentation markup, remove it and return the modified string and the number of indentations
|
||||
-- position of the markup in the text is irrelevant. it only affects the indentation of the bullet point
|
||||
---@param text string
|
||||
---@return string, integer
|
||||
function EID:handleTextIndentation(text)
|
||||
return string.gsub(text, "{{Indent}}", "")
|
||||
end
|
||||
|
||||
local colorFunc = nil
|
||||
---Gets a KColor from a Markup-string (example Input: "{{ColorText}}").
|
||||
---Returns the KColor object and a boolean value indicating if the given string was a color markup or not
|
||||
|
||||
@@ -133,6 +133,7 @@ EID.TextReplacementPairs = {
|
||||
{"{{CR}}", "{{ColorReset}}"}, -- Shortcut for Color Resetting
|
||||
{"{{EthernalHeart}}", "{{EternalHeart}}"}, -- fix spelling error
|
||||
{"{{CONFIG_BoC_Toggle}}", function(_) return EID.ButtonToIconMap[EID.Config["BagOfCraftingToggleKey"]] or "{{ButtonSelect}}" end},
|
||||
{"{{IND}}", "{{Indent}}"}, -- Shortcut for Indent
|
||||
-- more common/official names
|
||||
{"{{MimicChest}}", "{{TrapChest}}"},
|
||||
{"{{EternalChest}}", "{{HolyChest}}"},
|
||||
|
||||
Reference in new issue
Block a user