From 08ffc71b3b219c169af385ed9c47fae6535dcd67 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 24 Jun 2020 15:25:12 +0930 Subject: functionality: added ability to delete links. click on the input of the link you wish to delete and press the delete key. --- MainWindow.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'MainWindow.h') diff --git a/MainWindow.h b/MainWindow.h index ac3ff2e..e1ee01e 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -31,6 +31,11 @@ class MainWindow : public FXMainWindow { FXDECLARE(MainWindow) + struct selected_input + { + Gate *gate; + int input; + }; public: explicit MainWindow(FXApp* a); @@ -84,6 +89,7 @@ class MainWindow : public FXMainWindow void create_ui(); void draw(); void update_gate_state(Gate *gate); + void find_selected_input(int x, int y); Gate *find_gate_at(int x, int y); Gate *find_gate_by_id(int id); @@ -128,6 +134,7 @@ class MainWindow : public FXMainWindow FXButton *NOT_button; Gate::GATE_TYPE selected_gate_type = Gate::NONE; // the type of gate we will place + struct selected_input selected_input; /* mouse */ bool lmouse_down = false; @@ -139,6 +146,7 @@ class MainWindow : public FXMainWindow /* general */ std::vector> gates; + }; #endif // MAINWINDOW_H -- cgit v1.2.3