Package org.polyfrost.oneconfig.internal
Class OneConfigConfig
java.lang.Object
org.polyfrost.oneconfig.api.config.v1.Config
org.polyfrost.oneconfig.internal.OneConfigConfig
public class OneConfigConfig
extends org.polyfrost.oneconfig.api.config.v1.Config
-
Nested Class Summary
Nested classes/interfaces inherited from class org.polyfrost.oneconfig.api.config.v1.Config
org.polyfrost.oneconfig.api.config.v1.Config.Category -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic floatstatic floatstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic OneConfigConfigThe live instance, used to persist programmatic changes (e.g.static booleanstatic org.polyfrost.oneconfig.api.ui.v1.keybind.OneConfigKeybindstatic intstatic floatstatic intstatic booleanstatic booleanstatic booleanstatic floatstatic floatstatic floatstatic booleanFields inherited from class org.polyfrost.oneconfig.api.config.v1.Config
category, iconPath, id, title, tree -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinitialize(boolean byConfigManager) static voidCalled once after the first-launch message has been shown.static voidsetOpenAction(kotlin.jvm.functions.Function1<Boolean, Boolean> action) Supplies the action run when the OneConfig keybind is pressed.Methods inherited from class org.polyfrost.oneconfig.api.config.v1.Config
addAliases, addAliases, addCallback, addCallback, addDependency, addDependency, addDependency, addMigrationEntries, addMigrationEntry, addToInitQueue, captureDefaults, getProperty, getProperty, getTree, hideIf, hideIf, loadFrom, loadFrom, makeTree, preload, restoreDefaults, restoreProperty, save
-
Field Details
-
oneConfigKeybind
@Keybind(title="OneConfig Keybind", titleKey="oneconfig.preferences.keybind.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", description="The keybind used to open the OneConfig menu.", descriptionKey="oneconfig.preferences.keybind.description") public static org.polyfrost.oneconfig.api.ui.v1.keybind.OneConfigKeybind oneConfigKeybind -
enableWindowBlur
@Switch(title="Window Blur", titleKey="oneconfig.preferences.window_blur.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", description="Blurs the area behind the OneConfig window.", descriptionKey="oneconfig.preferences.window_blur.description") public static boolean enableWindowBlur -
enableBackgroundBlur
@Switch(title="Background Blur", titleKey="oneconfig.preferences.background_blur.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", description="Blurs the full game background when the OneConfig menu is open.", descriptionKey="oneconfig.preferences.background_blur.description") public static boolean enableBackgroundBlur -
useCustomScale
@Switch(title="Use custom GUI scale", titleKey="oneconfig.preferences.use_custom_scale.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", description="Override the Minecraft GUI scale for the OneConfig menu.", descriptionKey="oneconfig.preferences.use_custom_scale.description") public static boolean useCustomScale -
customScale
@Slider(title="Custom GUI scale", titleKey="oneconfig.preferences.custom_scale.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", min=0.5f, max=2.0f, step=0.05f, description="The custom GUI scale to use for the OneConfig menu.", descriptionKey="oneconfig.preferences.custom_scale.description") public static float customScale -
openingBehavior
@Dropdown(title="Opening Behavior", titleKey="oneconfig.preferences.opening_behavior.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", options={"Mods","Preferences","Previous page","Smart reset"}, optionsKey={"oneconfig.mods","oneconfig.preferences","oneconfig.preferences.opening_behavior.previous_page","oneconfig.preferences.opening_behavior.smart_reset"}, description="Which page to open when the OneConfig menu is launched.", descriptionKey="oneconfig.preferences.opening_behavior.description") public static int openingBehavior -
showOpeningPageAnimation
@Switch(title="Show opening page animation", titleKey="oneconfig.preferences.show_opening_page_animation.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", description="Plays the page animation when the menu is first opened.", descriptionKey="oneconfig.preferences.show_opening_page_animation.description") public static boolean showOpeningPageAnimation -
instantSearch
@Switch(title="Instant Search", titleKey="oneconfig.preferences.instant_search.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", description="Focuses the search bar when the OneConfig menu opens.", descriptionKey="oneconfig.preferences.instant_search.description") public static boolean instantSearch -
timeBeforeReset
@Slider(title="Time before reset", titleKey="oneconfig.preferences.time_before_reset.title", subcategory="GUI", subcategoryKey="oneconfig.preferences.category.gui", min=5.0f, max=60.0f, step=1.0f, description="Seconds of inactivity before the smart reset returns to the default page.", descriptionKey="oneconfig.preferences.time_before_reset.description") public static float timeBeforeReset -
searchDistance
@Number(title="Search Distance", titleKey="oneconfig.preferences.search_distance.title", subcategory="Search", subcategoryKey="oneconfig.preferences.category.search", min=0.0f, max=10.0f, description="The maximum Levenshtein distance used when fuzzy-matching search queries.", descriptionKey="oneconfig.preferences.search_distance.description") public static int searchDistance -
guiOpenAnimation
@Switch(title="Opening Animation", titleKey="oneconfig.preferences.opening_animation.title", subcategory="Animations", subcategoryKey="oneconfig.preferences.category.animations", description="Plays an animation when opening the OneConfig menu.", descriptionKey="oneconfig.preferences.opening_animation.description") public static boolean guiOpenAnimation -
guiClosingAnimation
@Switch(title="Closing Animation", titleKey="oneconfig.preferences.closing_animation.title", subcategory="Animations", subcategoryKey="oneconfig.preferences.category.animations", description="Plays an animation when closing the OneConfig menu.", descriptionKey="oneconfig.preferences.closing_animation.description") public static boolean guiClosingAnimation -
animationTime
@Slider(title="Opening Time", titleKey="oneconfig.preferences.opening_time.title", subcategory="Animations", subcategoryKey="oneconfig.preferences.category.animations", min=0.05f, max=2.0f, step=0.05f, description="Duration of the opening and closing animations, in seconds.", descriptionKey="oneconfig.preferences.opening_time.description") public static float animationTime -
showPageAnimations
@Switch(title="Show Page Animations", titleKey="oneconfig.preferences.show_page_animations.title", subcategory="Animations", subcategoryKey="oneconfig.preferences.category.animations", description="Animate transitions between pages.", descriptionKey="oneconfig.preferences.show_page_animations.description") public static boolean showPageAnimations -
enableUISounds
@Switch(title="UI Sounds", titleKey="oneconfig.preferences.ui_sounds.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", description="Play sound effects when interacting with the OneConfig menu and HUD designer.", descriptionKey="oneconfig.preferences.ui_sounds.description") public static boolean enableUISounds -
enableUIMenuSounds
@Switch(title="Menu Sounds", titleKey="oneconfig.preferences.menu_sounds.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", description="Play sounds when opening and closing OneConfig screens.", descriptionKey="oneconfig.preferences.menu_sounds.description") public static boolean enableUIMenuSounds -
enableUIClickSounds
@Switch(title="Click Sounds", titleKey="oneconfig.preferences.click_sounds.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", description="Play sounds when clicking OneConfig controls.", descriptionKey="oneconfig.preferences.click_sounds.description") public static boolean enableUIClickSounds -
enableUISliderSounds
@Switch(title="Slider Sounds", titleKey="oneconfig.preferences.slider_sounds.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", description="Play tick sounds when dragging sliders and ordered lists.", descriptionKey="oneconfig.preferences.slider_sounds.description") public static boolean enableUISliderSounds -
enableHudEditorSounds
@Switch(title="HUD Editor Sounds", titleKey="oneconfig.preferences.hud_editor_sounds.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", description="Play sounds when selecting, dragging, and resizing HUD elements.", descriptionKey="oneconfig.preferences.hud_editor_sounds.description") public static boolean enableHudEditorSounds -
enableUIAmbience
@Switch(title="UI Ambience", titleKey="oneconfig.preferences.ui_ambience.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", description="Play a soft ambient loop while the OneConfig menu or HUD designer is open.", descriptionKey="oneconfig.preferences.ui_ambience.description") public static boolean enableUIAmbience -
enableUIMusicDucking
@Switch(title="Duck Music During Ambience", titleKey="oneconfig.preferences.duck_music.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", description="Lower Minecraft music while OneConfig ambience is playing.", descriptionKey="oneconfig.preferences.duck_music.description") public static boolean enableUIMusicDucking -
uiSoundVolume
@Slider(title="UI Sound Volume", titleKey="oneconfig.preferences.ui_sound_volume.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", min=0.0f, max=1.0f, step=0.05f, description="Volume of OneConfig\'s UI sound effects.", descriptionKey="oneconfig.preferences.ui_sound_volume.description") public static float uiSoundVolume -
uiAmbienceVolume
@Slider(title="UI Ambience Volume", titleKey="oneconfig.preferences.ui_ambience_volume.title", subcategory="Sounds", subcategoryKey="oneconfig.preferences.category.sounds", min=0.0f, max=1.0f, step=0.05f, description="Volume of OneConfig\'s UI ambience.", descriptionKey="oneconfig.preferences.ui_ambience_volume.description") public static float uiAmbienceVolume -
pageAnimationDuration
@Slider(title="Page Animation Duration", titleKey="oneconfig.preferences.page_animation_duration.title", subcategory="Animations", subcategoryKey="oneconfig.preferences.category.animations", min=0.1f, max=0.6f, step=0.05f, description="Duration of page transition animations, in seconds.", descriptionKey="oneconfig.preferences.page_animation_duration.description") public static float pageAnimationDuration -
showFirstLaunchMessage
@Switch(title="Show First Launch Message", titleKey="oneconfig.preferences.show_first_launch_message.title", subcategory="General", subcategoryKey="oneconfig.preferences.category.general", description="Show the welcome message the first time OneConfig is launched.", descriptionKey="oneconfig.preferences.show_first_launch_message.description") public static boolean showFirstLaunchMessage -
INSTANCE
The live instance, used to persist programmatic changes (e.g.markFirstLaunchShown()).
-
-
Constructor Details
-
OneConfigConfig
public OneConfigConfig()
-
-
Method Details
-
initialize
protected void initialize(boolean byConfigManager) - Overrides:
initializein classorg.polyfrost.oneconfig.api.config.v1.Config
-
setOpenAction
Supplies the action run when the OneConfig keybind is pressed. Called by the minecraft module, as the action references platform classes this module cannot depend on. SeeopenAction. -
markFirstLaunchShown
public static void markFirstLaunchShown()Called once after the first-launch message has been shown. FlipsshowFirstLaunchMessageoff and persists it so the message is not shown again until the user re-enables it from the menu.
-