added menu, added clear workspace function, buttons file now gui file
Signed-off-by: Victor Giers <vgiers@web.de>
This commit is contained in:
@@ -7,11 +7,12 @@ boolean darkMode = true;
|
||||
void setup() {
|
||||
size(800, 600);
|
||||
surface.setResizable(true);
|
||||
//frame.setResizable(true);
|
||||
|
||||
textSize(textSize);
|
||||
|
||||
initButtons();
|
||||
|
||||
|
||||
/**
|
||||
* When saving, a copy of the save-file is stored locally which is opened when starting the program
|
||||
*/
|
||||
@@ -56,10 +57,14 @@ void draw() {
|
||||
textAlign(CORNER);
|
||||
buttons[0].display();
|
||||
if (i_selectedNode != -1) buttons[1].display();
|
||||
buttons[2].display();
|
||||
buttons[3].display();
|
||||
buttons[4].display();
|
||||
buttons[5].display();
|
||||
if (menuOpen) {
|
||||
buttons[2].display();
|
||||
buttons[3].display();
|
||||
buttons[4].display();
|
||||
buttons[5].display();
|
||||
buttons[6].display();
|
||||
}
|
||||
buttons[7].display();
|
||||
rectMode(CENTER);
|
||||
textAlign(CENTER);
|
||||
textSize(textSize);
|
||||
@@ -81,3 +86,16 @@ void draw() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void deleteAll() {
|
||||
for (int i = 0; i < nodeCount; i++) {
|
||||
//nodes[i].deleted = true;
|
||||
i_selectedNode = i;
|
||||
deleteSelectedNode();
|
||||
}
|
||||
nodeCount = 0;
|
||||
for (int i = 0; i < linkCount; i++) {
|
||||
links[i].active = false;
|
||||
}
|
||||
linkCount = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user