Skip to content

Unified GUI? #11

Description

@Toma400

While the idea of DecorUI and RawUI (or whatever it is called) separation is nice, looking at how other libs do the GUI thingie makes me think that it could be beneficial to do just one UI item that has overwrite'able field.
On example:

type
  Button = object
    other_data : string
    image* : Image # defaults to Rect

proc
  newButton* (): Button =
    result.other_data = ""
    result.image = newRect() # defaults to `simpleUI` rect, _but can be overwritten_ by any Image

Obviously this kinda makes it harder to do custom things like e.g. colouring the Rect, but this could be solved by multiple procs with different arguments.
Nimfire ofc has now converters, but imo this simplifies the process more and keeps it better standard code-wise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code improvementSuggestion for code changes that may enhance library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions