diff --git a/examples/osgwidgetaddremove/osgwidgetaddremove.cpp b/examples/osgwidgetaddremove/osgwidgetaddremove.cpp index 01320efc1..c4b6ff80b 100644 --- a/examples/osgwidgetaddremove/osgwidgetaddremove.cpp +++ b/examples/osgwidgetaddremove/osgwidgetaddremove.cpp @@ -13,7 +13,7 @@ class ABCWidget: public osgWidget::Label { public: ABCWidget(const std::string& label): osgWidget::Label("", label) { - setFont("fonts/Calibri1.ttf"); + setFont("fonts/Vera.ttf"); setFontSize(20); setCanFill(true); setShadow(0.08f); @@ -25,7 +25,7 @@ class Button: public osgWidget::Label { public: Button(const std::string& label): osgWidget::Label("", label) { - setFont("fonts/Calibri1.ttf"); + setFont("fonts/Vera.ttf"); setFontSize(30); setColor(0.8f, 0.2f, 0.2f, 0.8f); setCanFill(true); diff --git a/examples/osgwidgetframe/osgwidgetframe.cpp b/examples/osgwidgetframe/osgwidgetframe.cpp index 583c50320..3c5de5bfa 100644 --- a/examples/osgwidgetframe/osgwidgetframe.cpp +++ b/examples/osgwidgetframe/osgwidgetframe.cpp @@ -54,10 +54,10 @@ int main(int argc, char** argv) { osgWidget::Widget* t = frame->getBorder(osgWidget::Frame::BORDER_TOP); osgWidget::Widget* b = frame->getBorder(osgWidget::Frame::BORDER_BOTTOM); - l->setImage("../examples/osgwidgetframe/images/border-left.tga", true); - r->setImage("../examples/osgwidgetframe/images/border-right.tga", true); - t->setImage("../examples/osgwidgetframe/images/border-top.tga", true); - b->setImage("../examples/osgwidgetframe/images/border-bottom.tga", true); + l->setImage("osgWidget/border-left.tga", true); + r->setImage("osgWidget/border-right.tga", true); + t->setImage("osgWidget/border-top.tga", true); + b->setImage("osgWidget/border-bottom.tga", true); l->setTexCoordWrapVertical(); r->setTexCoordWrapVertical(); @@ -69,9 +69,9 @@ int main(int argc, char** argv) { osgWidget::Widget* center = new osgWidget::Widget("center", 256.0f, 256.0f); osgWidget::Widget* right = new osgWidget::Widget("right", 512.0f, 256.0f); - left->setImage("../examples/osgwidgetframe/images/panel-left.tga", true); - center->setImage("../examples/osgwidgetframe/images/panel-center.tga", true); - right->setImage("../examples/osgwidgetframe/images/panel-right.tga", true); + left->setImage ("osgWidget/panel-left.tga", true); + center->setImage("osgWidget/panel-center.tga", true); + right->setImage ("osgWidget/panel-right.tga", true); center->setTexCoordWrapHorizontal(); diff --git a/examples/osgwidgetinput/osgwidgetinput.cpp b/examples/osgwidgetinput/osgwidgetinput.cpp index df4e3699d..3ba9b78c3 100644 --- a/examples/osgwidgetinput/osgwidgetinput.cpp +++ b/examples/osgwidgetinput/osgwidgetinput.cpp @@ -22,8 +22,7 @@ const char* INFO = void setupLabel(osgWidget::Label* label) { label->setFontSize(16); label->setFontColor(1.0f, 1.0f, 1.0f, 1.0f); - // label->setFont("fonts/monospace.ttf"); - label->setFont("fonts/Calibri1.ttf"); + label->setFont("fonts/Vera.ttf"); label->setPadding(2.0f); label->setHeight(18.0f); label->setCanFill(true); diff --git a/examples/osgwidgetlabel/osgwidgetlabel.cpp b/examples/osgwidgetlabel/osgwidgetlabel.cpp index 62498d8d8..c1de3f505 100644 --- a/examples/osgwidgetlabel/osgwidgetlabel.cpp +++ b/examples/osgwidgetlabel/osgwidgetlabel.cpp @@ -25,7 +25,7 @@ const char* LABEL2 = osgWidget::Label* createLabel(const std::string& l, unsigned int size=13) { osgWidget::Label* label = new osgWidget::Label("", ""); - label->setFont("fonts/arial.ttf"); + label->setFont("fonts/Vera.ttf"); label->setFontSize(size); label->setFontColor(1.0f, 1.0f, 1.0f, 1.0f); label->setLabel(l); diff --git a/examples/osgwidgetmenu/osgwidgetmenu.cpp b/examples/osgwidgetmenu/osgwidgetmenu.cpp index c7d926621..24448e456 100644 --- a/examples/osgwidgetmenu/osgwidgetmenu.cpp +++ b/examples/osgwidgetmenu/osgwidgetmenu.cpp @@ -17,7 +17,7 @@ const unsigned int MASK_3D = 0x0F000000; struct ColorLabel: public osgWidget::Label { ColorLabel(const char* label): osgWidget::Label("", "") { - setFont("fonts/Calibri1.ttf"); + setFont("fonts/Vera.ttf"); setFontSize(14); setFontColor(1.0f, 1.0f, 1.0f, 1.0f); setColor(0.3f, 0.3f, 0.3f, 1.0f); diff --git a/examples/osgwidgetnotebook/osgwidgetnotebook.cpp b/examples/osgwidgetnotebook/osgwidgetnotebook.cpp index d9bcac891..db0c489a7 100644 --- a/examples/osgwidgetnotebook/osgwidgetnotebook.cpp +++ b/examples/osgwidgetnotebook/osgwidgetnotebook.cpp @@ -49,7 +49,7 @@ public: osgWidget::Label* label1 = new osgWidget::Label(ss.str()); - label1->setFont("fonts/monospace.ttf"); + label1->setFont("fonts/VeraMono.ttf"); label1->setFontSize(20); label1->setFontColor(1.0f, 1.0f, 1.0f, 1.0f); label1->setColor(0.0f, i / 4.0f, 0.3f, 1.0f); @@ -73,7 +73,7 @@ public: osgWidget::Label* label2 = new osgWidget::Label(ss.str()); - label2->setFont("fonts/monospace.ttf"); + label2->setFont("fonts/Vera.ttf"); label2->setFontSize(15); label2->setFontColor(1.0f, 1.0f, 1.0f, 1.0f); label2->setColor(0.0f, i / 4.0f, 0.3f, 1.0f); @@ -93,7 +93,7 @@ public: osgWidget::Label* label = new osgWidget::Label("label"); - label->setFont("fonts/monospace.ttf"); + label->setFont("fonts/arial.ttf"); label->setFontSize(15); label->setFontColor(1.0f, 1.0f, 1.0f, 1.0f); label->setLabel("Drag the window here..."); diff --git a/examples/osgwidgetscrolled/osgwidgetscrolled.cpp b/examples/osgwidgetscrolled/osgwidgetscrolled.cpp index 37ab9f2fd..f843c7d07 100644 --- a/examples/osgwidgetscrolled/osgwidgetscrolled.cpp +++ b/examples/osgwidgetscrolled/osgwidgetscrolled.cpp @@ -88,7 +88,7 @@ int main(int argc, char** argv) { osgWidget::Frame* frame = osgWidget::Frame::createSimpleFrameWithSingleTexture( "frame", - "../examples/osgwidgetscrolled/theme-2.png", + "osgWidget/theme-2.png", 64.0f, 64.0f, 16.0f, @@ -101,15 +101,15 @@ int main(int argc, char** argv) { // This is our Transformers box. :) osgWidget::Box* box = new osgWidget::Box("images", osgWidget::Box::VERTICAL); - osgWidget::Widget* img1 = new osgWidget::Widget("im1", 256.0f, 256.0f); - osgWidget::Widget* img2 = new osgWidget::Widget("im2", 256.0f, 256.0f); - osgWidget::Widget* img3 = new osgWidget::Widget("im3", 256.0f, 256.0f); - osgWidget::Widget* img4 = new osgWidget::Widget("im4", 256.0f, 256.0f); + osgWidget::Widget* img1 = new osgWidget::Widget("im1", 512.0f, 512.0f); + osgWidget::Widget* img2 = new osgWidget::Widget("im2", 512.0f, 512.0f); + osgWidget::Widget* img3 = new osgWidget::Widget("im3", 512.0f, 512.0f); + osgWidget::Widget* img4 = new osgWidget::Widget("im4", 512.0f, 512.0f); - img1->setImage("../examples/osgwidgetscrolled/images/starscream.jpg", true); - img2->setImage("../examples/osgwidgetscrolled/images/optimus.jpg", true); - img3->setImage("../examples/osgwidgetscrolled/images/megatron.jpg", true); - img4->setImage("../examples/osgwidgetscrolled/images/bumblebee.jpg", true); + img1->setImage("osgWidget/scrolled1.jpg", true); + img2->setImage("osgWidget/scrolled2.jpg", true); + img3->setImage("osgWidget/scrolled3.jpg", true); + img4->setImage("osgWidget/scrolled4.jpg", true); img1->setMinimumSize(10.0f, 10.0f); img2->setMinimumSize(10.0f, 10.0f); diff --git a/examples/osgwidgetshader/osgwidgetshader.cpp b/examples/osgwidgetshader/osgwidgetshader.cpp index a75f143e7..b5eec74ce 100644 --- a/examples/osgwidgetshader/osgwidgetshader.cpp +++ b/examples/osgwidgetshader/osgwidgetshader.cpp @@ -1,6 +1,7 @@ // -*-c++-*- osgWidget - Code by: Jeremy Moles (cubicool) 2007-2008 // $Id: osgwidgetshader.cpp 28 2008-03-26 15:26:48Z cubicool $ +#include #include #include #include @@ -60,12 +61,12 @@ int main(int argc, char** argv) { program->addShader(osg::Shader::readShaderFile( osg::Shader::VERTEX, - "osgWidget/osgwidgetshader-vert.glsl" + osgDB::findDataFile("osgWidget/osgwidgetshader-vert.glsl") )); program->addShader(osg::Shader::readShaderFile( osg::Shader::FRAGMENT, - "osgWidget/osgwidgetshader-frag.glsl" + osgDB::findDataFile("osgWidget/osgwidgetshader-frag.glsl") )); canvas->getGeode()->getOrCreateStateSet()->setAttribute(program);