Skip to content

Support button icons in draw_text() #29

Description

@SuperFromND

Right now, we can only draw literal text using draw_text(), and even then only a specific subset of characters:

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

I think it'd be very neat, at least for Tutorial mode (and possibly the Options menu for rebinding buttons) to have some way of drawing button icons as well. There's only twelve, so making art for them wouldn't be hard:

enum controller_buttons {
    NONE, // represents a lack of input, no graphic needed
    UP,
    DOWN,
    LEFT,
    RIGHT,
    CROSS,
    CIRCLE,
    SQUARE,
    TRIANGLE,
    LB,
    RB,
    START,
    SELECT,
};

The tricky parts would be:

  • Do we append these buttons to the existing font.png?
  • How do we make draw_text() allow these buttons to be drawn? C-style %U codes? And how do we deal with scaling it since these are unlikely to be the same size as the monospace font we currently use?
  • Should it be given its own toggle so that level metadata can't use it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions