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:
parent
a4b6c2c428
commit
257aa3c3d2
8 changed files with 191 additions and 3 deletions
21
src/PythonScene.h
Normal file
21
src/PythonScene.h
Normal 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;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue