2023-01-28 11:32:16 +00:00
|
|
|
@file:Suppress("PackageDirectoryMismatch")
|
|
|
|
|
2023-01-28 14:41:10 +00:00
|
|
|
package xyz.xenondevs.invui.window.type.context
|
2023-01-28 11:32:16 +00:00
|
|
|
|
|
|
|
import net.kyori.adventure.text.Component
|
2023-02-26 14:29:57 +00:00
|
|
|
import org.jetbrains.annotations.Contract
|
2023-01-28 14:41:10 +00:00
|
|
|
import xyz.xenondevs.inventoryaccess.component.AdventureComponentWrapper
|
2023-02-26 14:29:57 +00:00
|
|
|
import xyz.xenondevs.invui.window.Window
|
2023-01-28 11:32:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the title of the window.
|
2023-02-26 14:29:57 +00:00
|
|
|
*
|
|
|
|
* @param title the new title
|
|
|
|
* @return This Window Builder
|
2023-01-28 11:32:16 +00:00
|
|
|
*/
|
2023-02-26 14:29:57 +00:00
|
|
|
@Contract("_ -> this")
|
|
|
|
fun <B : Window.Builder<*, *, B>> B.setTitle(title: Component): B = setTitle(AdventureComponentWrapper(title))
|