Add Window::HideTitlebar and ShowTitlebar

This commit is contained in:
2025-06-24 02:51:20 -05:00
parent f229698971
commit b80fa9cd94

View File

@@ -55,6 +55,19 @@ namespace JUI {
// TODO: Decide if this will auto-scale with the titlebar's text height, or the other way around.
[[nodiscard]] int TitlebarHeight() const;
void HideTitlebar() {
titlebar_hidden = true;
Topbar->Visible(false);
}
void ShowTitlebar() {
titlebar_hidden = false;
Topbar->Visible(true);
}
/// @return True if this window widget is on-top of all other window-widgets with the same parent.
bool OnTop() const;
@@ -187,6 +200,7 @@ namespace JUI {
bool open = false;
//bool resizing = false;
bool draggable = true;
bool titlebar_hidden = false;
bool dockable = false;
int titlebar_height = Style::Window::TitlebarHeight;
int title_font_size = 16;