Skip to content

Commit

Permalink
KOTOR: Modify the widgets quad according to the border dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Dec 23, 2017
1 parent b1ec811 commit f2ec6db
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/engines/kotor/gui/widgets/kotorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,16 @@ void KotORWidget::load(const Aurora::GFF3Struct &gff) {
}

if (!border.fill.empty()) {
_quad.reset(new Graphics::Aurora::HighlightableGUIQuad(border.fill, 0.0f, 0.0f, extend.w, extend.h));
_quad.reset(new Graphics::Aurora::HighlightableGUIQuad(border.fill, 0.0f, 0.0f,
extend.w - 2*border.dimension,
extend.h - 2*border.dimension));
} else {
_quad.reset(new Graphics::Aurora::GUIQuad(border.fill, 0.0f, 0.0f, extend.w, extend.h));
_quad.reset(new Graphics::Aurora::GUIQuad(border.fill, 0.0f, 0.0f,
extend.w - 2*border.dimension,
extend.h - 2*border.dimension));
}

_quad->setPosition(extend.x, extend.y, 0.0f);
_quad->setPosition(extend.x + border.dimension, extend.y + border.dimension, 0.0f);
_quad->setTag(getTag());
_quad->setClickable(true);

Expand Down

0 comments on commit f2ec6db

Please sign in to comment.