From 2b7f37251e0bb0fe1454ae90b42496f7d86f2541 Mon Sep 17 00:00:00 2001 From: Patrick Jakobsen Date: Tue, 26 Sep 2023 10:50:59 +0200 Subject: [PATCH] Added warning about using compupted_size wrong --- gui/gui.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/gui.c b/gui/gui.c index e026bf1..55fc719 100644 --- a/gui/gui.c +++ b/gui/gui.c @@ -143,6 +143,11 @@ typedef struct GUI_Node { // True iff. it (and its children) should generate draw commands. bool dirty; + // NOTE(Zelaven): Don't make decisions about visual things based on this. + // It will be a frame off, and with dirty-redrawing it will result in the + // error persisting on the screen. + // All sizing and positioning should be done using semantic sizes and + // offsets, and should be handled in offline layouting and positioning. int computed_size[GUI_AXIS2_COUNT]; GUI_Rectangle rect; // NOTE(Zelaven): I have no better name for this. } GUI_Node;