doesn't compile, but UI.h/.cpp code has been divvy'd up.

refs #43 @2h
This commit is contained in:
John McCardle 2024-04-08 22:45:00 -04:00
commit 83a63a3093
18 changed files with 5329 additions and 2910 deletions

40
src/UIEntity.h Normal file
View file

@ -0,0 +1,40 @@
#pragma once
#include "Common.h"
#include "Python.h"
#include "structmember.h"
#include "IndexTexture.h"
#include "Resources.h"
#include <list>
#include "PyCallable.h"
#include "PyTexture.h"
#include "PyColor.h"
#include "PyVector.h"
#include "PyFont.h"
#include "UIGridPoint.h"
#include "UIDrawable.h"
class UIGrid;
// TODO: make UIEntity a drawable
class UIEntity//: public UIDrawable
{
public:
//PyObject* self;
std::shared_ptr<UIGrid> grid;
std::vector<UIGridPointState> gridstate;
UISprite sprite;
sf::Vector2f position; //(x,y) in grid coordinates; float for animation
void render(sf::Vector2f); //override final;
UIEntity();
UIEntity(UIGrid&);
};
typedef struct {
PyObject_HEAD
std::shared_ptr<UIEntity> data;
//PyObject* texture;
} PyUIEntityObject;