Skip to content

Commit

Permalink
Rename Window --> Panel for immediate-mode panels
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Feb 13, 2025
1 parent cc86688 commit fdc9fcf
Show file tree
Hide file tree
Showing 32 changed files with 107 additions and 107 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ namespace
OpenSim::ComponentPath componentPath_,
std::optional<ModelViewerPanelRightClickEvent> maybeSourceVisualizerEvent_ = std::nullopt) :

StandardPopup{popupName_, {10.0f, 10.0f}, ui::WindowFlag::NoMove},
StandardPopup{popupName_, {10.0f, 10.0f}, ui::PanelFlag::NoMove},
m_PanelManager{std::move(panelManager_)},
m_Model{std::move(model_)},
m_ComponentPath{std::move(componentPath_)},
Expand Down
4 changes: 2 additions & 2 deletions libopensimcreator/UI/LoadingTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ class osc::LoadingTab::Impl final : public TabPrivate {
}

if (m_LoadingErrorMsg.empty()) {
if (ui::begin_panel("Loading Message", nullptr, ui::WindowFlag::NoTitleBar)) {
if (ui::begin_panel("Loading Message", nullptr, ui::PanelFlag::NoTitleBar)) {
ui::draw_text("loading: %s", m_OsimPath.string().c_str());
ui::draw_progress_bar(m_LoadingProgress);
}
ui::end_panel();
}
else {
if (ui::begin_panel("Error Message", nullptr, ui::WindowFlag::NoTitleBar)) {
if (ui::begin_panel("Error Message", nullptr, ui::PanelFlag::NoTitleBar)) {
ui::draw_text_wrapped("An error occurred while loading the file:");
ui::draw_dummy({0.0f, 5.0f});
ui::draw_text_wrapped(m_LoadingErrorMsg);
Expand Down
16 changes: 8 additions & 8 deletions libopensimcreator/UI/MeshImporter/MeshImporterTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class osc::mi::MeshImporterTab::Impl final :
if (m_Shared->isPanelEnabled(MeshImporterSharedState::PanelIndex::Log))
{
bool v = true;
if (ui::begin_panel("Log", &v, ui::WindowFlag::MenuBar))
if (ui::begin_panel("Log", &v, ui::PanelFlag::MenuBar))
{
m_Shared->updLogViewer().on_draw();
}
Expand Down Expand Up @@ -2360,13 +2360,13 @@ class osc::mi::MeshImporterTab::Impl final :
ui::open_popup("##visualizermodalpopup");
ui::set_next_panel_size(m_Shared->get3DSceneDims());
ui::set_next_panel_pos(m_Shared->get3DSceneRect().p1);
ui::push_style_var(ui::StyleVar::WindowPadding, {0.0f, 0.0f});
ui::push_style_var(ui::StyleVar::PanelPadding, {0.0f, 0.0f});

const ui::WindowFlags modalFlags = {
ui::WindowFlag::AlwaysAutoResize,
ui::WindowFlag::NoTitleBar,
ui::WindowFlag::NoMove,
ui::WindowFlag::NoResize,
const ui::PanelFlags modalFlags = {
ui::PanelFlag::AlwaysAutoResize,
ui::PanelFlag::NoTitleBar,
ui::PanelFlag::NoMove,
ui::PanelFlag::NoResize,
};

if (ui::begin_popup_modal("##visualizermodalpopup", nullptr, modalFlags))
Expand All @@ -2382,7 +2382,7 @@ class osc::mi::MeshImporterTab::Impl final :
}
else
{
ui::push_style_var(ui::StyleVar::WindowPadding, {0.0f, 0.0f});
ui::push_style_var(ui::StyleVar::PanelPadding, {0.0f, 0.0f});
if (ui::begin_panel("wizard_3dViewer"))
{
ui::pop_style_var();
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/MeshWarper/MeshWarpingTabPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace osc
private:
void impl_before_imgui_begin() final
{
ui::push_style_var(ui::StyleVar::WindowPadding, {0.0f, 0.0f});
ui::push_style_var(ui::StyleVar::PanelPadding, {0.0f, 0.0f});
}

void impl_after_imgui_begin() final
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/MeshWarper/MeshWarpingTabToolbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class osc::MeshWarpingTabToolbar::Impl final {
if (ui::draw_button("visualization options " OSC_ICON_COG)) {
ui::open_popup("visualization_options_popup");
}
if (ui::begin_popup("visualization_options_popup", {ui::WindowFlag::AlwaysAutoResize, ui::WindowFlag::NoTitleBar, ui::WindowFlag::NoSavedSettings})) {
if (ui::begin_popup("visualization_options_popup", {ui::PanelFlag::AlwaysAutoResize, ui::PanelFlag::NoTitleBar, ui::PanelFlag::NoSavedSettings})) {
DrawRenderingOptionsEditor(m_State->updCustomRenderingOptions());
DrawOverlayOptionsEditor(m_State->updOverlayDecorationOptions());
{
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/ModelEditor/AddBodyPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class osc::AddBodyPopup::Impl final : public StandardPopup {
ui::draw_help_marker("What the added body will be joined to. All bodies in an OpenSim model are connected to other bodies, or the ground, by joints. This is true even if the joint is unconstrained and does nothing (e.g. an OpenSim::FreeJoint) or if the joint constrains motion in all direcctions (e.g. an OpenSim::WeldJoint).");
ui::next_column();

ui::begin_child_panel("join targets", Vec2{0, 128.0f}, ui::ChildPanelFlag::Border, ui::WindowFlag::HorizontalScrollbar);
ui::begin_child_panel("join targets", Vec2{0, 128.0f}, ui::ChildPanelFlag::Border, ui::PanelFlag::HorizontalScrollbar);
for (const auto& pf : model.getComponentList<OpenSim::PhysicalFrame>()) {
if (ui::draw_selectable(pf.getName(), &pf == selectedPf)) {
selectedPf = &pf;
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/ModelEditor/Select1PFPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class osc::Select1PFPopup::Impl final : public StandardPopup {
{
const OpenSim::PhysicalFrame* selected = nullptr;

ui::begin_child_panel("pflist", Vec2{256.0f, 256.0f}, ui::ChildPanelFlag::Border, ui::WindowFlag::HorizontalScrollbar);
ui::begin_child_panel("pflist", Vec2{256.0f, 256.0f}, ui::ChildPanelFlag::Border, ui::PanelFlag::HorizontalScrollbar);
for (const auto& pf : m_Model->getModel().getComponentList<OpenSim::PhysicalFrame>()) {
if (ui::draw_selectable(pf.getName())) {
selected = &pf;
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/ModelEditor/SelectComponentPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class osc::SelectComponentPopup::Impl final : public StandardPopup {

// iterate through each T in `root` and give the user the option to click it
{
ui::begin_child_panel("first", Vec2{256.0f, 256.0f}, ui::ChildPanelFlag::Border, ui::WindowFlag::HorizontalScrollbar);
ui::begin_child_panel("first", Vec2{256.0f, 256.0f}, ui::ChildPanelFlag::Border, ui::PanelFlag::HorizontalScrollbar);
for (const OpenSim::Component& c : m_Model->getModel().getComponentList())
{
if (!m_Filter(c))
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/ModelEditor/SelectGeometryPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class osc::SelectGeometryPopup::Impl final : public StandardPopup {
"mesh list",
Vec2{ui::get_content_region_available().x, 256},
ui::ChildPanelFlags{},
ui::WindowFlag::HorizontalScrollbar);
ui::PanelFlag::HorizontalScrollbar);

if (!m_RecentUserChoices.empty())
{
Expand Down
4 changes: 2 additions & 2 deletions libopensimcreator/UI/Shared/BasicWidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1304,11 +1304,11 @@ bool osc::BeginToolbar(CStringView label, std::optional<Vec2> padding)
{
if (padding)
{
ui::push_style_var(ui::StyleVar::WindowPadding, *padding);
ui::push_style_var(ui::StyleVar::PanelPadding, *padding);
}

const float height = ui::get_frame_height() + 2.0f*ui::get_style_panel_padding().y;
const ui::WindowFlags flags = {ui::WindowFlag::NoScrollbar, ui::WindowFlag::NoSavedSettings};
const ui::PanelFlags flags = {ui::PanelFlag::NoScrollbar, ui::PanelFlag::NoSavedSettings};
bool open = ui::begin_main_viewport_top_bar(label, height, flags);
if (padding)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class osc::ChooseComponentsEditorLayer::Impl final {
ModelViewerPanelParameters& panelParams,
ModelViewerPanelState& panelState)
{
const bool layerIsHovered = ui::is_panel_hovered(ui::HoveredFlag::RootAndChildWindows);
const bool layerIsHovered = ui::is_panel_hovered(ui::HoveredFlag::RootAndChildPanels);

// update this layer's state from provided state
m_State.renderParams = panelParams.getRenderParams();
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/Shared/ComponentContextMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ class osc::ComponentContextMenu::Impl final : public StandardPopup {
OpenSim::ComponentPath path_,
ComponentContextMenuFlags flags_) :

StandardPopup{popupName_, {10.0f, 10.0f}, ui::WindowFlag::NoMove},
StandardPopup{popupName_, {10.0f, 10.0f}, ui::PanelFlag::NoMove},
m_Parent{parent_.weak_ref()},
m_Model{std::move(model_)},
m_Path{std::move(path_)},
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/Shared/FunctionCurveViewerPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class osc::FunctionCurveViewerPanel::Impl final : public PanelPrivate {
std::shared_ptr<const IVersionedComponentAccessor> targetComponent,
std::function<const OpenSim::Function*()> functionGetter) :

PanelPrivate{owner, nullptr, popupName, ui::WindowFlag::AlwaysAutoResize},
PanelPrivate{owner, nullptr, popupName, ui::PanelFlag::AlwaysAutoResize},
m_Component{std::move(targetComponent)},
m_FunctionGetter{std::move(functionGetter)}
{}
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/Shared/GeometryPathEditorPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class osc::GeometryPathEditorPopup::Impl final : public StandardPopup {
std::function<const OpenSim::GeometryPath*()> geometryPathGetter_,
std::function<void(const OpenSim::GeometryPath&)> onLocalCopyEdited_) :

StandardPopup{popupName_, {768.0f, 0.0f}, ui::WindowFlag::AlwaysAutoResize},
StandardPopup{popupName_, {768.0f, 0.0f}, ui::PanelFlag::AlwaysAutoResize},
m_TargetComponent{std::move(targetComponent_)},
m_GeometryPathGetter{std::move(geometryPathGetter_)},
m_OnLocalCopyEdited{std::move(onLocalCopyEdited_)},
Expand Down
10 changes: 5 additions & 5 deletions libopensimcreator/UI/Shared/ModelViewerPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class osc::ModelViewerPanel::Impl final : public PanelPrivate {
// check if the window is conditionally hovered: this returns true if no other window is
// overlapping the editor panel, _but_ it also returns true if the user is only hovering
// the title bar of the window, rather than specifically the render
const bool windowHovered = ui::is_panel_hovered(ui::HoveredFlag::ChildWindows);
const bool windowHovered = ui::is_panel_hovered(ui::HoveredFlag::ChildPanels);

// check if the 3D render is hovered - ignore blocking and overlapping because the layer
// stack might be screwing with this
Expand Down Expand Up @@ -525,16 +525,16 @@ class osc::ModelViewerPanel::Impl final : public PanelPrivate {
{
ModelViewerPanelLayer& layer = **it;

ui::WindowFlags windowFlags = ui::get_minimal_panel_flags().without(ui::WindowFlag::NoInputs);
ui::PanelFlags windowFlags = ui::get_minimal_panel_flags().without(ui::PanelFlag::NoInputs);

// if any layer above this one captures mouse inputs then disable this layer's inputs
if (find_if(it+1, m_Layers.end(), [](const auto& layerPtr) -> bool { return layerPtr->getFlags() & ModelViewerPanelLayerFlags::CapturesMouseInputs; }) != m_Layers.end())
{
windowFlags |= ui::WindowFlag::NoInputs;
windowFlags |= ui::PanelFlag::NoInputs;
}

// layers always have a background (although, it can be entirely invisible)
windowFlags = windowFlags.without(ui::WindowFlag::NoBackground);
windowFlags = windowFlags.without(ui::PanelFlag::NoBackground);
ui::set_next_panel_bg_alpha(layer.getBackgroundAlpha());

// draw the layer in a child window, so that ImGui understands that hittests
Expand Down Expand Up @@ -592,5 +592,5 @@ const PolarPerspectiveCamera& osc::ModelViewerPanel::getCamera() const { return
void osc::ModelViewerPanel::setCamera(const PolarPerspectiveCamera& camera) { private_data().setCamera(camera); }
void osc::ModelViewerPanel::setModelState(const std::shared_ptr<IModelStatePair>& newModelState) { private_data().setModelState(newModelState); }
void osc::ModelViewerPanel::impl_draw_content() { private_data().draw_content(); }
void osc::ModelViewerPanel::impl_before_imgui_begin() { ui::push_style_var(ui::StyleVar::WindowPadding, {0.0f, 0.0f}); }
void osc::ModelViewerPanel::impl_before_imgui_begin() { ui::push_style_var(ui::StyleVar::PanelPadding, {0.0f, 0.0f}); }
void osc::ModelViewerPanel::impl_after_imgui_begin() { ui::pop_style_var(); }
4 changes: 2 additions & 2 deletions libopensimcreator/UI/Shared/NavigatorPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class osc::NavigatorPanel::Impl final : public PanelPrivate {
"##componentnavigatorvieweritems",
Vec2{0.0, 0.0},
ui::ChildPanelFlags{},
ui::WindowFlag::NoBackground
ui::PanelFlag::NoBackground
);

ui::draw_dummy({0.0f, 0.05f*ui::get_text_line_height()});
Expand Down Expand Up @@ -241,7 +241,7 @@ class osc::NavigatorPanel::Impl final : public PanelPrivate {
const auto offset = ui::get_cursor_screen_pos() - ui::get_cursor_pos();
const auto topLeft = Vec2{0.0f, ui::get_cursor_pos().y};
const auto bottomRight = topLeft + Vec2{ui::get_panel_size().x, ui::get_text_line_height_with_spacing()};
ui::get_panel_draw_list().add_rect_filled({offset+topLeft, offset+bottomRight}, multiply_luminance(ui::get_color(ui::ColorVar::WindowBg), 1.2f));
ui::get_panel_draw_list().add_rect_filled({offset+topLeft, offset+bottomRight}, multiply_luminance(ui::get_color(ui::ColorVar::PanelBg), 1.2f));
}

// handle coloring
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/Shared/ParamBlockEditorPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class osc::ParamBlockEditorPopup::Impl final : public StandardPopup {
public:

Impl(std::string_view popupName, ParamBlock* paramBlock) :
StandardPopup{popupName, {512.0f, 0.0f}, ui::WindowFlag::AlwaysAutoResize},
StandardPopup{popupName, {512.0f, 0.0f}, ui::PanelFlag::AlwaysAutoResize},
m_OutputTarget{paramBlock},
m_LocalCopy{*m_OutputTarget}
{}
Expand Down
4 changes: 2 additions & 2 deletions libopensimcreator/UI/SplashTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class osc::SplashTab::Impl final : public TabPrivate {
ui::set_next_panel_pos(viewportUIRect.p1);
ui::set_next_panel_size(dimensions_of(viewportUIRect));

ui::push_style_var(ui::StyleVar::WindowPadding, { 0.0f, 0.0f });
ui::push_style_var(ui::StyleVar::PanelPadding, { 0.0f, 0.0f });
ui::begin_panel("##splashscreenbackground", nullptr, ui::get_minimal_panel_flags());
ui::pop_style_var();

Expand Down Expand Up @@ -229,7 +229,7 @@ class osc::SplashTab::Impl final : public TabPrivate {
ui::set_next_panel_size({dims.x, -1.0f});
ui::set_next_panel_size_constraints(dims, dims);

if (ui::begin_panel("Splash screen", nullptr, ui::WindowFlag::NoTitleBar)) {
if (ui::begin_panel("Splash screen", nullptr, ui::PanelFlag::NoTitleBar)) {
drawMenuContent();
}
ui::end_panel();
Expand Down
2 changes: 1 addition & 1 deletion libopensimcreator/UI/TPS2DTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class osc::TPS2DTab::Impl final : public TabPrivate {
const float panelHeight = 50.0f;
ui::set_next_panel_pos({ outputWindowPos.x + leftPadding, outputWindowPos.y + outputWindowDims.y - panelHeight - bottomPadding });
ui::set_next_panel_size({ outputWindowDims.x - leftPadding, panelHeight });
ui::begin_panel("##scrubber", nullptr, ui::get_minimal_panel_flags().without(ui::WindowFlag::NoInputs));
ui::begin_panel("##scrubber", nullptr, ui::get_minimal_panel_flags().without(ui::PanelFlag::NoInputs));
ui::set_next_item_width(ui::get_content_region_available().x);
ui::draw_float_slider("##blend", &m_BlendingFactor, 0.0f, 1.0f);
ui::end_panel();
Expand Down
2 changes: 1 addition & 1 deletion liboscar/UI/Panels/LogViewerPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class osc::LogViewerPanel::Impl final : public PanelPrivate {
public:

explicit Impl(LogViewerPanel& owner, std::string_view panel_name) :
PanelPrivate{owner, nullptr, panel_name, ui::WindowFlag::MenuBar}
PanelPrivate{owner, nullptr, panel_name, ui::PanelFlag::MenuBar}
{}

void draw_content() { log_viewer_.on_draw(); }
Expand Down
4 changes: 2 additions & 2 deletions liboscar/UI/Panels/Panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
osc::Panel::Panel() :
Panel{std::make_unique<PanelPrivate>(*this)}
{}
osc::Panel::Panel(Widget* parent, std::string_view panel_name, ui::WindowFlags window_flags) :
Panel{std::make_unique<PanelPrivate>(*this, parent, panel_name, window_flags)}
osc::Panel::Panel(Widget* parent, std::string_view panel_name, ui::PanelFlags panel_flags) :
Panel{std::make_unique<PanelPrivate>(*this, parent, panel_name, panel_flags)}
{}
osc::Panel::Panel(std::unique_ptr<PanelPrivate>&& ptr) :
Widget{std::move(ptr)}
Expand Down
2 changes: 1 addition & 1 deletion liboscar/UI/Panels/Panel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace osc
class Panel : public Widget {
public:
Panel();
Panel(Widget* parent, std::string_view panel_name, ui::WindowFlags = {});
Panel(Widget* parent, std::string_view panel_name, ui::PanelFlags = {});

bool is_open() const;
void open();
Expand Down
2 changes: 1 addition & 1 deletion liboscar/UI/Panels/PanelPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ osc::PanelPrivate::PanelPrivate(
Panel& owner,
Widget* parent,
std::string_view panel_name,
ui::WindowFlags window_flags) :
ui::PanelFlags window_flags) :

WidgetPrivate{owner, parent},
panel_enabled_config_key_{create_panel_enabled_config_key(panel_name)},
Expand Down
6 changes: 3 additions & 3 deletions liboscar/UI/Panels/PanelPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ namespace osc
Panel& owner,
Widget* parent = nullptr,
std::string_view panel_name = "unnamed",
ui::WindowFlags window_flags = {}
ui::PanelFlags panel_flags = {}
);

bool is_open() const;
void set_open(bool);

ui::WindowFlags panel_flags() const { return panel_flags_; }
ui::PanelFlags panel_flags() const { return panel_flags_; }
private:
std::string panel_enabled_config_key_;
ui::WindowFlags panel_flags_;
ui::PanelFlags panel_flags_;
};
}
12 changes: 6 additions & 6 deletions liboscar/UI/Popups/StandardPopup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
#include <string_view>

osc::StandardPopup::StandardPopup(std::string_view popup_name) :
StandardPopup{popup_name, {512.0f, 0.0f}, ui::WindowFlag::AlwaysAutoResize}
StandardPopup{popup_name, {512.0f, 0.0f}, ui::PanelFlag::AlwaysAutoResize}
{}

osc::StandardPopup::StandardPopup(
std::string_view popup_name,
Vec2 dimensions,
ui::WindowFlags popup_flags) :
ui::PanelFlags panel_flags) :

popup_name_{popup_name},
dimensions_{dimensions},
maybe_position_{std::nullopt},
popup_flags_{popup_flags},
panel_flags_{panel_flags},
should_open_{false},
should_close_{false},
just_opened_{false},
Expand Down Expand Up @@ -78,7 +78,7 @@ bool osc::StandardPopup::impl_begin_popup()
//
// else, set the position every frame, because the __nonzero__ dimensions
// will stretch out the modal accordingly
if (not (popup_flags_ & ui::WindowFlag::AlwaysAutoResize)) {
if (not (panel_flags_ & ui::PanelFlag::AlwaysAutoResize)) {
ui::set_next_panel_size(
Vec2{dimensions_},
ui::Conditional::Appearing
Expand All @@ -92,7 +92,7 @@ bool osc::StandardPopup::impl_begin_popup()

// try to begin the modal window
impl_before_imgui_begin_popup();
const bool opened = ui::begin_popup_modal(popup_name_, nullptr, popup_flags_);
const bool opened = ui::begin_popup_modal(popup_name_, nullptr, panel_flags_);
impl_after_imgui_begin_popup();

if (not opened) {
Expand All @@ -117,7 +117,7 @@ bool osc::StandardPopup::impl_begin_popup()

// try to begin the popup window
impl_before_imgui_begin_popup();
const bool opened = ui::begin_popup(popup_name_, popup_flags_);
const bool opened = ui::begin_popup(popup_name_, panel_flags_);
impl_after_imgui_begin_popup();

// try to show popup
Expand Down
4 changes: 2 additions & 2 deletions liboscar/UI/Popups/StandardPopup.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace osc
StandardPopup(
std::string_view popup_name,
Vec2 dimensions,
ui::WindowFlags
ui::PanelFlags
);

protected:
Expand Down Expand Up @@ -62,7 +62,7 @@ namespace osc
std::string popup_name_;
Vec2i dimensions_;
std::optional<Vec2i> maybe_position_;
ui::WindowFlags popup_flags_;
ui::PanelFlags panel_flags_;
bool should_open_;
bool should_close_;
bool just_opened_;
Expand Down
2 changes: 1 addition & 1 deletion liboscar/UI/Tabs/ErrorTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class osc::ErrorTab::Impl final : public TabPrivate {
ui::set_next_panel_pos(pos, ui::Conditional::Once, {0.5f, 1.0f});
ui::set_next_panel_size({width, 0.0f});

if (ui::begin_panel("Error Log", nullptr, ui::WindowFlag::MenuBar)) {
if (ui::begin_panel("Error Log", nullptr, ui::PanelFlag::MenuBar)) {
log_viewer_.on_draw();
}
ui::end_panel();
Expand Down
Loading

0 comments on commit fdc9fcf

Please sign in to comment.