#include "../../helpers/color.lua"
#include "../../../m_lobby/script/computer/components/page_components.lua"

message = {}

function message:Draw(text)
    UiPush()
        UiTranslate(UiCenter(), UiMiddle()/2)
        UiAlign("center middle")
        self:drawMessage(text)
    UiPop()
end

function message:drawMessage(message)
    UiAlign('center middle')
    UiFont("regular.ttf", 50)
    local textW = UiGetTextSize(message)
    PAGE_COMPONENTS:drawRoundedColorRect(textW + 48, 76, 12, 0, 0, 0, 0.5)
    SetColorFromHEX("#F2E040")

    UiText(message)
end
