diff options
author | Daniel Jones <admin@danieljon.es> | 2020-07-03 22:18:55 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-07-03 22:18:55 +0930 |
commit | 1e7b871722482f7f77e2ab3c80dd5bec1596d29c (patch) | |
tree | 7ed147be7e16d781ba1a264e690133bed0d59609 /BinaryDisplay.cpp | |
parent | 7e8f5a8e885ab980b3ac1acbec84f46ba28d0ca5 (diff) | |
download | foxlogicgates-1e7b871722482f7f77e2ab3c80dd5bec1596d29c.tar.gz foxlogicgates-1e7b871722482f7f77e2ab3c80dd5bec1596d29c.zip |
Functionality: saving/loading with binary displays added
Diffstat (limited to 'BinaryDisplay.cpp')
-rw-r--r-- | BinaryDisplay.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/BinaryDisplay.cpp b/BinaryDisplay.cpp index 4b51703..2786fe7 100644 --- a/BinaryDisplay.cpp +++ b/BinaryDisplay.cpp @@ -1,7 +1,12 @@ #include "BinaryDisplay.h" -BinaryDisplay::BinaryDisplay(int x_, int y_, int width, int height) +BinaryDisplay::BinaryDisplay(int x_, int y_, int width, int height, int loaded_id) { + /* special handing of id - if the object is loaded from file the loaded_id will be set and we use that */ + if (loaded_id != -1) + id = loaded_id; + else + id = Object::object_id_counter++; // increment counter after assigning x = x_; y = y_; w = width; |