Added warning about using compupted_size wrong

This commit is contained in:
Patrick Jakobsen committed 2023-09-26 10:50:59 +02:00
1 parent 212136a35a
commit 2b7f37251e
1 file changed
+5
+5
View File
@@ -143,6 +143,11 @@ typedef struct GUI_Node {
// True iff. it (and its children) should generate draw commands. // True iff. it (and its children) should generate draw commands.
bool dirty; 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]; int computed_size[GUI_AXIS2_COUNT];
GUI_Rectangle rect; // NOTE(Zelaven): I have no better name for this. GUI_Rectangle rect; // NOTE(Zelaven): I have no better name for this.
} GUI_Node; } GUI_Node;