@Override
    public void update(int deltaTicks)
    {
        int mouseX = Mouse.getX();
        int mouseY = Mouse.getY();

        if (mouseX > this.position.x - this.size.x / 2 &&
                mouseX < this.position.x + this.size.x / 2 &&
                mouseY > this.position.y - this.size.y / 2 &&
                mouseY < this.position.y + this.size.y / 2)
        {
            hover = true;
        }
        else
        {
            hover = false;
        }

        if (this.inFocus)
        {
            if (mouseX > this.position.x - this.size.x / 2 &&
                    mouseX < this.position.x + this.size.x / 2 &&
                    mouseY > this.position.y - this.size.y / 2 - this.text.length * this.size.y &&
                    mouseY < this.position.y + this.size.y / 2 - this.size.y)
            {
                int offsetY = (mouseY - this.position.y + this.size.y / 2) * -1;
                this.hoverIndex = (int)Math.floor(offsetY / this.size.y) + 1;
            }
            else
            {
                this.hoverIndex = -1;
            }
        }
        else
        {
            this.hoverIndex = -1;
        }
    }