-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better saving system and further ContextMenu layout
- Loading branch information
1 parent
b7a36c0
commit 762d88e
Showing
8 changed files
with
83 additions
and
24 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
29 changes: 29 additions & 0 deletions
29
src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/Util.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,29 @@ | ||
package com.tanishisherewith.dynamichud.newTrial.utils; | ||
|
||
import com.tanishisherewith.dynamichud.newTrial.DynamicHUD; | ||
|
||
public class Util { | ||
public enum Quadrant { | ||
UPPER_LEFT, UPPER_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT | ||
} | ||
|
||
public static Quadrant getQuadrant(int x, int y) { | ||
int screenWidth = DynamicHUD.MC.getWindow().getScaledWidth(); | ||
int screenHeight = DynamicHUD.MC.getWindow().getScaledHeight(); | ||
|
||
if (x < screenWidth / 2) { | ||
if (y < screenHeight / 2) { | ||
return Quadrant.UPPER_LEFT; | ||
} else { | ||
return Quadrant.BOTTOM_LEFT; | ||
} | ||
} else { | ||
if (y < screenHeight / 2) { | ||
return Quadrant.UPPER_RIGHT; | ||
} else { | ||
return Quadrant.BOTTOM_RIGHT; | ||
} | ||
} | ||
} | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/ContextMenu.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,4 @@ | ||
package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu; | ||
|
||
public class ContextMenu { | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/Option.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,4 @@ | ||
package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu; | ||
|
||
public abstract class Option<T> { | ||
} |
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