Add accessibility feature for Equinox
This commit is contained in:
parent
4f8902411b
commit
4fe62bba97
3 changed files with 24 additions and 2 deletions
1
config.lua
Normal file
1
config.lua
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
return {["equinox_assist"] = false}
|
||||||
|
|
@ -318,7 +318,10 @@ local orig_draw = Card.draw
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function Card:draw(...)
|
function Card:draw(...)
|
||||||
if equinox() and not self.states.hover.is and not self.states.focus.is then
|
if equinox() and
|
||||||
|
not SMODS.Mods.Roland.config.equinox_assist and
|
||||||
|
not self.states.hover.is and
|
||||||
|
not self.states.focus.is then
|
||||||
add_to_drawhash(self)
|
add_to_drawhash(self)
|
||||||
else
|
else
|
||||||
return orig_draw(self, ...)
|
return orig_draw(self, ...)
|
||||||
|
|
@ -329,7 +332,9 @@ local orig_draw_self = UIElement.draw_self
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function UIElement:draw_self(...)
|
function UIElement:draw_self(...)
|
||||||
if equinox() and not self.config.button and not self.config.button_UIE then
|
if equinox() and
|
||||||
|
not self.config.button and
|
||||||
|
not self.config.button_UIE then
|
||||||
add_to_drawhash(self)
|
add_to_drawhash(self)
|
||||||
else
|
else
|
||||||
return orig_draw_self(self, ...)
|
return orig_draw_self(self, ...)
|
||||||
|
|
|
||||||
16
src/main.lua
16
src/main.lua
|
|
@ -20,3 +20,19 @@ SMODS.Atlas {
|
||||||
SMODS.current_mod.optional_features = function()
|
SMODS.current_mod.optional_features = function()
|
||||||
return {cardareas = {deck = true, unscored = true}}
|
return {cardareas = {deck = true, unscored = true}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
SMODS.current_mod.config_tab = function()
|
||||||
|
return {
|
||||||
|
n = G.UIT.ROOT,
|
||||||
|
config = {r = 0.1, minw = 8, minh = 6, align = "tl", padding = 0.2, colour = G.C.BLACK},
|
||||||
|
nodes = {{
|
||||||
|
n = G.UIT.C,
|
||||||
|
config = {minw = 1, minh = 1, align = "tl", colour = G.C.CLEAR, padding = 0.15},
|
||||||
|
nodes = {create_toggle({
|
||||||
|
label = "Assist: Only hide text during Equinox Blind",
|
||||||
|
ref_table = SMODS.Mods.Roland.config,
|
||||||
|
ref_value = "equinox_assist",
|
||||||
|
})},
|
||||||
|
}},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue