-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fe2a7f
commit 1bbd045
Showing
13 changed files
with
358 additions
and
369 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
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
48 changes: 48 additions & 0 deletions
48
Common/src/main/java/com/blamejared/controlling/client/DisplayableBoolean.java
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,48 @@ | ||
package com.blamejared.controlling.client; | ||
|
||
import net.minecraft.network.chat.Component; | ||
|
||
public class DisplayableBoolean { | ||
|
||
private boolean state; | ||
private final Component whenTrue; | ||
private final Component whenFalse; | ||
|
||
public DisplayableBoolean(boolean initialState, Component whenTrue, Component whenFalse) { | ||
|
||
this.state = initialState; | ||
this.whenTrue = whenTrue; | ||
this.whenFalse = whenFalse; | ||
} | ||
|
||
public boolean state() { | ||
|
||
return state; | ||
} | ||
|
||
public boolean toggle(){ | ||
state(!state()); | ||
return state(); | ||
} | ||
|
||
public void state(boolean state) { | ||
|
||
this.state = state; | ||
} | ||
|
||
public Component currentDisplay() { | ||
|
||
return state ? whenTrue() : whenFalse(); | ||
} | ||
|
||
public Component whenTrue() { | ||
|
||
return whenTrue; | ||
} | ||
|
||
public Component whenFalse() { | ||
|
||
return whenFalse; | ||
} | ||
|
||
} |
81 changes: 0 additions & 81 deletions
81
Common/src/main/java/com/blamejared/controlling/client/FancyCheckbox.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.