selection: Create it's dedicated class

This commit is contained in:
2026-01-13 13:39:02 +01:00
parent f45c83dd77
commit 55341973b3
6 changed files with 141 additions and 60 deletions

32
includes/selection.hpp Normal file
View File

@@ -0,0 +1,32 @@
/*
* File name: selection.hpp
* Author: lejulien
* Date created: 01-01-1970 00:59:59
// Date modified: 12-01-2026 21:30:10
* ------
*/
#pragma once
#include <context.hpp>
#include <imgui.h>
#include <raylib.h>
#include <rlImGui.h>
namespace gol {
class Selection {
public:
Selection(std::shared_ptr<ctx>);
~Selection() = default;
void update();
void display();
private:
std::shared_ptr<ctx> context_ = nullptr;
Vector2 sel_pos_ = {0., 0.};
Vector2 mouse_pos_ = {0., 0.};
bool selecting_ = false;
};
} // namespace gol