init
This commit is contained in:
parent
54f5313273
commit
b49080f675
83 changed files with 2083 additions and 0 deletions
39
Group.h
Normal file
39
Group.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
//
|
||||
// Created by Benjamin on 1/25/2022.
|
||||
//
|
||||
|
||||
#ifndef SFML_TEMPLATE_GROUP_H
|
||||
#define SFML_TEMPLATE_GROUP_H
|
||||
|
||||
#include <vector>
|
||||
#include "Sprite.h"
|
||||
#include "Label.h"
|
||||
|
||||
class Group {
|
||||
public:
|
||||
Group();
|
||||
explicit Group(sf::RenderWindow *);
|
||||
|
||||
std::vector<Sprite *>* getLayerSprites(unsigned int);
|
||||
std::vector<Label *>* getLayerLabels(unsigned int);
|
||||
void add(Sprite *, int = 0);
|
||||
void add(Label *, int = 0);
|
||||
void kill(Sprite *);
|
||||
void empty();
|
||||
void empty_layer(unsigned int);
|
||||
|
||||
void update();
|
||||
void draw();
|
||||
void do_clicked(sf::Vector2i &);
|
||||
void hide_layer(unsigned int);
|
||||
void show_layer(unsigned int);
|
||||
private:
|
||||
sf::RenderWindow *window;
|
||||
|
||||
std::vector<std::vector<int>> layers;
|
||||
std::vector<std::vector<Sprite *>> sprites;
|
||||
std::vector<std::vector<Label *>> labels;
|
||||
};
|
||||
|
||||
|
||||
#endif //SFML_TEMPLATE_GROUP_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue