Skip to content

Commit

Permalink
KOTOR: Add the scissor test to the KotORWidget class
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Jun 26, 2017
1 parent 3cc7978 commit 535b6cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/engines/kotor/gui/widgets/kotorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ void KotORWidget::setPosition(float x, float y, float z) {
}
}

void KotORWidget::setScissor(int x, int y, int width, int height) {
_quad->setScissor(true);
_quad->setScissor(x, y, width, height);
}

float KotORWidget::getWidth() const {
return _width;
}
Expand Down
3 changes: 3 additions & 0 deletions src/engines/kotor/gui/widgets/kotorwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class KotORWidget : public Widget {

void setPosition(float x, float y, float z);

/** Create a scissor test over this widget. */
void setScissor(int x, int y, int width, int height);

float getWidth () const;
float getHeight() const;

Expand Down

0 comments on commit 535b6cc

Please sign in to comment.