Commit 620df282 authored by Leeor Dicker's avatar Leeor Dicker

- Centered window titles.

- Added color to window title handles.
- EditorState will not draw the tile highlight when interacting with the MiniMap or TilePalette.
parent 0f56e813
......@@ -303,6 +303,9 @@ void EditorState::updateSelector()
if(mHideUi || mMouseCoords.y() < 32)
return;
if (mTilePalette.responding_to_events() || mMiniMap.responding_to_events())
return;
Renderer& r = Utility<Renderer>::get();
// Draw Tile Selector
......
......@@ -108,12 +108,13 @@ void MiniMap::update()
Renderer& r = Utility<Renderer>::get();
r.drawBoxFilled(rect(), 180, 180, 180);
r.drawBoxFilled(rect().x(), rect().y(), rect().w(), 16, 75, 95, 130);
r.drawBox(rect(), 0, 0, 0);
if (mFont)
{
r.drawText(*mFont, "MiniMap", rect().x() + 2, rect().y() + 2, 0, 0, 0);
r.drawText(*mFont, "MiniMap", rect().x() + 3, rect().y() + 2, 0, 0, 0);
r.drawText(*mFont, "MiniMap", mRect.x() + (mRect.w() / 2) - (mFont->width("MiniMap") / 2) - 1, rect().y() + 4, 255, 255, 255);
r.drawText(*mFont, "MiniMap", mRect.x() + (mRect.w() / 2) - (mFont->width("MiniMap") / 2), rect().y() + 4, 255, 255, 255);
}
Point_2d pt(0, 0);
......
......@@ -142,14 +142,13 @@ void TilePalette::update()
r.drawBoxFilled(rect(), 180, 180, 180);
r.drawBoxFilled(mTileGridRect, 70, 70, 70);
r.drawBoxFilled(rect().x(), rect().y(), rect().w(), 16, 200, 200, 200);
r.drawLine(rect().x(), rect().y() + 16, rect().x() + rect().w(), rect().y() + 16, 0, 0, 0);
r.drawBoxFilled(rect().x(), rect().y(), rect().w(), 16, 75, 95, 130);
r.drawBox(rect(), 0, 0, 0);
if (mFont)
{
r.drawText(*mFont, "Tile Palette", mRect.x() + 2, mRect.y() + 4, 0, 0, 0);
r.drawText(*mFont, "Tile Palette", mRect.x() + 3, mRect.y() + 4, 0, 0, 0); // cheap way of getting a 'bold' typeface. Inefficient.
r.drawText(*mFont, "Tile Palette", mRect.x() + (mRect.w() / 2) - (mFont->width("Tile Palette") / 2), mRect.y() + 4, 255, 255, 255);
r.drawText(*mFont, "Tile Palette", mRect.x() + (mRect.w() / 2) - (mFont->width("Tile Palette") / 2) + 1, mRect.y() + 4, 255, 255, 255); // cheap way of getting a 'bold' typeface. Inefficient.
r.drawText(*mFont, string_format("Page: %i of %i", mCurrentPage + 1, mNumPages), mBtnPrev.positionX() + mBtnPrev.width() + 4, mRect.y() + 280, 0, 0, 0);
}
......@@ -184,7 +183,7 @@ void TilePalette::update()
r.drawBox(rect.x(), rect.y(), (mBrushPattern.width() * mTset->width()), (mBrushPattern.height() * mTset->height()), 255, 255, 0);
}
if(mDragging && mLeftButtonDown && mMouseOverTiles)
if(mMouseOverTiles && responding_to_events())
{
Rectangle_2d rect = getRectFromPoints(mMouseCoords, mDragOrigin);
r.drawBox(rect, 255, 255, 255);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment