diff options
author | Daniel Jones <admin@danieljon.es> | 2020-06-27 22:17:26 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-06-27 22:17:26 +0930 |
commit | ab76afb34070a33a2a8c09426408777580d984e4 (patch) | |
tree | 4a59c933d87734e784cd99677afe6fa6bfe4ac7e /MainWindow.h | |
parent | de0a6e00949bb151d32e08ee0aedcb9517c1c0c0 (diff) | |
download | foxlogicgates-ab76afb34070a33a2a8c09426408777580d984e4.tar.gz foxlogicgates-ab76afb34070a33a2a8c09426408777580d984e4.zip |
Functionality: moving multiple gates works, smoothed moving single gate
Diffstat (limited to 'MainWindow.h')
-rw-r--r-- | MainWindow.h | 11 |
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; |