suggest an initial code map

akkartik
May 13, 2025, 9:21 PM
LTV6STXTJZKY7BPQQUXLYFDPV3FMYX6GYMVNUIUX5H6LAYHFJ63AC

Dependencies

Change contents

  • file addition: default_map (----------)
    [2.2]
    {
    "on": {
    "x": 0,
    "y": 0,
    "w": 600,
    "h": 525,
    },
    "on.initialize": {
    "x": 700,
    "y": 0,
    "w": 600,
    "h": 50,
    },
    "on.update": {
    "x": 1400,
    "y": 200,
    "w": 600,
    "h": 100,
    },
    "on.draw": {
    "x": 1400,
    "y": 0,
    "w": 600,
    "h": 125,
    },
    "on.keychord_press": {
    "x": 2100,
    "y": 0,
    "w": 600,
    "h": 375,
    },
    "on.text_input": {
    "x": 2100,
    "y": 500,
    "w": 600,
    "h": 100,
    },
    "on.key_release": {
    "x": 2100,
    "y": 700,
    "w": 600,
    "h": 50,
    },
    "on.mouse_press": {
    "x": 2800,
    "y": 0,
    "w": 600,
    "h": 50,
    },
    "on.mouse_move": {
    "x": 2800,
    "y": 200,
    "w": 600,
    "h": 50,
    },
    "on.mouse_release": {
    "x": 2800,
    "y": 400,
    "w": 600,
    "h": 50,
    },
    }
  • file addition: 0010-on.mouse_release (----------)
    [2.2]
    on.mouse_release = function(x,y, mouse_button)
    end
  • file addition: 0009-on.mouse_move (----------)
    [2.2]
    on.mouse_move = function(x,y, dx,dy)
    end
  • file addition: 0008-on.mouse_press (----------)
    [2.2]
    on.mouse_press = function(x,y, mouse_button)
    end
  • file addition: 0007-on.key_release (----------)
    [2.2]
    on.key_release = function(key)
    end
  • file addition: 0006-on.text_input (----------)
    [2.2]
    on.text_input = function(t)
    -- Handle regular printable keys here.
    -- 'A' will show up as expected.
    end
  • file addition: 0005-on.keychord_press (----------)
    [2.2]
    on.keychord_press = function(chord)
    -- Handle hotkeys here.
    -- Example values of 'chord':
    -- * if you press ctrl + a: 'C-a'
    -- * if you press alt + a: 'M-a'
    -- * if you press cmd + a on Mac OS: 's-a'
    -- * if you press win + a on Windows: 's-a'
    -- * if you press shift + a: 'S-a'
    -- * if you press F1: 'f1'
    -- * if you press alt + ctrl + shift + cmd + a: 'C-M-S-s-a'. Subsets of keys always preserve that order.
    -- See https://love2d.org/wiki/KeyConstant for a complete list of key names
    end
  • file addition: 0004-on.initialize (----------)
    [2.2]
    on.initialize = function()
    end
  • file addition: 0003-on.update (----------)
    [2.2]
    on.update = function(dt)
    -- dt contains the time in seconds, a float usually much less than 1, since the previous call to on.update
    end
  • file addition: 0002-on.draw (----------)
    [2.2]
    on.draw = function()
    -- Only draw to screen here, try to use on.update() instead when you need to modify the state of your app.
    end