• 3.1.0 11037c0999

    3.1.0 Stable

    abart27 released this 2026-03-18 17:43:30 +00:00 | 18 commits to main since this release

    Summary

    This release adds the label control, clipboard support, better keyboard input handling, and click-drag support for the scrollbar, along with fixing some bugs.

    Adoption

    Clipboard support

    Clipboard support requires providing a clipboard API surface.

    If you're using the Mupen64 Lua API, you can do that as follows:

     ---@module "ugui-amalgamated"
     ugui = dofile('ugui-amalgamated.lua')
    
    +ugui.STATIC_ENV = {
    +    clipboard = {
    +        get = function()
    +            return clipboard.get('text')
    +        end,
    +        set = function(text)
    +            clipboard.set('text', text)
    +        end,
    +    },
    +}
    

    Breaking Changes

    Removed Environment::held_keys

    The mechanism for passing keyboard info to ugui via held_keys has been
    removed.

    Provide a list of key events instead.

    If you're using the Mupen64 Lua API, this is how your code would change:

    -emu.atdrawd2d(function()
    -    local keys = input.get()
    -    ugui.begin_frame({
    -        held_keys = keys,
    -        ...
    -    })
    -    ugui.end_frame()
    -end)
    
    +local key_events = {}
    +
    +emu.atdrawd2d(function()
    +    ugui.begin_frame({
    +        key_events = key_events,
    +        ...
    +    })
    +    ugui.end_frame()
    +    key_events = {}
    +end)
    +
    +emu.atkey(function(args)
    +    key_events[#key_events + 1] = args
    +end)
    

    Features

    • Label Add label control (#60)
    • Clipboard support (#61)
    • ScrollBar Click-drag support (#54)
    • [breaking] Event queue-based keyboard input handling (#51)

    🐞 Bugfixes

    • NumberBox Broken primary return value (#47)
    • TabControl Broken selected_index diffing (#46)
    • CarrouselButton Broken meta return value (#45)
    Downloads