Skip to content

Commit 3e266f2

Browse files
committed
Ctrl+Space = POINTER
1 parent 0fc571e commit 3e266f2

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

items/code.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,10 @@ local revert = {
974974
init = function(self)
975975
local sr = save_run
976976
function save_run()
977+
--Sneaking this here but hopefully fixes pointer UI crashes
978+
if G.GAME.USING_CODE then
979+
return
980+
end
977981
if G.GAME.round_resets.ante ~= G.GAME.cry_revert_ante then
978982
G.GAME.cry_revert_ante = G.GAME.round_resets.ante
979983
G.GAME.cry_revert = nil

lib/misc.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,3 +708,27 @@ end
708708
function Cryptid.forced_edition()
709709
return G.GAME.modifiers.cry_force_edition or G.GAME.used_vouchers.v_cry_curate
710710
end
711+
712+
-- Add Ctrl+Space for Pointer UI in Debug Mode
713+
local ckpu = Controller.key_press_update
714+
function Controller:key_press_update(key, dt)
715+
ckpu(self, key, dt)
716+
if key == "space" and G.STAGE == G.STAGES.RUN and not _RELEASE_MODE and (self.held_keys['lctrl'] or self.held_keys['rctrl'] or self.held_keys['lgui'] or self.held_keys['rgui']) and not G.GAME.USING_CODE then
717+
G.GAME.USING_CODE = true
718+
G.GAME.USING_POINTER = true
719+
G.ENTERED_CARD = ""
720+
G.CHOOSE_CARD = UIBox({
721+
definition = create_UIBox_pointer(card),
722+
config = {
723+
align = "cm",
724+
offset = { x = 0, y = 10 },
725+
major = G.ROOM_ATTACH,
726+
bond = "Weak",
727+
instance_type = "POPUP",
728+
},
729+
})
730+
G.CHOOSE_CARD.alignment.offset.y = 0
731+
G.ROOM.jiggle = G.ROOM.jiggle + 1
732+
G.CHOOSE_CARD:align_to_major()
733+
end
734+
end

0 commit comments

Comments
 (0)