Skip to content

Commit

Permalink
inline
Browse files Browse the repository at this point in the history
Signed-off-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com>
  • Loading branch information
j10a1n15 committed Jul 24, 2024
1 parent 4db8b2e commit dac62f1
Showing 1 changed file with 9 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,67 +43,58 @@ class WebhookMenu : WindowScreen(ElementaVersion.V5) {
}
}

private val inactiveWebhooksPanel =
ThemeManager.currentBackgroundUIImage.constrain {
private val inactiveWebhooksPanel = ThemeManager.currentBackgroundUIImage.constrain {
x = CenterConstraint() - (300 / 2).scaledPixels - (75 / 2).scaledPixels
y = CenterConstraint() - 20.scaledPixels - (150 / 2).scaledPixels
width = 300.scaledPixels
height = 350.scaledPixels
} childOf window

private val inactiveWebhookText =
UIWrappedText("Inactive Webhooks:").constrain {
private val inactiveWebhookText = UIWrappedText("Inactive Webhooks:").constrain {
x = 15.scaledPixels
y = 10.scaledPixels
width = (300 - (7 * 2)).scaledPixels
textScale = 1.5.scaledPixels
color = Color.red.constraint
} childOf inactiveWebhooksPanel

private val activeWebhooksPanel =
ThemeManager.currentBackgroundUIImage.constrain {
private val activeWebhooksPanel = ThemeManager.currentBackgroundUIImage.constrain {
x = CenterConstraint() + (300 / 2).scaledPixels + (75 / 2).scaledPixels
y = CenterConstraint() - 20.scaledPixels - (150 / 2).scaledPixels
width = 300.scaledPixels
height = 350.scaledPixels
} childOf window

private val activeWebhookText =
UIWrappedText("Active Webhooks:").constrain {
private val activeWebhookText = UIWrappedText("Active Webhooks:").constrain {
x = 15.scaledPixels
y = 10.scaledPixels
width = (300 - (7 * 2)).scaledPixels
textScale = 1.5.scaledPixels
color = Color.green.constraint
} childOf activeWebhooksPanel

private val webhookOptionsPanel =
ThemeManager.currentBackgroundUIImage.constrain {
private val webhookOptionsPanel = ThemeManager.currentBackgroundUIImage.constrain {
x = CenterConstraint()
y = CenterConstraint() + 20.scaledPixels + (300 / 2).scaledPixels
width = (300 + 300 + 75).scaledPixels
height = 150.scaledPixels
} childOf window

private val webhookOptionsList =
ScrollComponent().constrain {
private val webhookOptionsList = ScrollComponent().constrain {
x = CenterConstraint()
y = CenterConstraint()
width = 100.percent
height = 100.percent
} childOf webhookOptionsPanel

private val webhookOptionsHeader =
UIWrappedText().constrain {
private val webhookOptionsHeader = UIWrappedText().constrain {
x = 15.scaledPixels
y = 10.scaledPixels
width = 100.percent
textScale = 1.5.scaledPixels
} childOf webhookOptionsList

private val sideSwitchButton =
ThemeManager.currentBackgroundUIImage
.constrain {
private val sideSwitchButton = ThemeManager.currentBackgroundUIImage.constrain {
x = CenterConstraint()
y = CenterConstraint() - (300 / 2).scaledPixels + 20.scaledPixels
width = 50.scaledPixels
Expand All @@ -117,8 +108,7 @@ class WebhookMenu : WindowScreen(ElementaVersion.V5) {
updateLocations()
} childOf window

private val sideSwitchIcon =
ResourceLocation("partlysaneskies", "textures/gui/webhookedit/sideswitch.png")
private val sideSwitchIcon = ResourceLocation("partlysaneskies", "textures/gui/webhookedit/sideswitch.png")
.uiImage
.constrain {
x = CenterConstraint()
Expand Down

0 comments on commit dac62f1

Please sign in to comment.