Skip to content

Instantly share code, notes, and snippets.

Introduction

In this blog post I want to talk about a concept in my GUI architecture essential to reactive layouting. More specifically, I want to talk about how my code currently fails to implement the concept correctly. Afterwards, I'll talk about how I can solve this, and perhaps even speed up the code architecure at the same time.

But first, here's some terminology to keep in mind while reading.

Widget

Essentially any GUI element that takes up some portion of the screen, and is able to accept some combination of events. Examples include buttons, text, images.

@Didgy74
Didgy74 / GUI Blogpost 1 draft.md
Last active September 29, 2021 14:46
Didgy's GUI blog todo (WIP)

Didgy's frustrating GUI adventures

Introduction

This project started when I encountered a problem when working on my other project, DEngine. DEngine is a lightweight game engine oriented towards mobile 2D games. A main component of this engine is to have a level editor you could run directly on your tablet, do your level design, and playtest your level instantly from your tablet device. This level editor also had to work on Windows and Linux. With this functionality in mind I started testing several GUI libraries and frameworks, but these existing solutions all came short for exactly what I had in mind. After trying out libraries for over a month, I decided to roll my own solution.

I might compile a list of GUI libraries I tried out with a list of their pros and cons in another blog post.

Before I go on any further, I want to clarify that for the vast majority of hobby developers like myself, rolling your own GUI solution is not worth the effort and I do not recommend you do so.

This GUI proj