-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Completed GUI (Except Profile Preferences) -Added IconMap modification -Examples fully functional -Patch method
- Loading branch information
1 parent
c1f6e6d
commit ad5ff84
Showing
40 changed files
with
1,879 additions
and
409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/Construct Mod Loader/code_signing.crt | ||
/Construct Mod Loader/launch4j.exe - Shortcut.lnk | ||
/Construct Mod Loader/L4j/jre/ | ||
/Construct Mod Loader/L4j/launch4j.log | ||
/Construct Mod Loader/Construct Mod Loader.msi | ||
/Construct Mod Loader/ConstructModLoader.jar | ||
/Construct Mod Loader/L4j/ | ||
/Construct Mod Loader/CML App.ico | ||
/Construct Mod Loader/launch4jconfig.xml | ||
/Construct Mod Loader/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
run.jvmargs=-Dolaunch=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
javafx.main.class=cml.NewGUI | ||
run.jvmargs=-Dolaunch=false -Domodify=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
* Copyright (C) 2020 benne | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package cml; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import javafx.beans.property.ObjectProperty; | ||
import javafx.beans.property.SimpleObjectProperty; | ||
|
||
/** | ||
* | ||
* @author benne | ||
*/ | ||
public class ErrorManager { | ||
|
||
private static final ErrorManager NO_ERROR = new ErrorManager(false); | ||
private static final ErrorManager ERROR = new ErrorManager(true); | ||
|
||
public static ObjectProperty<ErrorManager> State = new SimpleObjectProperty(NO_ERROR); | ||
|
||
private final List<String> causes = new ArrayList(); | ||
private final boolean error; | ||
|
||
private ErrorManager(boolean error) { | ||
this.error = error; | ||
} | ||
|
||
public void removeCause(String cause) { | ||
if (this.error) { | ||
if (this.causes.remove(cause) ) { | ||
System.out.println((char) 27 + "[34;1mUser Error resolved: \"" + cause + "\"\n" | ||
+ " Remaining errors: " + causes.size() + (char) 27 + "[0m"); | ||
} | ||
if (this.causes.isEmpty()) { | ||
State.setValue(NO_ERROR); | ||
} | ||
} | ||
} | ||
|
||
public void addCause(String cause) { | ||
if (!this.error) { | ||
ERROR.addCause(cause); | ||
State.setValue(ERROR); | ||
} else if (!causes.contains(cause)) { | ||
System.out.println((char) 27 + "[31;1;5mUser Error caught: \"" + cause + "\"" + (char) 27 + "[0m"); | ||
this.causes.add(cause); | ||
} | ||
} | ||
|
||
public List<String> getCauses() { | ||
return this.causes; | ||
} | ||
|
||
public boolean isError() { | ||
return this.error; | ||
} | ||
|
||
public static void addStateCause(String cause) { | ||
State.getValue().addCause(cause); | ||
} | ||
|
||
public static void removeStateCause(String cause) { | ||
State.getValue().removeCause(cause); | ||
} | ||
|
||
public static boolean isStateError() { | ||
return State.getValue().isError(); | ||
} | ||
|
||
public static void printNonUserError(String error) { | ||
System.out.println((char) 27 + "[31;1;5m" + error + (char) 27 + "[0m"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.