Moving works-ish, fixed box selection

This commit is contained in:
andreja6
2018-10-27 11:21:09 -07:00
parent 61d07a8557
commit 89f9e0bfa2
2 changed files with 33 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ TextButtonInstance::TextButtonInstance(void)
visible = true;
className = "TextButton";
disabled = false;
selected = false;
}
bool TextButtonInstance::mouseInButton(float mousex, float mousey, RenderDevice* rd)
@@ -102,6 +103,11 @@ void TextButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseD
Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr);
font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr);
}
else if(selected)
{
Draw::box(Box(point1, point2), rd, boxColorOvr, boxOutlineColorOvr);
font->draw2D(rd, title, RelativeTo, textSize, textColorOvr, textOutlineColorOvr);
}
else
{
Draw::box(Box(point1, point2), rd, boxColor, boxOutlineColor);