-
Notifications
You must be signed in to change notification settings - Fork 43
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
Showing
50 changed files
with
663 additions
and
320 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
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
16 changes: 8 additions & 8 deletions
16
platforms/common/src/main/java/dynamic_fps/impl/config/option/BatteryIndicatorPlacement.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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
package dynamic_fps.impl.config.option; | ||
|
||
import net.minecraft.client.gui.GuiGraphics; | ||
import com.mojang.blaze3d.platform.Window; | ||
|
||
/** | ||
* Screen corner to render the battery indicator in. | ||
*/ | ||
public enum BatteryIndicatorPlacement { | ||
TOP_LEFT(graphics -> new int[] {4, 4}), | ||
TOP_RIGHT(graphics -> new int[] {graphics.guiWidth() - 47, 4}), | ||
BOTTOM_LEFT(graphics -> new int[] {4, graphics.guiHeight() - 20}), | ||
BOTTOM_RIGHT(graphics -> new int[] {graphics.guiWidth() - 47, graphics.guiHeight() - 20}); | ||
TOP_LEFT(window -> new int[] {4, 4}), | ||
TOP_RIGHT(window -> new int[] {window.getGuiScaledWidth() - 47, 4}), | ||
BOTTOM_LEFT(window -> new int[] {4, window.getGuiScaledHeight() - 20}), | ||
BOTTOM_RIGHT(window -> new int[] {window.getGuiScaledWidth() - 47, window.getGuiScaledHeight() - 20}); | ||
|
||
private final DynamicPlacement placement; | ||
|
||
BatteryIndicatorPlacement(DynamicPlacement placement) { | ||
this.placement = placement; | ||
} | ||
|
||
public int[] get(GuiGraphics graphics) { | ||
return this.placement.get(graphics); | ||
public int[] get(Window window) { | ||
return this.placement.get(window); | ||
} | ||
|
||
@FunctionalInterface | ||
private interface DynamicPlacement { | ||
int[] get(GuiGraphics graphics); | ||
int[] get(Window window); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,5 @@ | |
|
||
public enum IdleCondition { | ||
NONE, | ||
VANILLA, | ||
ON_BATTERY; | ||
} |
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.