-
Notifications
You must be signed in to change notification settings - Fork 184
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
70d5cdc
commit d8f2073
Showing
5 changed files
with
47 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package net.vulkanmod.config.video; | ||
|
||
public enum WindowMode { | ||
WINDOWED(0), | ||
WINDOWED_FULLSCREEN(1), | ||
EXCLUSIVE_FULLSCREEN(2); | ||
|
||
public final int mode; | ||
|
||
WindowMode(int mode) { | ||
this.mode = mode; | ||
} | ||
|
||
public static WindowMode fromValue(int value) { | ||
return switch (value) { | ||
case 0 -> WINDOWED; | ||
case 1 -> WINDOWED_FULLSCREEN; | ||
case 2 -> EXCLUSIVE_FULLSCREEN; | ||
|
||
default -> throw new IllegalStateException("Unexpected value: " + value); | ||
}; | ||
} | ||
|
||
public static String getComponentName(WindowMode windowMode) { | ||
return switch (windowMode) { | ||
case WINDOWED -> "vulkanmod.options.windowMode.windowed"; | ||
case WINDOWED_FULLSCREEN -> "vulkanmod.options.windowMode.windowedFullscreen"; | ||
case EXCLUSIVE_FULLSCREEN -> "options.fullscreen"; | ||
}; | ||
} | ||
} |
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