Advertisement
Tkap1

Untitled

Aug 25th, 2022
1,381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1.  
  2. static constexpr default_font_size = 48;
  3.  
  4. struct s_ui_options
  5. {
  6.     int font_id = MY_FONT_0;
  7.     int font_size = default_font_size;
  8.     s_vec4 color;
  9. };
  10.  
  11.  
  12. static bool ui_button(s_v2 pos, s_ui_options options = {})
  13. {
  14.     int font_size;
  15.     if(options.font_size != default_font_size)
  16.     {
  17.         font_size = options.font_size;
  18.     }
  19.     else
  20.     {
  21.         font_size = // get last pushed font size
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement