Skip to content

Feature Request: Allow Text-Based Components to Accept bimg Content #17

@HKXingluo

Description

@HKXingluo

Feature Request: Allow Text-Based Components to Accept bimg/Image Content

Background

Basalt already has an Image element with native bimg support:

https://basalt.madefor.cc/references/elements/Image.html

This means the rendering pipeline already supports bitmap/image rendering very well.

However, most UI components are still strictly text-based internally, such as:

  • Button
  • Label
  • Checkbox
  • Radio
  • Navbar
  • Menu
  • List
  • Tabs
  • Dropdowns

Currently these components assume their content is always a plain string.


Proposal

Allow text-bearing UI components to optionally render:

  • bimg
  • image buffers
  • custom renderable image objects

instead of only plain text strings.

For example:

button:setText("OK")

could additionally support:

button:setImage(myBimg)

or:

button:setContent(myBimg)

Why This Would Be Extremely Useful

This would enable many advanced UI features with minimal engine changes.

UTF-8

ComputerCraft terminals do not natively support UTF-8 rendering well.

Using bitmap fonts rendered as bimg would allow:

  • Chinese
  • Japanese
  • Korean
  • Unicode glyphs

without modifying the terminal itself.


Icon Support

Buttons, menus, tabs, and navigation bars could display:

  • icons
  • pixel art
  • custom glyphs
  • icon packs

instead of being limited to terminal text.


Better Theming

This would allow:

  • pixel-perfect UI themes
  • custom checkbox graphics
  • graphical radio buttons
  • styled navigation bars
  • bitmap-based fonts

while still using Basalt's existing layout/event systems.


Important Clarification

This request is NOT mainly about adding UTF-8 support directly.

The main goal is:

Allowing text-oriented components to render image/bimg content instead of only strings.

UTF-8 rendering is simply one powerful use case enabled by this.


Components That Would Benefit

Including but not limited to:

  • Button
  • Label
  • Checkbox
  • Radio
  • Navbar
  • Menu
  • Tabs
  • Dropdown
  • List items

Final Thoughts

This would significantly improve:

  • internationalization
  • icon support
  • UI customization
  • bitmap font rendering
  • modern UI design possibilities

without abandoning Basalt's existing architecture.

Thanks for considering this feature request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions