Skip to content

Commit

Permalink
Cleanup, finalize bgf v0.1.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
karnkaul committed Jun 26, 2024
1 parent eb16930 commit 8a335b2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 26 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ include(FetchContent)
FetchContent_Declare(
bgf
GIT_REPOSITORY https://github.com/karnkaul/bgf

# GIT_TAG v0.1.7
GIT_TAG 59cf60b
GIT_TAG v0.1.7
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ext/bgf"
)

Expand Down
19 changes: 0 additions & 19 deletions src/spaced/spaced/scenes/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,12 @@ void MenuScene::create_ui() {
quit->set_position({0.0f, -400.0f});
quit->callback = [this]() { get_app().shutdown(); };

auto pb = std::make_unique<ui::ProgressBar>(get_services());
pb->set_size({400.0f, 50.0f});
auto s = pb->get_style();
s.padding = 20.0f;
pb->set_style(s);
m_pb = pb.get();

auto view = std::make_unique<ui::View>(get_services());
view->push(std::move(m_header));
view->push(std::move(start));
view->push(std::move(options));
view->push(std::move(quit));

view->push(std::move(pb));

push_view(std::move(view));
}

void MenuScene::tick(Seconds const dt) {
Scene::tick(dt);

if (ImGui::Begin("Debug")) {
auto progress = m_pb->get_progress();
if (ImGui::DragFloat("progress", &progress, 0.05f, 0.0f, 1.0f)) { m_pb->set_progress(progress); }
}
ImGui::End();
}
} // namespace spaced
4 changes: 0 additions & 4 deletions src/spaced/spaced/scenes/menu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,5 @@ class MenuScene : public bave::Scene {
void on_loaded() final;

void create_ui();

void tick(bave::Seconds dt) final;

bave::Ptr<bave::ui::ProgressBar> m_pb{};
};
} // namespace spaced

0 comments on commit 8a335b2

Please sign in to comment.