mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-19 21:10:19 -07:00
Move some logic from the base plugin to the views as callbacks
This commit is contained in:
parent
fec060626b
commit
4a053d5698
7 changed files with 295 additions and 130 deletions
|
|
@ -31,7 +31,7 @@ import kotlin.math.ceil
|
|||
*/
|
||||
|
||||
|
||||
object ReflectiveEditorView {
|
||||
object ReflectiveEditorView : View {
|
||||
var reflectiveEditorView: JPanel? = null
|
||||
private val loadedPlugins: MutableList<String> = mutableListOf()
|
||||
const val VIEW_NAME = "REFLECTIVE_EDITOR_VIEW"
|
||||
|
|
@ -72,6 +72,19 @@ object ReflectiveEditorView {
|
|||
// Search text for filtering plugins
|
||||
private var pluginSearchText: String = ""
|
||||
|
||||
override val name: String = VIEW_NAME
|
||||
override val iconSpriteId: Int = KondoKit.plugin.WRENCH_ICON
|
||||
override val panel: JPanel
|
||||
get() = reflectiveEditorView ?: JPanel()
|
||||
|
||||
override fun createView() {
|
||||
createReflectiveEditorView()
|
||||
}
|
||||
|
||||
override fun registerFunctions() {
|
||||
// Reflective editor functions are handled within the view itself
|
||||
}
|
||||
|
||||
fun createReflectiveEditorView() {
|
||||
// Load the cog icon once
|
||||
loadCogIcon()
|
||||
|
|
@ -749,4 +762,4 @@ object ReflectiveEditorView {
|
|||
g2.fillRoundRect(x, y, width - 1, height - 1, radius, radius)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue