Datamodel V1.1

This commit is contained in:
andreja6
2018-10-24 19:45:51 -07:00
parent 0f0be7f0b9
commit 4df67897dc
16 changed files with 203 additions and 57 deletions

View File

@@ -58,6 +58,10 @@ void TextButtonInstance::setAllColorsSame()
textOutlineColorDn = textOutlineColor;
boxColorDn = boxColor;
boxOutlineColorDn = boxOutlineColor;
textColorDis = textColor;
textOutlineColorDis = textOutlineColor;
boxColorDis = boxColor;
boxOutlineColorDis = boxOutlineColor;
}
TextButtonInstance::~TextButtonInstance(void)
@@ -80,7 +84,12 @@ void TextButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseD
point2 = Vector3(boxEnd.x, boxEnd.y,0);
}
Vector2 RelativeTo = Vector2(point1.x + fontLocationRelativeTo.x, point1.y + fontLocationRelativeTo.y);
if(mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y) && mouseDown)
if(disabled)
{
Draw::box(Box(point1, point2), rd, boxColorDis, boxOutlineColorDis);
font->draw2D(rd, title, RelativeTo, textSize, textColorDis, textOutlineColorDis);
}
else if(mouseInArea(point1.x, point1.y, point2.x, point2.y, mousePos.x, mousePos.y) && mouseDown)
{
Draw::box(Box(point1, point2), rd, boxColorDn, boxOutlineColorDn);
font->draw2D(rd, title, RelativeTo, textSize, textColorDn, textOutlineColorDn);