summaryrefslogtreecommitdiff
path: root/MainWindow.h
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-06-27 22:17:26 +0930
committerDaniel Jones <admin@danieljon.es>2020-06-27 22:17:26 +0930
commitab76afb34070a33a2a8c09426408777580d984e4 (patch)
tree4a59c933d87734e784cd99677afe6fa6bfe4ac7e /MainWindow.h
parentde0a6e00949bb151d32e08ee0aedcb9517c1c0c0 (diff)
downloadfoxlogicgates-ab76afb34070a33a2a8c09426408777580d984e4.tar.gz
foxlogicgates-ab76afb34070a33a2a8c09426408777580d984e4.zip
Functionality: moving multiple gates works, smoothed moving single gate
Diffstat (limited to 'MainWindow.h')
-rw-r--r--MainWindow.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/MainWindow.h b/MainWindow.h
index 1110806..3623a1f 100644
--- a/MainWindow.h
+++ b/MainWindow.h
@@ -95,6 +95,16 @@ class MainWindow : public FXMainWindow
MainWindow(){}
private:
+ struct Coord {
+ int X;
+ int Y;
+
+ Coord operator-(const Coord& other) const
+ {
+ return { X - other.X, Y - other.Y };
+ }
+ };
+
void create_ui();
void draw();
void update_gate_state(Gate *gate);
@@ -161,6 +171,7 @@ class MainWindow : public FXMainWindow
int rubberband_starty;
int multiple_move_startx;
int multiple_move_starty;
+ Coord lastPos;
/* keyboard */
bool lshift_down = false;