Add JUI::Window:LayoutControls Left & Right
This commit is contained in:
@@ -74,6 +74,12 @@ namespace JUI
|
||||
|
||||
void SetDockable(bool value);
|
||||
|
||||
/// Align topbar buttons to the left.
|
||||
void LayoutControlsLeft();
|
||||
|
||||
/// Align topbar buttons to the right.
|
||||
void LayoutControlsRight();
|
||||
|
||||
/// Returns whether resizing the window via right-click is enabled.
|
||||
/// @see class Resizable
|
||||
bool IsResizable() const;
|
||||
|
@@ -54,6 +54,7 @@ namespace JUI
|
||||
//exit_btn->AnchorPoint({1.f, 0.f});
|
||||
//exit_btn->Size({30_px, 100_percent});
|
||||
exit_btn->Size({titlebar_height, titlebar_height, 0, 0});
|
||||
|
||||
//exit_btn->BorderColor({128, 128, 128, 255});
|
||||
//exit_btn->SetBaseColor({192, 64, 64, 255});
|
||||
//exit_btn->SetHoverColor({255, 0, 0, 255});
|
||||
@@ -222,4 +223,14 @@ namespace JUI
|
||||
TextButton *Window::GetExitButtonInstance() {
|
||||
return exit_btn;
|
||||
}
|
||||
|
||||
void Window::LayoutControlsLeft() {
|
||||
exit_btn->AnchorPoint({0.f, 0.f});
|
||||
exit_btn->Position({0_px, 0_px});
|
||||
}
|
||||
|
||||
void Window::LayoutControlsRight() {
|
||||
exit_btn->AnchorPoint({1.f, 0.f});
|
||||
exit_btn->Position({100_percent, 0_px});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user