Fully python-driven scene. Lots of interaction needs testing but the broad strokes are there for mouse pan/zoom on multiple grids and any number of UIs

This commit is contained in:
John McCardle 2023-03-04 23:04:16 -05:00
commit 257aa3c3d2
8 changed files with 191 additions and 3 deletions

21
src/PythonScene.h Normal file
View file

@ -0,0 +1,21 @@
#pragma once
#include "Common.h"
#include "Scene.h"
#include "GameEngine.h"
#include "Grid.h"
class PythonScene: public Scene
{
sf::Vector2i dragstart, mouseprev;
bool dragging;
Grid* drag_grid;
void doLClick(sf::Vector2i);
void doRClick(sf::Vector2i);
void doZoom(sf::Vector2i, int);
public:
PythonScene(GameEngine*, std::string);
void update() override final;
void doAction(std::string, std::string) override final;
void sRender() override final;
};