Correctly capitalized HuntOptimizer package.

This commit is contained in:
Daan Vanden Bosch 2020-10-12 15:20:38 +02:00
parent 2bcfd7cdce
commit 8a27364237
12 changed files with 38 additions and 38 deletions

View File

@ -16,7 +16,7 @@ import world.phantasmal.web.core.AssetLoader
import world.phantasmal.web.core.stores.ApplicationUrl import world.phantasmal.web.core.stores.ApplicationUrl
import world.phantasmal.web.core.stores.PwTool import world.phantasmal.web.core.stores.PwTool
import world.phantasmal.web.core.stores.UiStore import world.phantasmal.web.core.stores.UiStore
import world.phantasmal.web.huntoptimizer.HuntOptimizer import world.phantasmal.web.huntOptimizer.HuntOptimizer
import world.phantasmal.webui.dom.disposableListener import world.phantasmal.webui.dom.disposableListener
class Application( class Application(

View File

@ -1,14 +1,14 @@
package world.phantasmal.web.huntoptimizer package world.phantasmal.web.huntOptimizer
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import world.phantasmal.core.disposable.DisposableContainer import world.phantasmal.core.disposable.DisposableContainer
import world.phantasmal.web.core.AssetLoader import world.phantasmal.web.core.AssetLoader
import world.phantasmal.web.core.stores.UiStore import world.phantasmal.web.core.stores.UiStore
import world.phantasmal.web.huntoptimizer.controllers.HuntOptimizerController import world.phantasmal.web.huntOptimizer.controllers.HuntOptimizerController
import world.phantasmal.web.huntoptimizer.controllers.MethodsController import world.phantasmal.web.huntOptimizer.controllers.MethodsController
import world.phantasmal.web.huntoptimizer.stores.HuntMethodStore import world.phantasmal.web.huntOptimizer.stores.HuntMethodStore
import world.phantasmal.web.huntoptimizer.widgets.HuntOptimizerWidget import world.phantasmal.web.huntOptimizer.widgets.HuntOptimizerWidget
import world.phantasmal.web.huntoptimizer.widgets.MethodsWidget import world.phantasmal.web.huntOptimizer.widgets.MethodsWidget
class HuntOptimizer( class HuntOptimizer(
scope: CoroutineScope, scope: CoroutineScope,

View File

@ -1,4 +1,4 @@
package world.phantasmal.web.huntoptimizer package world.phantasmal.web.huntOptimizer
object HuntOptimizerUrls { object HuntOptimizerUrls {
const val optimize = "/optimize" const val optimize = "/optimize"

View File

@ -1,10 +1,10 @@
package world.phantasmal.web.huntoptimizer.controllers package world.phantasmal.web.huntOptimizer.controllers
import world.phantasmal.web.core.controllers.PathAwareTab import world.phantasmal.web.core.controllers.PathAwareTab
import world.phantasmal.web.core.controllers.PathAwareTabController import world.phantasmal.web.core.controllers.PathAwareTabController
import world.phantasmal.web.core.stores.PwTool import world.phantasmal.web.core.stores.PwTool
import world.phantasmal.web.core.stores.UiStore import world.phantasmal.web.core.stores.UiStore
import world.phantasmal.web.huntoptimizer.HuntOptimizerUrls import world.phantasmal.web.huntOptimizer.HuntOptimizerUrls
class HuntOptimizerController(uiStore: UiStore) : PathAwareTabController<PathAwareTab>( class HuntOptimizerController(uiStore: UiStore) : PathAwareTabController<PathAwareTab>(
uiStore, uiStore,

View File

@ -1,4 +1,4 @@
package world.phantasmal.web.huntoptimizer.controllers package world.phantasmal.web.huntOptimizer.controllers
import world.phantasmal.lib.fileformats.quest.Episode import world.phantasmal.lib.fileformats.quest.Episode
import world.phantasmal.observable.value.list.ListVal import world.phantasmal.observable.value.list.ListVal
@ -8,9 +8,9 @@ import world.phantasmal.web.core.controllers.PathAwareTab
import world.phantasmal.web.core.controllers.PathAwareTabController import world.phantasmal.web.core.controllers.PathAwareTabController
import world.phantasmal.web.core.stores.PwTool import world.phantasmal.web.core.stores.PwTool
import world.phantasmal.web.core.stores.UiStore import world.phantasmal.web.core.stores.UiStore
import world.phantasmal.web.huntoptimizer.HuntOptimizerUrls import world.phantasmal.web.huntOptimizer.HuntOptimizerUrls
import world.phantasmal.web.huntoptimizer.models.HuntMethodModel import world.phantasmal.web.huntOptimizer.models.HuntMethodModel
import world.phantasmal.web.huntoptimizer.stores.HuntMethodStore import world.phantasmal.web.huntOptimizer.stores.HuntMethodStore
class MethodsTab(title: String, path: String, val episode: Episode) : PathAwareTab(title, path) class MethodsTab(title: String, path: String, val episode: Episode) : PathAwareTab(title, path)

View File

@ -1,4 +1,4 @@
package world.phantasmal.web.huntoptimizer.models package world.phantasmal.web.huntOptimizer.models
import world.phantasmal.lib.fileformats.quest.Episode import world.phantasmal.lib.fileformats.quest.Episode
import world.phantasmal.lib.fileformats.quest.NpcType import world.phantasmal.lib.fileformats.quest.NpcType

View File

@ -1,4 +1,4 @@
package world.phantasmal.web.huntoptimizer.models package world.phantasmal.web.huntOptimizer.models
import world.phantasmal.lib.fileformats.quest.Episode import world.phantasmal.lib.fileformats.quest.Episode
import world.phantasmal.lib.fileformats.quest.NpcType import world.phantasmal.lib.fileformats.quest.NpcType

View File

@ -1,4 +1,4 @@
package world.phantasmal.web.huntoptimizer.stores package world.phantasmal.web.huntOptimizer.stores
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@ -12,8 +12,8 @@ import world.phantasmal.web.core.IoDispatcher
import world.phantasmal.web.core.UiDispatcher import world.phantasmal.web.core.UiDispatcher
import world.phantasmal.web.core.models.Server import world.phantasmal.web.core.models.Server
import world.phantasmal.web.core.stores.UiStore import world.phantasmal.web.core.stores.UiStore
import world.phantasmal.web.huntoptimizer.models.HuntMethodModel import world.phantasmal.web.huntOptimizer.models.HuntMethodModel
import world.phantasmal.web.huntoptimizer.models.SimpleQuestModel import world.phantasmal.web.huntOptimizer.models.SimpleQuestModel
import world.phantasmal.webui.stores.Store import world.phantasmal.webui.stores.Store
import kotlin.collections.component1 import kotlin.collections.component1
import kotlin.collections.component2 import kotlin.collections.component2

View File

@ -1,4 +1,4 @@
package world.phantasmal.web.huntoptimizer.widgets package world.phantasmal.web.huntOptimizer.widgets
import org.w3c.dom.Node import org.w3c.dom.Node
import world.phantasmal.webui.dom.div import world.phantasmal.webui.dom.div
@ -6,7 +6,7 @@ import world.phantasmal.webui.dom.p
import world.phantasmal.webui.widgets.Widget import world.phantasmal.webui.widgets.Widget
class HelpWidget : Widget(::style) { class HelpWidget : Widget(::style) {
override fun Node.createElement() = div(className = "pw-huntoptimizer-help") { override fun Node.createElement() = div(className = "pw-hunt-optimizer-help") {
p { p {
textContent = textContent =
"Add some items with the combo box on the left to see the optimal combination of hunt methods on the right." "Add some items with the combo box on the left to see the optimal combination of hunt methods on the right."
@ -28,12 +28,12 @@ class HelpWidget : Widget(::style) {
@Suppress("CssUnusedSymbol") @Suppress("CssUnusedSymbol")
// language=css // language=css
private fun style() = """ private fun style() = """
.pw-huntoptimizer-help { .pw-hunt-optimizer-help {
cursor: initial; cursor: initial;
user-select: text; user-select: text;
} }
.pw-huntoptimizer-help p { .pw-hunt-optimizer-help p {
margin: 1em; margin: 1em;
max-width: 600px; max-width: 600px;
} }

View File

@ -1,9 +1,9 @@
package world.phantasmal.web.huntoptimizer.widgets package world.phantasmal.web.huntOptimizer.widgets
import org.w3c.dom.Node import org.w3c.dom.Node
import world.phantasmal.webui.widgets.TabContainer import world.phantasmal.webui.widgets.TabContainer
import world.phantasmal.web.huntoptimizer.HuntOptimizerUrls import world.phantasmal.web.huntOptimizer.HuntOptimizerUrls
import world.phantasmal.web.huntoptimizer.controllers.HuntOptimizerController import world.phantasmal.web.huntOptimizer.controllers.HuntOptimizerController
import world.phantasmal.webui.dom.div import world.phantasmal.webui.dom.div
import world.phantasmal.webui.widgets.Widget import world.phantasmal.webui.widgets.Widget
@ -11,7 +11,7 @@ class HuntOptimizerWidget(
private val ctrl: HuntOptimizerController, private val ctrl: HuntOptimizerController,
private val createMethodsWidget: () -> MethodsWidget, private val createMethodsWidget: () -> MethodsWidget,
) : Widget(::style) { ) : Widget(::style) {
override fun Node.createElement() = div(className = "pw-huntoptimizer-hunt-optimizer") { override fun Node.createElement() = div(className = "pw-hunt-optimizer-hunt-optimizer") {
addChild(TabContainer( addChild(TabContainer(
ctrl = ctrl, ctrl = ctrl,
createWidget = { tab -> createWidget = { tab ->
@ -33,12 +33,12 @@ class HuntOptimizerWidget(
@Suppress("CssUnusedSymbol") @Suppress("CssUnusedSymbol")
// language=css // language=css
private fun style() = """ private fun style() = """
.pw-huntoptimizer-hunt-optimizer { .pw-hunt-optimizer-hunt-optimizer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.pw-huntoptimizer-hunt-optimizer > * { .pw-hunt-optimizer-hunt-optimizer > * {
flex-grow: 1; flex-grow: 1;
overflow: hidden; overflow: hidden;
} }

View File

@ -1,8 +1,8 @@
package world.phantasmal.web.huntoptimizer.widgets package world.phantasmal.web.huntOptimizer.widgets
import org.w3c.dom.Node import org.w3c.dom.Node
import world.phantasmal.lib.fileformats.quest.Episode import world.phantasmal.lib.fileformats.quest.Episode
import world.phantasmal.web.huntoptimizer.controllers.MethodsController import world.phantasmal.web.huntOptimizer.controllers.MethodsController
import world.phantasmal.webui.dom.bindChildrenTo import world.phantasmal.webui.dom.bindChildrenTo
import world.phantasmal.webui.dom.div import world.phantasmal.webui.dom.div
import world.phantasmal.webui.widgets.Widget import world.phantasmal.webui.widgets.Widget
@ -11,7 +11,7 @@ class MethodsForEpisodeWidget(
private val ctrl: MethodsController, private val ctrl: MethodsController,
private val episode: Episode, private val episode: Episode,
) : Widget(::style) { ) : Widget(::style) {
override fun Node.createElement() = div(className = "pw-huntoptimizer-methods-for-episode") { override fun Node.createElement() = div(className = "pw-hunt-optimizer-methods-for-episode") {
bindChildrenTo(ctrl.episodeToMethods.getValue(episode)) { method, _ -> bindChildrenTo(ctrl.episodeToMethods.getValue(episode)) { method, _ ->
div { textContent = method.name } div { textContent = method.name }
} }
@ -21,7 +21,7 @@ class MethodsForEpisodeWidget(
@Suppress("CssUnusedSymbol") @Suppress("CssUnusedSymbol")
// language=css // language=css
private fun style() = """ private fun style() = """
.pw-huntoptimizer-methods-for-episode { .pw-hunt-optimizer-methods-for-episode {
overflow: auto; overflow: auto;
} }
""" """

View File

@ -1,13 +1,13 @@
package world.phantasmal.web.huntoptimizer.widgets package world.phantasmal.web.huntOptimizer.widgets
import org.w3c.dom.Node import org.w3c.dom.Node
import world.phantasmal.webui.widgets.TabContainer import world.phantasmal.webui.widgets.TabContainer
import world.phantasmal.web.huntoptimizer.controllers.MethodsController import world.phantasmal.web.huntOptimizer.controllers.MethodsController
import world.phantasmal.webui.dom.div import world.phantasmal.webui.dom.div
import world.phantasmal.webui.widgets.Widget import world.phantasmal.webui.widgets.Widget
class MethodsWidget(private val ctrl: MethodsController) : Widget(::style) { class MethodsWidget(private val ctrl: MethodsController) : Widget(::style) {
override fun Node.createElement() = div(className = "pw-huntoptimizer-methods") { override fun Node.createElement() = div(className = "pw-hunt-optimizer-methods") {
addChild(TabContainer(ctrl = ctrl, createWidget = { tab -> addChild(TabContainer(ctrl = ctrl, createWidget = { tab ->
MethodsForEpisodeWidget(ctrl, tab.episode) MethodsForEpisodeWidget(ctrl, tab.episode)
})) }))
@ -17,12 +17,12 @@ class MethodsWidget(private val ctrl: MethodsController) : Widget(::style) {
@Suppress("CssUnusedSymbol") @Suppress("CssUnusedSymbol")
// language=css // language=css
private fun style() = """ private fun style() = """
.pw-huntoptimizer-methods { .pw-hunt-optimizer-methods {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.pw-huntoptimizer-methods > * { .pw-hunt-optimizer-methods > * {
flex-grow: 1; flex-grow: 1;
overflow: hidden; overflow: hidden;
} }