selection: Create it's dedicated class
This commit is contained in:
32
includes/selection.hpp
Normal file
32
includes/selection.hpp
Normal 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
|
||||
Reference in New Issue
Block a user