mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
refactor: add GUI instance reference to UI nodes
This commit is contained in:
parent
74a94f869c
commit
4c48afbb90
70 changed files with 1133 additions and 832 deletions
|
|
@ -1,15 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include "UINode.hpp"
|
||||
#include "typedefs.hpp"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class Assets;
|
||||
class DrawContext;
|
||||
|
||||
namespace gui {
|
||||
class Plotter : public gui::UINode {
|
||||
class Plotter : public UINode {
|
||||
std::unique_ptr<int[]> points;
|
||||
float multiplier;
|
||||
int index = 0;
|
||||
|
|
@ -17,13 +18,18 @@ namespace gui {
|
|||
int dmheight;
|
||||
int labelsInterval;
|
||||
public:
|
||||
Plotter(uint width, uint height, float multiplier, int labelsInterval)
|
||||
: gui::UINode(glm::vec2(width, height)),
|
||||
multiplier(multiplier),
|
||||
dmwidth(width-50),
|
||||
dmheight(height),
|
||||
labelsInterval(labelsInterval)
|
||||
{
|
||||
Plotter(
|
||||
GUI& gui,
|
||||
uint width,
|
||||
uint height,
|
||||
float multiplier,
|
||||
int labelsInterval
|
||||
)
|
||||
: UINode(gui, glm::vec2(width, height)),
|
||||
multiplier(multiplier),
|
||||
dmwidth(width - 50),
|
||||
dmheight(height),
|
||||
labelsInterval(labelsInterval) {
|
||||
points = std::make_unique<int[]>(dmwidth);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue