aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/gui/profileviewer/ProfileViewer.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/gui/profileviewer/ProfileViewer.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/gui/profileviewer/ProfileViewer.kt19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/gui/profileviewer/ProfileViewer.kt b/src/main/kotlin/moe/nea/firmament/gui/profileviewer/ProfileViewer.kt
index 6285f6b..d3612e5 100644
--- a/src/main/kotlin/moe/nea/firmament/gui/profileviewer/ProfileViewer.kt
+++ b/src/main/kotlin/moe/nea/firmament/gui/profileviewer/ProfileViewer.kt
@@ -1,18 +1,10 @@
package moe.nea.firmament.gui.profileviewer
import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription
-import io.github.cottonmc.cotton.gui.widget.WGridPanel
import io.github.cottonmc.cotton.gui.widget.WTabPanel
-import io.github.cottonmc.cotton.gui.widget.data.Insets
-import io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
import java.util.UUID
-import net.minecraft.item.Items
-import net.minecraft.text.Text
-import net.minecraft.util.DyeColor
import moe.nea.firmament.apis.Member
import moe.nea.firmament.apis.Profile
-import moe.nea.firmament.gui.WBar
-import moe.nea.firmament.util.toShedaniel
class ProfileViewer(
val primaryPlayer: UUID,
@@ -26,10 +18,13 @@ class ProfileViewer(
init {
val panel = WTabPanel().also { rootPanel = it }
panel.backgroundPainter
- panel.add(SkillPage.getElements(this)) {
- it.icon(ItemIcon(Items.IRON_SWORD))
- it.title(Text.translatable("firmament.pv.skills"))
- }
+ listOf<ProfilePage>(SkillPage)
+ .forEach { page ->
+ panel.add(page.getElements(this)) {
+ it.icon(page.icon)
+ it.tooltip(page.text)
+ }
+ }
}
}