Enhance examples (#17)

* enhance examples

* doc enhancement

* mv pool to stack

* missing ; and doc update

fix readme example image link
This commit is contained in:
m-aXimilian
2025-10-11 17:23:58 +02:00
committed by Maximilian Kueffner
parent 244b00fa5c
commit 356f966d01
14 changed files with 172 additions and 36 deletions
+2 -2
View File
@@ -35,9 +35,9 @@ void DefaultApp::MenuBarOptionsColumn2()
void DefaultApp::Run()
{
if (demop_) ImGui::ShowDemoWindow(&this->demop_);
if (image_listp_) this->gallery.RenderGallery();
if (image_listp_) this->gallery_.RenderGallery();
this->gallery.RenderImages();
this->gallery_.RenderImages();
}
void DefaultApp::LoadImage()
+7 -5
View File
@@ -17,9 +17,9 @@ class DefaultApp : public AppGLFW
{
public:
DefaultApp(const utils::log::ILog& log, pixelarium::resources::ImageResourcePool& pool)
: application::AppGLFW(log), pool_(pool), gallery(log, pool)
: application::AppGLFW(log), pool_(pool), gallery_(log, pool)
{
gallery.SetLoadFunction([&]() -> void { this->LoadImage(); });
gallery_.SetLoadFunction([&]() -> void { this->LoadImage(); });
}
protected:
@@ -27,14 +27,16 @@ class DefaultApp : public AppGLFW
void MenuBarOptionsColumn2() override;
void Run() override;
private:
protected:
resources::ImageResourcePool& pool_;
application::PixelariumImageGallery gallery_;
protected:
void LoadImage();
private:
resources::ImageResourcePool& pool_;
bool image_listp_{true};
bool demop_{false};
ImVec2 curr_dim_;
application::PixelariumImageGallery gallery;
};
} // namespace pixelarium::application