blob: 1e64f78346b4ec199495fd21369e11bed1567b07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#pragma once
#include <glm/glm.hpp>
class UIComponentPlacer {
public:
UIComponentPlacer(glm::vec2 padding, float spacing, glm::length_t axis = 0);
glm::vec2 next(glm::vec2 size);
glm::vec2 getLimit() const;
private:
const glm::vec2 padding;
const float spacing;
const glm::length_t axis;
float current {};
float max {};
};
|