Browse Source

Added warning about using compupted_size wrong

master
Patrick Jakobsen 2 years ago
parent
commit
2b7f37251e
  1. 5
      gui/gui.c

5
gui/gui.c

@ -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;

Loading…
Cancel
Save