From 0ce811fa977e1dae5a5e67c8d63405f8b702b0ba Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 28 Aug 2021 14:30:26 +0200 Subject: [PATCH] chore(textwidget): fail if position is wrong --- sonic-radiance.love/birb/modules/gui/menus/widgets/text.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sonic-radiance.love/birb/modules/gui/menus/widgets/text.lua b/sonic-radiance.love/birb/modules/gui/menus/widgets/text.lua index f8f9465..511bb0f 100644 --- a/sonic-radiance.love/birb/modules/gui/menus/widgets/text.lua +++ b/sonic-radiance.love/birb/modules/gui/menus/widgets/text.lua @@ -80,6 +80,8 @@ function TextWidget:drawCanvas() w = self:getPadding() elseif (complexLabel.position == "right") then w = math.floor(self.width - self:getPadding()) + else + error("Position " .. complexLabel.position .. " is unknown for label " .. complexLabel.label) end font:draw(complexLabel.label, w, h, -1, complexLabel.position) end