feat(compat): Stella Mod Compatibilty - #920
Conversation
|
usually my commit names are just bs, might have to adapt this format for stella |
| import org.polyfrost.oneconfig.internal.ui.hud.CompatOverlayRenderer | ||
| import java.awt.Color | ||
|
|
||
| object StellaCompat { |
There was a problem hiding this comment.
does this actually have hud saving anywhere? keep in mind oneconfig compat huds should redirect completely to the original mod's positioning stuff
| CompatOverlayRenderer.register(::renderExamples) | ||
| } | ||
|
|
||
| private fun renderExamples(ctx: GuiGraphicsExtractor) { |
There was a problem hiding this comment.
hopefully you guys have it so when oneconfig Edit HUD/UI is open, Stella hud rendering cancels?
| public class Mixin_Stella { | ||
| @Inject(method = "onInitializeClient", at = @At("TAIL"), require = 0) | ||
| private void oneconfig$registerStella(CallbackInfo ci) { | ||
| StellaCompat.ensureRegistered(); |
There was a problem hiding this comment.
please move this to use CompatLoader.requireTranslations elsewhere (look at SkyCubedCompat), also make sure the config is actually loaded before running this
|
|
||
| object StellaCompat { | ||
| private val LOGGER = LogManager.getLogger("OneConfig/Stella-Compat") | ||
| private val tree = Tree.tree() |
|
|
||
| // Hud | ||
| private class StellaHudWrapper(private val element: HUDElement): OneConfigHudWrapper { | ||
| override var id: String = element.id |
| // Hud | ||
| private class StellaHudWrapper(private val element: HUDElement): OneConfigHudWrapper { | ||
| override var id: String = element.id | ||
| override var name: String = element.id |
There was a problem hiding this comment.
why are you using your id as the display name
| } | ||
|
|
||
| // Hud | ||
| private class StellaHudWrapper(private val element: HUDElement): OneConfigHudWrapper { |
There was a problem hiding this comment.
your hud settings should show in the hud designer too
There was a problem hiding this comment.
This is a thing I want your opinion on. Some of my huds have there own subcategory like the room name hud, some of my huds have entire config categories dedicated to them like the map, and some of my subcategories have more than one hud. So I cant really think of a way to automatically group related settings and have them be 100% accurate. is it worth it?
There was a problem hiding this comment.
This is a thing I want your opinion on. Some of my huds have there own subcategory like the room name hud, some of my huds have entire config categories dedicated to them like the map, and some of my subcategories have more than one hud. So I cant really think of a way to automatically group related settings and have them be 100% accurate. is it worth it?
yes its worth it for ux
|
|
||
| config.registerListener { _, _ -> | ||
| for (node in tree.map.values) { | ||
| (node as? Property<*>)?.revaluateDisplay() |
| is TextParagraph -> Properties.dummy(id = key, name = name, description = desc) | ||
| .apply { visualizer = Visualizer.InfoVisualizer::class.java } | ||
|
|
||
| is Keybind -> null |
Description
Adds compatibility for the stella mod versions 1.0.6 beta 4 and up on Minecraft 26.1 - 26.2. Feature list includes creating a config screen in the one client menu for stella, and all of its Huds in the Hud editor.
Checklist