summaryrefslogtreecommitdiff
path: root/layoutgl
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-15 15:48:09 +0200
committerTreeki <treeki@gmail.com>2012-08-15 15:48:09 +0200
commitb3e58ec4a57f1cefe34438943b963f86dbf40b72 (patch)
treea57df7c02d5838beefb849677d1b914c55136997 /layoutgl
parenta6e48ccf96d7c655dc6ef461c859621c892a7d70 (diff)
downloadLayoutStudio-b3e58ec4a57f1cefe34438943b963f86dbf40b72.tar.gz
LayoutStudio-b3e58ec4a57f1cefe34438943b963f86dbf40b72.zip
untested and unfinished 8-frame window support; can't find any to try...
Diffstat (limited to 'layoutgl')
-rw-r--r--layoutgl/widget.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/layoutgl/widget.cpp b/layoutgl/widget.cpp
index f88de00..d4d124c 100644
--- a/layoutgl/widget.cpp
+++ b/layoutgl/widget.cpp
@@ -326,6 +326,59 @@ void LGLWidget::drawWindow(const LYTWindow *wnd) {
}
}
break;
+ case 8:
+ {
+ qDebug() << "WHOA!!!";
+ // top left
+ const LYTWindowFrame &fTL = *wnd->frames.at(0);
+ const LYTMaterial &mTL = getMaterial(fTL.materialName);
+
+ if (!mTL.texMaps.empty()) {
+ useMaterial(mTL);
+
+ dealWithWindowFrame(texCoords, fTL.materialName, fTL.type, frameLeft, frameTop, 0, 2, 4, 6);
+ drawQuad(dX, dY, frameLeft, frameTop, 1, &texCoords, 0, wnd->alpha);
+ }
+
+ // top right
+ const LYTWindowFrame &fTR = *wnd->frames.at(1);
+ const LYTMaterial &mTR = getMaterial(fTR.materialName);
+
+ if (!mTR.texMaps.empty()) {
+ useMaterial(mTR);
+
+ dealWithWindowFrame(texCoords, fTR.materialName, fTR.type, frameRight, frameTop, 2, 0, 6, 4);
+
+ drawQuad(dX + wnd->width - frameRight, dY, frameRight, frameTop,
+ 1, &texCoords, 0, wnd->alpha);
+ }
+
+ // bottom left
+ const LYTWindowFrame &fBL = *wnd->frames.at(2);
+ const LYTMaterial &mBL = getMaterial(fBL.materialName);
+
+ if (!mBL.texMaps.empty()) {
+ useMaterial(mBL);
+
+ dealWithWindowFrame(texCoords, fBL.materialName, fBL.type, frameLeft, frameBottom, 4, 6, 0, 2);
+
+ drawQuad(dX, dY - frameTop, frameLeft, frameBottom,
+ 1, &texCoords, 0, wnd->alpha);
+ }
+
+ const LYTWindowFrame &fBR = *wnd->frames.at(3);
+ const LYTMaterial &mBR = getMaterial(fBR.materialName);
+
+ // bottom right
+ if (!mBR.texMaps.empty()) {
+ useMaterial(mBR);
+
+ dealWithWindowFrame(texCoords, fBR.materialName, fBR.type, frameRight, frameBottom, 6, 4, 2, 0);
+
+ drawQuad(dX + frameLeft, dY - wnd->height + frameBottom, frameRight, frameBottom,
+ 1, &texCoords, 0, wnd->alpha);
+ }
+ }
default:
qDebug() << "unhandled window frame count" << wnd->frames.count();
}