Skip to content

Instantly share code, notes, and snippets.

View nikodemus's full-sized avatar
🚀
ssh! it's a secret! foolang.org

Nikodemus Siivola nikodemus

🚀
ssh! it's a secret! foolang.org
View GitHub Profile

Source code: https://github.com/MrSmith33/voxelman/blob/master/source/voxelman/gui

Core widget components (https://github.com/MrSmith33/voxelman/blob/master/source/voxelman/gui/components.d):

  • WidgetTransform - main component of any widget. Stores parent reference, relative position, absolute position, size, min size, measured size, and extra flags
  • WidgetStyle - color and border color
  • WidgetName - string of widget name
  • WidgetType - string of widget type (for debugging)
  • WidgetContainer - children widgets
  • WidgetIsFocusable - if set becomes focusedWidget on pointer press. focusedWidget will receive key and char events.
  • WidgetEvents - stores handlers for any event for the widget. Typical events: