1
Modding / [OptionPanelAPI] setTooltip issue?
« on: February 06, 2020, 09:37:36 AM »
I have the following code snippet, where opts is OptionPanelAPI in a PaginatedOptions.
In the snippet above, the first setTooltip (applied on a Selector) doesn't change its tooltip while the second setTooltip (applied on an Option) changes it correctly.
I'm wondering if maybe I'm doing something wrong?
Code
val testellino = listOf(1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 13.0) // Doesn't matter
opts.clearOptions()
opts.addOption("Save", "ShabroConfigurationsBack", "Save the Princess")
opts.setShortcut("ShabroConfigurationsBack", Keyboard.KEY_ESCAPE, false, false, false, true)
opts.addSelector("Testellone", "Testellone", Color.RED, 256f, 48f, 1f, testellino.size - 1f, ValueDisplayMode.NONE, "Quantity: 1")
opts.setSelectorValue("Testellone", 1f)
opts.setTooltip("Testellone", "Testellone of Quantity") // This doesn't do anything
opts.setTooltip("ShabroConfigurationsBack", "TESTELLONE MAGGICO") // This works as expected
In the snippet above, the first setTooltip (applied on a Selector) doesn't change its tooltip while the second setTooltip (applied on an Option) changes it correctly.
I'm wondering if maybe I'm doing something wrong?