My Project
 
Loading...
Searching...
No Matches
cellselector.h
Go to the documentation of this file.
1#pragma once
2
3#include "toucharea.h"
4
6
7class CellSelector :public TouchArea{
8public:
9 class Listener {
10 public:
11 virtual void onSelect(int cell) = 0;
12 virtual std::string prompt() = 0;
13 };
14
15public:
17
18 bool enabled;
19
21 void select(int cell);
22 void cancel();
23private:
24 float dragThreshold;
25 bool dragging;
26 PointF lastPos;
27
28 bool pinching;
29 TouchScreen::Touch* another;
30
31 float startZoom;
32 float startSpan;
33
34protected:
35 virtual void onClick(TouchScreen::Touch* touch);
36 virtual void onTouchDown(TouchScreen::Touch* t);
37 virtual void onTouchUp(TouchScreen::Touch* t);
38 virtual void onDrag(TouchScreen::Touch* t);
39};
Definition cellselector.h:9
virtual void onSelect(int cell)=0
virtual std::string prompt()=0
void select(int cell)
Definition cellselector.cpp:21
CellSelector(DungeonTilemap *map)
Definition cellselector.cpp:7
virtual void onTouchDown(TouchScreen::Touch *t)
Definition cellselector.cpp:58
virtual void onDrag(TouchScreen::Touch *t)
Definition cellselector.cpp:100
virtual void onTouchUp(TouchScreen::Touch *t)
Definition cellselector.cpp:79
bool enabled
Definition cellselector.h:18
virtual void onClick(TouchScreen::Touch *touch)
Definition cellselector.cpp:44
void cancel()
Definition cellselector.cpp:34
Listener * listener
Definition cellselector.h:16
Definition dungeontilemap.h:8
glm::vec2 PointF
Definition define.h:7