Skip to content

Commit 2879c5c

Browse files
committed
allow more flexible use pointer ui for crossmod
1 parent 904f641 commit 2879c5c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

lib/misc.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,7 @@ G.FUNCS.exit_overlay_menu_code = function(e)
11491149
G.GAME.USING_POINTER = nil
11501150
G.GAME.POINTER_SUBMENU = nil
11511151
G.GAME.POINTER_PLAYING = nil
1152+
G.GAME.POINTER_COLLECTION = nil
11521153
if G.GAME.CODE_DESTROY_CARD and G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse then
11531154
G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse = G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse - 1
11541155
G.GAME.CODE_DESTROY_CARD = nil

lovely/code.toml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -605,16 +605,17 @@ pattern = '''
605605
'''
606606
position = "before"
607607
payload = '''
608-
local enhanced = (not G.GAME.USING_POINTER and UIBox_button({button = 'your_collection_enhancements', label = {localize('b_enhanced_cards')}, minw = 5}))
608+
local use_pointer = G.GAME.USING_POINTER or G.GAME.POINTER_COLLECTION
609+
local enhanced = (not use_pointer and UIBox_button({button = 'your_collection_enhancements', label = {localize('b_enhanced_cards')}, minw = 5}))
609610
or UIBox_button({button = 'your_collection_create_card_rank', label = {localize('b_playing_cards')}, minw = 5, minh = 3.4, id = 'your_collection_create_card'})
610-
local seals = (not G.GAME.USING_POINTER and UIBox_button({button = 'your_collection_seals', label = {localize('b_seals')}, minw = 5, id = 'your_collection_seals'})) or nil
611-
local editions = not G.GAME.USING_POINTER and UIBox_button({button = 'your_collection_editions', label = {localize('b_editions')}, count = G.DISCOVER_TALLIES.editions, minw = 5, id = 'your_collection_editions'}) or nil
611+
local seals = (not use_pointer and UIBox_button({button = 'your_collection_seals', label = {localize('b_seals')}, minw = 5, id = 'your_collection_seals'})) or nil
612+
local editions = not use_pointer and UIBox_button({button = 'your_collection_editions', label = {localize('b_editions')}, count = G.DISCOVER_TALLIES.editions, minw = 5, id = 'your_collection_editions'}) or nil
612613
613-
local blinds = UIBox_button({button = 'your_collection_blinds', label = {localize('b_blinds')}, count = G.DISCOVER_TALLIES.blinds, minw = 5, minh = (G.GAME.USING_POINTER and 2.8 or 2.0), id = 'your_collection_blinds', focus_args = {snap_to = true}})
614-
local other = not G.GAME.USING_POINTER and UIBox_button({button = 'your_collection_other_gameobjects', label = {localize('k_other')}, minw = 5, id = 'your_collection_other_gameobjects', focus_args = {snap_to = true}}) or nil
614+
local blinds = UIBox_button({button = 'your_collection_blinds', label = {localize('b_blinds')}, count = G.DISCOVER_TALLIES.blinds, minw = 5, minh = (use_pointer and 2.8 or 2.0), id = 'your_collection_blinds', focus_args = {snap_to = true}})
615+
local other = not use_pointer and UIBox_button({button = 'your_collection_other_gameobjects', label = {localize('k_other')}, minw = 5, id = 'your_collection_other_gameobjects', focus_args = {snap_to = true}}) or nil
615616
616-
local decks = not G.GAME.USING_POINTER and UIBox_button({button = 'your_collection_decks', label = {localize('b_decks')}, count = G.DISCOVER_TALLIES.backs, minw = 5}) or nil
617-
local vouchers = UIBox_button({button = 'your_collection_vouchers', label = {localize('b_vouchers')}, count = G.DISCOVER_TALLIES.vouchers, minw = 5, id = 'your_collection_vouchers', minh = G.GAME.USING_POINTER and 2.0})
617+
local decks = not use_pointer and UIBox_button({button = 'your_collection_decks', label = {localize('b_decks')}, count = G.DISCOVER_TALLIES.backs, minw = 5}) or nil
618+
local vouchers = UIBox_button({button = 'your_collection_vouchers', label = {localize('b_vouchers')}, count = G.DISCOVER_TALLIES.vouchers, minw = 5, id = 'your_collection_vouchers', minh = use_pointer and 2.0})
618619
'''
619620
match_indent = true
620621

0 commit comments

Comments
 (0)