new fork: a template for carousel-based apps

akkartik
Mar 16, 2024, 5:57 AM
FSQ7OI4M7DRTLNCLZMPVNMMOMRD2HHF3TGN2RTURPNIEHNLHA24QC

Dependencies

  • [2] UCA3SCAJ make the driver seem less intimidating
  • [3] ZSDFOBND Merge text0
  • [4] QKKVI7UO credits
  • [5] Q4WRCUWD screenshot
  • [6] DYPL2TRL resolve conflicts
  • [7] ER7WGGU2 update title
  • [8] Q4CJ4WWU switch to a single global output editor
  • [9] 3EQAFUFN resolve conflicts
  • [10] MD3W5IRA new fork: rip out drawing support
  • [11] WXWJJ7JU clarify driver description
  • [12] GVX7YSQY initial script after splitting up text-zoom
  • [13] 4YGNCUZS Merge lines.love
  • [14] ZM7NOBRM new fork: carousel shell
  • [15] M7UODV5H Merge text0
  • [16] D4FEFHQC flesh out Readme
  • [17] UOGZZY3L link to reference from Readme
  • [18] U6JNZOH4 Merge text0
  • [19] JZKEIKO6 freudian typo
  • [20] PNBKVYZ4 more cogent onboarding instructions
  • [21] ZTMRQZSW Readme
  • [22] L5SYYGSB new mirror; also correct a typo
  • [23] F3NPUCCM update stale information
  • [24] WGM4HHT4 oh, switch the name
  • [25] JX3PYEIS resolve conflicts
  • [26] LRG2TNA7 screens now run
  • [27] JM2PAF73 remove warning about persistence from Readme
  • [28] OJ2CLK4Q Merge text0
  • [29] 3PFDYZWT resolve conflicts
  • [30] WHFOJBAE Merge text0
  • [31] 4VUVVW6J update Readme and settle on a project name
  • [32] ASP5RVZA Merge lines.love
  • [33] CZRMAMSB clearer discription of how to run lines.love
  • [34] 3DRVHB7C run script on startup; new button to switch to source editor
  • [35] XQZO4DUY Merge text0
  • [36] RJPNFXVQ new fork: a personal dashboard for mobile devices
  • [37] 25V2GA6J taking stock
  • [38] HCJNNXOU resolve conflicts
  • [39] 2NQZJUPT start saving edits right in the source dir
  • [40] 2DVVKKVA flesh out Readme
  • [41] EZHO4TSW new file-system format for freewheeling apps
  • [42] EQSFHYF3 slightly standardize on app-specific stuff
  • [43] ADBLR7B4 new mirror
  • [44] VVGWHJBZ fix app identity so successive versions share data
  • [45] ZT6T2H7N update known issues
  • [46] DEFJUKUV adjust font sizes in response to zoom changes
  • [47] OIKT7FME Merge lines.love
  • [48] 5OVKHVY6 nice way to make on.* handlers more discoverable
  • [49] FS2ITYYH record a known issue
  • [50] BPYWIU62 new fork: template for live programming with editor widgets
  • [51] KQWIMWJ5 deemphasize the terminal in Readme
  • [52] DF7NOKAN correct a characterization
  • [53] NCW64JJD experiment: convert to Pijul
  • [54] YJ6ASFBG yet another fork trying to integrate my live framework with everything else
  • [55] TC47I2JR Merge lines.love
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • file deletion: widgets (----------)
    [10.1][10.457:488](),[10.488][10.22:22]()
    widgets = {}
    -- button to add a text box
    table.insert(widgets, {
    draw = function()
    color(0, 0.6,0.6)
    rect('line', Safe_width-115, 5, 30,30, 5)
    line(Safe_width-110, 20, Safe_width-90, 20)
    line(Safe_width-100, 10, Safe_width-100, 30)
    end,
    ispress = function(x2,y2)
    return x2 >= Safe_width-120 and x2 <= Safe_width-85 and y2 <= 40
    end,
    press = add_editor,
    })
    -- button to stop the app and return to the source editor
    table.insert(widgets, {
    draw = function()
    color(0, 0.6,0.6)
    g.setFont(Font)
    local s = App.width('exit')
    rect('line', Safe_width-s-15, 75, s+10,30, 5)
    g.print('exit', Safe_width-s-10, 80)
    end,
    ispress = function(x2,y2)
    g.setFont(Font)
    local s = App.width('exit')
    return x2 >= Safe_width-s-15 and y2 >= 75 and y2 <= 105
    end,
    press = stop_app,
    })
  • edit in screens/main at line 1
    [10.6482][10.6483:6527]()
    -- top-level handlers for dash's event loop
  • edit in screens/main at line 7
    [10.6808]
    [10.6808]
    ui_state = {} -- for buttons; recreated each frame
    widgets = {} -- more versatile UI elements
  • replacement in screens/main at line 11
    [10.6828][10.1448:1710]()
    color(0, 0.6,0.6)
    line(Safe_width-120, 0, Safe_width-120, 40)
    g.setFont(Font)
    local s = App.width('exit')
    line(Safe_width-120, 40, Safe_width-s-20, 40)
    line(Safe_width-s-20, 40, Safe_width-s-20, 110)
    line(Safe_width-s-20, 110, Safe_width+100, 110)
    [10.6828]
    [10.6828]
    ui_state.button_handlers = {}
  • edit in screens/main at line 26
    [10.7088]
    [10.7088]
    if mouse_press_consumed_by_any_button(ui_state, x,y, b) then
    skip_touch = true
    return
    end
  • replacement in screens/main at line 80
    [10.8152][10.8152:8188]()
    function car.mouse_release(x,y, b)
    [10.8152]
    [10.8188]
    function car.mouse_release(x,y, b)
  • edit in screens/hud at line 2
    [10.8758]
    [10.8758]
    local stop_app_label = 'edit'
    button(ui_state, stop_app_label, {x=5, y=Safe_height-10-Line_height-10,
    w=5+App.width(stop_app_label)+5, h=5+Line_height+5,
    bg=Menu_background,
    icon = function(p)
    App.color(Normal_color)
    rect('line', p.x,p.y, p.w,p.h)
    g.print(stop_app_label, p.x+5, p.y+5)
    end,
    onpress1 = stop_app,
    })
  • replacement in screens/hud at line 14
    [10.8781][10.8781:8906]()
    for _,touch in ipairs(touches()) do
    if curr[touch] then
    circle('fill', curr[touch].x, curr[touch].y, 10)
    end
    [10.8781]
    [10.8906]
    for _,touch_id in ipairs(touches()) do
    local x,y = touch(touch_id)
    circle('fill', x,y, 10)
  • replacement in main.lua at line 58
    [10.102][7.0:31]()
    love.window.setTitle('Dash')
    [10.102]
    [10.7]
    -- setTitle moved to conf.lua
  • replacement in conf.lua at line 2
    [10.24][8.103:126]()
    t.identity = 'dash2'
    [10.24]
    [10.50]
    t.identity = 'TODO'
    t.window.title = 'TODO'
  • replacement in README.md at line 1
    [10.6][10.22:37]()
    # Lua Carousel
    [10.6]
    [5.97639]
    # A template repo for developing cross-platform apps on mobile devices
  • replacement in README.md at line 5
    [10.11635][10.38:347]()
    A lightweight environment for writing small, throwaway
    [Lua](https://www.lua.org) and [LÖVE](https://love2d.org) programs. Tested on
    Windows, Mac, Linux, iOS and Android. The environment itself can be modified
    as it runs. In early release; please report issues, particularly with
    usability or accessibility.
    [10.11635]
    [10.18]
    Copy this repo to get a leg up creating tiny, low-maintenance, cross-platform
    apps that you can make changes to right on a phone or tablet.
    It comes bundled with a few optional goodies:
    * Support for tap-to-pan and pinch-to-zoom gestures over an infinite 2D
    surface for arbitrary graphics and UI.
    * A tiny widget library for quickly creating arbitrary UI elements.
    [Here's an example of the kinds of things you can add to the global variable `widgets`.](https://akkartik.itch.io/carousel/devlog/665231/a-sprite-editor-in-100-lines-of-code)
    * A typographic scale for scaling the font size of text in visually pleasing
    increments.
    Tap the 'edit' button and then poke around the 'load' menu to learn more.
  • edit in README.md at line 29
    [10.2864]
    [10.222]
    You can edit the app and UI right on your device.
  • replacement in README.md at line 32
    [10.223][2.19:96](),[2.96][10.95:168](),[10.813746][10.95:168](),[10.168][10.813821:813848](),[10.813821][10.813821:813848]()
    To modify it live without restarting the app each time, download [the driver
    app](https://git.sr.ht/~akkartik/driver.love). Here's an example session
    using a fork of this repo:
    [10.223]
    [3.19]
    You can also modify the editing environment itself, or repurpose it for a
    different app entirely, live as it runs. This requires running it on a
    computer. Download [the driver app](https://git.sr.ht/~akkartik/driver.love).
    Here's an example session showing the driver (left window) editing a different
    app (right window containing yellow text):
  • edit in README.md at line 39
    [10.813908][10.2865:2866](),[10.2866][10.348:388]()
    (Only on non-mobile platforms for now.)
  • edit in README.md at line 77
    [10.169][4.22:102]()
    ## Contributors
    Many thanks to Mike Stein for code, feedback and suggestions.
  • replacement in README.md at line 82
    [10.166][10.495:674]()
    Its immediate upstream is [the template repo for freewheeling apps](https://git.sr.ht/~akkartik/template-live-editor).
    Updates to it can be downloaded from the following mirrors:
    [10.166]
    [9.26]
    Its immediate upstream is [Lua Carousel, a lightweight cross-platform
    environment for creating little throwaway scripts on a computer or
    phone](https://git.sr.ht/~akkartik/carousel.love). Updates to it can be
    downloaded from the following mirrors:
  • replacement in README.md at line 87
    [10.1529][10.675:719](),[10.719][10.25:71](),[10.71][9.27:80](),[10.71][10.719:808](),[9.80][10.719:808](),[10.719][10.719:808]()
    * https://git.sr.ht/~akkartik/carousel.love
    * https://tildegit.org/akkartik/carousel.love
    * https://git.merveilles.town/akkartik/carousel.love
    * https://nest.pijul.com/akkartik/carousel.love (using the Pijul version control system)
    [10.1529]
    [10.1609]
    * https://git.sr.ht/~akkartik/template-carousel-mobile
    * https://tildegit.org/akkartik/template-carousel-mobile
    * https://git.merveilles.town/akkartik/template-carousel-mobile
    * https://nest.pijul.com/akkartik/template-carousel-mobile (using the Pijul version control system)