From 6bcc95a57e45bbc3b19dbf1b92b87cbcaf15340e Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 15 May 2014 22:41:07 +0100 Subject: [PATCH] Add line to demo app --- examples/demo.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/demo.cpp b/examples/demo.cpp index 92dacc0..c4162e9 100644 --- a/examples/demo.cpp +++ b/examples/demo.cpp @@ -35,6 +35,7 @@ using DGL::App; using DGL::ImageButton; +using DGL::Line; using DGL::Size; // ------------------------------------------------------ @@ -92,6 +93,10 @@ protected: rHover.drawOutline(); } + glLineWidth(2.0f); + glColor3f(0.184f, 0.184f, 0.184f); + lineSep.draw(); + // reset color glColor4f(1.0f, 1.0f, 1.0f, 1.0f); @@ -177,12 +182,16 @@ protected: bgIcon.setX(cx+1); bgIcon.setWidth(iconSize-2); bgIcon.setHeight(iconSize-2); + + lineSep.setStartPos(iconSize+4, getY()); + lineSep.setEndPos(iconSize+4, getHeight()); } private: Callback* const callback; int curPage, curHover; Rectangle bg, bgIcon; + Line lineSep; Image img1, img2, img3, img4; }; @@ -227,7 +236,7 @@ public: wRects.setSize(size); wShapes.setSize(size); - wLeft.setSize(76, height); + wLeft.setSize(73, height); Window::onReshape(width, height); }