Skip to content

Commit 446c42d

Browse files
authored
Add config options to CardArea (#891)
1 parent aff8b25 commit 446c42d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

lovely/cardarea.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[manifest]
2+
version = "1.0.0"
3+
dump_lua = true
4+
priority = -10
5+
6+
# Change CardArea's background colour
7+
# CardArea.draw
8+
[[patches]]
9+
[patches.pattern]
10+
target = "cardarea.lua"
11+
pattern = "{n=G.UIT.R, config={minw = self.T.w,minh = self.T.h,align = \"cm\", padding = 0.1, mid = true, r = 0.1, colour = self ~= G.shop_vouchers and {0,0,0,0.1} or nil, ref_table = self}, nodes={"
12+
position = 'at'
13+
match_indent = true
14+
payload = '''
15+
{n=G.UIT.R, config={minw = self.T.w,minh = self.T.h,align = "cm", padding = 0.1, mid = true, r = 0.1, colour = self.config.bg_colour or self ~= G.shop_vouchers and {0,0,0,0.1} or nil, ref_table = self}, nodes={
16+
'''
17+
18+
# Remove CardArea count
19+
# CardArea.draw
20+
[[patches]]
21+
[patches.pattern]
22+
target = "cardarea.lua"
23+
pattern = '''
24+
local card_count = self ~= G.shop_vouchers and {n=G.UIT.R, config={align = self == G.jokers and 'cl' or self == G.hand and 'cm' or 'cr', padding = 0.03, no_fill = true}, nodes={
25+
'''
26+
position = 'at'
27+
match_indent = true
28+
payload = '''
29+
local card_count = not self.config.no_card_count and self ~= G.shop_vouchers and {n=G.UIT.R, config={align = self == G.jokers and 'cl' or self == G.hand and 'cm' or 'cr', padding = 0.03, no_fill = true}, nodes={
30+
'''

0 commit comments

Comments
 (0)