Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions lovely/sui.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0

# Intercept created UIE
[[patches]]
[patches.pattern]
target = "engine/ui.lua"
pattern = '''local UIE = UIElement(parent, self, node.n, node.config)'''
position = "at"
payload = '''
node = SMODS.SUI.process_node_render(node)
local UIE = UIElement(parent, self, node.n, node.config)
UIE.input_node = node
'''
match_indent = true

# Mark a point where UIE is fully created
[[patches]]
[patches.pattern]
target = "engine/ui.lua"
pattern = '''self.static_rotation = true'''
position = "after"
payload = '''
SMODS.SUI.UIE_INIT = true
'''
match_indent = true

# Init element
[[patches]]
[patches.pattern]
target = "engine/ui.lua"
pattern = '''self.layered_parallax = self.layered_parallax or {x=0, y=0}'''
position = "after"
payload = '''
if SMODS.SUI.UIE_INIT then
SMODS.SUI.UIE_INIT = nil
SMODS.SUI.process_element_created(self)
end
'''
match_indent = true
1 change: 1 addition & 0 deletions src/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ for _, path in ipairs {
"src/ui.lua",
"src/index.lua",
"src/utils.lua",
"src/sui.lua",
"src/overrides.lua",
"src/game_object.lua",
"src/compat_0_9_8.lua",
Expand Down
Loading