From 68ac692314de2909889e695bbccf9511698ed122 Mon Sep 17 00:00:00 2001 From: andreja6 Date: Mon, 23 Apr 2018 23:25:06 -0700 Subject: [PATCH] Added final GUI components --- ImageButtonInstance.cpp | 16 ++- ImageButtonInstance.h | 9 ++ content/images/CameraZoomIn.png | Bin 0 -> 1275 bytes content/images/CameraZoomIn_dn.png | Bin 0 -> 955 bytes content/images/CameraZoomIn_ovr.png | Bin 0 -> 971 bytes content/images/CameraZoomOut.png | Bin 0 -> 1514 bytes content/images/CameraZoomOut_dn.png | Bin 0 -> 1267 bytes content/images/CameraZoomOut_ovr.png | Bin 0 -> 1262 bytes main.cpp | 160 ++++++++++++++++++++++++--- 9 files changed, 168 insertions(+), 17 deletions(-) create mode 100644 content/images/CameraZoomIn.png create mode 100644 content/images/CameraZoomIn_dn.png create mode 100644 content/images/CameraZoomIn_ovr.png create mode 100644 content/images/CameraZoomOut.png create mode 100644 content/images/CameraZoomOut_dn.png create mode 100644 content/images/CameraZoomOut_ovr.png diff --git a/ImageButtonInstance.cpp b/ImageButtonInstance.cpp index 5912afa..bbda5d0 100644 --- a/ImageButtonInstance.cpp +++ b/ImageButtonInstance.cpp @@ -7,7 +7,7 @@ G3D::TextureRef image_dn = NULL; int openGLID_dn = 0; Vector2 size; Vector2 position; -ImageButtonInstance::ImageButtonInstance(G3D::TextureRef newImage = NULL, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL) +ImageButtonInstance::ImageButtonInstance(G3D::TextureRef newImage = NULL, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL) { image = newImage; @@ -32,8 +32,20 @@ ImageButtonInstance::~ImageButtonInstance(void) void ImageButtonInstance::drawObj(RenderDevice* rd, Vector2 mousePos, bool mouseDown) { Vector2 positionRelative = position; + if(floatRight && floatBottom) + { + positionRelative = Vector2(rd->getWidth() + position.x, rd->getHeight() + position.y); + } + else if(floatBottom) + { + positionRelative = Vector2(position.x, rd->getHeight() + position.y); + } + else if(floatRight) + { + positionRelative = Vector2(rd->getWidth() + position.x, position.y); + } int renderimage = openGLID; - if(mouseInArea(position.x, position.y, position.x + size.x, position.y + size.y, mousePos.x, mousePos.y)) + if(mouseInArea(positionRelative.x, positionRelative.y, positionRelative.x + size.x, positionRelative.y + size.y, mousePos.x, mousePos.y)) { if(mouseDown && openGLID_dn != 0) { diff --git a/ImageButtonInstance.h b/ImageButtonInstance.h index e215576..c030afd 100644 --- a/ImageButtonInstance.h +++ b/ImageButtonInstance.h @@ -4,9 +4,18 @@ class ImageButtonInstance : public BaseButtonInstance { public: + ImageButtonInstance(G3D::TextureRef); + ImageButtonInstance(G3D::TextureRef,G3D::TextureRef); ImageButtonInstance(G3D::TextureRef,G3D::TextureRef,G3D::TextureRef); + ImageButtonInstance(G3D::TextureRef,G3D::TextureRef,G3D::TextureRef,G3D::TextureRef); ~ImageButtonInstance(void); void drawObj(RenderDevice*, Vector2, bool); Vector2 size; Vector2 position; + G3D::TextureRef image; + int openGLID; + G3D::TextureRef image_ovr; + int openGLID_ovr; + G3D::TextureRef image_dn; + int openGLID_dn; }; diff --git a/content/images/CameraZoomIn.png b/content/images/CameraZoomIn.png new file mode 100644 index 0000000000000000000000000000000000000000..da8f900f29bfcc20110548a7845d39e050fc37a1 GIT binary patch literal 1275 zcmVX1^@s6RQmj^00004XF*Lt006O% z3;baP00009a7bBm000ic000ic0Tn1pfB*mh8FWQhbW?9;ba!ELWdLwtX>N2bZe?^J zG%heMGBNQWX_Wu~1b9hAK~zXfm6pd(Bu5y<=Rf4IN8b?#1PCD+i=3lCAOu4Y$zWSV z0Varx;b5}{?Jfs`2okKw%b0;R#*@qM*Q&+?^f2rvJ#}@}d++#Ez`WUmcSK~$ACogG2v+k{{t6Q$D ztlVmCZM|4tUcTGd*tiF@>0=BITq{c%PjbJd0L`+Yy1M%3^78VvhK7d2xw*M7*Votg z@pwEUeH759k1;rK(V(?9DI;wSjg5^zXofw)QcFwA=FH5@iQ*;}i#^x^;({Brq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?`qzio11gB?=CGZ zS;2nMLoXh@Fkr!iO$J$HlFb^N+S=M2Z^p^V$-{IyeU{B;FLW)h0LfGY3gAvmOt@oX zW88SwaKGrG7Y|-P3pN>Kkx4ddaO&&p^KETy2fBgIy1Kdw9UUFlot>So#;(RivESa_ zUL4D84fl&4dhy`(I55rrHCbem%^DoN1wZQ5{9|x%u%Pjcwyq~Vaz*J*cV#MqY{53s ziwCdA@v}`|jyC1GL0gEz?YRJLr* zh$9;v9W4n86P~KiimlO;z7-`Ql?rc==hv;WHF)ACyU*G1gcnAT>sRO^^o+ZD4VS>H z6%1HGzF*c!Pn_2A@$nLHwSp0PiL8?<{kgf(U4IjV-dC_-mb(gNOK-mm-SHPe;C%%P zromTMTKP#!OUse2?YGs{)swZgwPS5hrE`7IE|!;tQ5tVIew#uUOdKo z0t+T=6BAxTLqj_^}FA-xicS?`x-Ng$7 z7EIVCCcL!jl#Gd{rlz>eNo`Y&jg3#V-H^7Vz2@fT&)Obq{tPiTb9<&|!+27L5r+xe d#Q4f_egk8aM<>hmB4Ypm002ovPDHLkV1lQ*%YOg> literal 0 HcmV?d00001 diff --git a/content/images/CameraZoomIn_ovr.png b/content/images/CameraZoomIn_ovr.png new file mode 100644 index 0000000000000000000000000000000000000000..df86686f37396defa7d41a11c609ee6e1547fe4b GIT binary patch literal 971 zcmV;+12p`JP)X1^@s6RQmj^00001b5ch_0Itp) z=>Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00TQoL_t(YOSP8EPg6k{#qWQ}f~9-Hf&d{T zVt7AGp=kpl& zMzsJ9w9vHjl|zqoScHeOv$HQ;qJIN4(Z<8t-H!hL{`*2?Zf@?GOXOby54`ZS_MX?? z-hQvCscBH}^GPz9eCZ{eq`uh4fJLAmE%uyr~IgiC+ zX}!xUgha{;O2AA{Pn*ffNfw^dJRj6h3kPn#7TS2=g(u$3!E0=6Om%d09BKib_w@8+ zy1KfqySuxM`bPaMxbE!i%=Sfgn&*QWYT>}m>7Z$^ukpeYZ|2}>7ksa+`P<0INJjk| zwI&CBa#?7l8Uvf;UWO- zibgYc50(KOxJBvTC>gF|z@1G@Ot=Tj08Y(M#Z{Pt&I!Xw~013+@24 z&@A;9N``j7v{roD$+`p3Let7u7n=ELTU*<)-tCt}B5}I0v2mjIOt{d2mR?(1yNbu- z*MeDJU(bR*ImW1=7LMhfqJ<{f)~0fdj*jk%^jhaYN=J1{hu2Ox9NrTSg<~C9XFAxv ztIg>8641A~Giq$@9$YlgLKAIkQ#my2u!zBymX?6XA+_P==H^Fgw}fqBzqPgXquLYY t&jEd#+qX4amJ_xb0W{IJHhJNBKLJYARwiNG=EML1002ovPDHLkV1hG&(4+tW literal 0 HcmV?d00001 diff --git a/content/images/CameraZoomOut.png b/content/images/CameraZoomOut.png new file mode 100644 index 0000000000000000000000000000000000000000..144f48ebba1fdaca23b6a2457d2c43315b759cf4 GIT binary patch literal 1514 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;2FkAZe8V00mk}L_t(YOPy9%Pb)_l_0P#ep7Ize4|$3d zMR`X-kq{Cuh#-1L^xlgCgpO#Y*Gn(~LJOCx;42Wl7%#UIPd z%MJ2U4+6yt2!9((OG}%P_+xf<_B9CIRaI5pS5{V9k^BL_?fLoncOZ0#-vja%4?dfS znuPC0B+(#Yt)=31^gGjmEZhm57 z!YZ4$P7dLLzZ?>jhyE6U#AroD#S#4QfMgyuv<99FM@L7`SbvV2H7$qmz&DpCpXQ_r zMMXuOxGCGi!^8IwgQrs~&>}(u7UHnpircjbZ+UrzfUPg{dj9bP1T#Y7PltzxUL{fB zOM(V0B<$_&J!9WBjJqg@@&dMcjex*uR&i4-0|Nuk0CN0CK%G=;kZMm)PkeWG_ahEs zLXUYThx~uQX)fV>2h`xyi4>^klzI9~L^zHUx3;$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--- a/main.cpp +++ b/main.cpp @@ -43,9 +43,6 @@ static G3D::TextureRef go_ovr = NULL; static G3D::TextureRef go_dn = NULL; static float mousex = 0; static float mousey = 0; -static int go_id = 0; -static int go_ovr_id = 0; -static int go_dn_id = 0; static int cursorid = 0; static G3D::TextureRef cursor = NULL; static bool mouseButton1Down = false; @@ -181,9 +178,9 @@ TextButtonInstance* makeTextButton() return part; } -ImageButtonInstance* makeImageButton(G3D::TextureRef newImage = NULL, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL) +ImageButtonInstance* makeImageButton(G3D::TextureRef newImage = NULL, G3D::TextureRef overImage = NULL, G3D::TextureRef downImage = NULL, G3D::TextureRef disableImage = NULL) { - ImageButtonInstance* part = new ImageButtonInstance(newImage,overImage, downImage); + ImageButtonInstance* part = new ImageButtonInstance(newImage,overImage, downImage, disableImage); instances.push_back(part); instances_2D.push_back(part); return part; @@ -318,8 +315,144 @@ void initGUI() button->setAllColorsSame(); ImageButtonInstance* instance = makeImageButton(go, go_ovr, go_dn); - instance->size = Vector2(60,60); - instance->position = Vector2(10, 25); + instance->size = Vector2(65,65); + instance->position = Vector2(6.5, 25); + instance->parent = dataModel; + + + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/ArrowTool.png")), + Texture::fromFile(GetFileInPath("/content/images/ArrowTool_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/ArrowTool_dn.png")), + Texture::fromFile(GetFileInPath("/content/images/ArrowTool_ds.png"))); + instance->size = Vector2(50,50); + instance->position = Vector2(15, 90); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/ArrowTool.png")), + Texture::fromFile(GetFileInPath("/content/images/ArrowTool_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/ArrowTool_dn.png")), + Texture::fromFile(GetFileInPath("/content/images/ArrowTool_ds.png"))); + instance->size = Vector2(40,40); + instance->position = Vector2(0, 140); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/MoveTool.png")), + Texture::fromFile(GetFileInPath("/content/images/MoveTool_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/MoveTool_dn.png")), + Texture::fromFile(GetFileInPath("/content/images/MoveTool_ds.png"))); + instance->size = Vector2(40,40); + instance->position = Vector2(40, 140); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/SelectionRotate.png")), + Texture::fromFile(GetFileInPath("/content/images/SelectionRotate_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/SelectionRotate_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/SelectionRotate_ds.png"))); + instance->size = Vector2(30,30); + instance->position = Vector2(10, 175); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/SelectionTilt.png")), + Texture::fromFile(GetFileInPath("/content/images/SelectionTilt_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/SelectionTilt_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/SelectionTilt_ds.png"))); + instance->size = Vector2(30,30); + instance->position = Vector2(40, 175); + instance->parent = dataModel; + + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/Delete.png")), + Texture::fromFile(GetFileInPath("/content/images/Delete_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/Delete_dn.png")), + Texture::fromFile(GetFileInPath("/content/images/Delete_ds.png"))); + instance->size = Vector2(40,46); + instance->position = Vector2(20, 284); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/Delete.png")), + Texture::fromFile(GetFileInPath("/content/images/Delete_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/Delete_dn.png")), + Texture::fromFile(GetFileInPath("/content/images/Delete_ds.png"))); + instance->size = Vector2(40,46); + instance->position = Vector2(20, 284); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/CameraZoomIn.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraZoomIn_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraZoomIn_dn.png"))); + instance->size = Vector2(34,25); + instance->floatBottom = true; + instance->floatRight = true; + instance->position = Vector2(-77, -90); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/CameraZoomOut.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraZoomOut_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraZoomOut_dn.png"))); + instance->size = Vector2(34,26); + instance->floatBottom = true; + instance->floatRight = true; + instance->position = Vector2(-77, -31); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/CameraPanLeft.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraPanLeft_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraPanLeft_dn.png"))); + instance->size = Vector2(34,34); + instance->floatBottom = true; + instance->floatRight = true; + instance->position = Vector2(-110, -50); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/CameraPanRight.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraPanRight_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraPanRight_dn.png"))); + instance->size = Vector2(34,34); + instance->floatBottom = true; + instance->floatRight = true; + instance->position = Vector2(-45, -50); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/CameraCenter.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraCenter_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraCenter_dn.png"))); + instance->size = Vector2(34,20); + instance->floatBottom = true; + instance->floatRight = true; + instance->position = Vector2(-77, -60); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/CameraTiltUp.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraTiltUp_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraTiltUp_dn.png"))); + instance->size = Vector2(24,24); + instance->floatBottom = true; + instance->floatRight = true; + instance->position = Vector2(-105, -75); + instance->parent = dataModel; + + instance = makeImageButton( + Texture::fromFile(GetFileInPath("/content/images/CameraTiltDown.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraTiltDown_ovr.png")), + Texture::fromFile(GetFileInPath("/content/images/CameraTiltDown_dn.png"))); + instance->size = Vector2(24,24); + instance->floatBottom = true; + instance->floatRight = true; + instance->position = Vector2(-40, -75); instance->parent = dataModel; } @@ -867,11 +1000,11 @@ void Demo::onGraphics(RenderDevice* rd) { //Tools menu - Draw::box(G3D::Box(Vector3(5, 165+offset,0),Vector3(75, 165+offset,0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0.6F,0.6F,0.6F,0.4F)); - fntlighttrek->draw2D(rd,"Group", Vector2(10,170+offset), 12, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); - fntlighttrek->draw2D(rd,"UnGroup", Vector2(10,195+offset), 12, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); - fntlighttrek->draw2D(rd,"Duplicate", Vector2(10,220+offset), 12, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); - fntlighttrek->draw2D(rd,"MENU", Vector2(10,305+offset), 16, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); + Draw::box(G3D::Box(Vector3(5, 185+offset,0),Vector3(75, 185+offset,0)),rd,Color4(0.6F,0.6F,0.6F,0.4F), Color4(0.6F,0.6F,0.6F,0.4F)); + fntlighttrek->draw2D(rd,"Group", Vector2(10,190+offset), 12, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); + fntlighttrek->draw2D(rd,"UnGroup", Vector2(10,215+offset), 12, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); + fntlighttrek->draw2D(rd,"Duplicate", Vector2(10,240+offset), 12, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); + fntlighttrek->draw2D(rd,"MENU", Vector2(10,307+offset), 14, Color3::white(), Color4(0.5F,0.5F,0.5F,0.5F)); //G3D::GFont::draw2D("Debug Mode Enabled", Vector2(0,30), 20, Color3::white(), Color3::black()); //app->debugFont->draw2D("Dynamica 2004-2005 Simulation Client version " + VERSION + str, Vector2(0,0), 20, Color3::white(), Color3::black()); //app->debugFont->draw2D("Debug Mode Enabled", Vector2(0,30), 20, Color3::white(), Color3::black()); @@ -932,9 +1065,6 @@ void App::main() { go_ovr = Texture::fromFile(GetFileInPath("/content/images/Run_ovr.png")); go_dn = Texture::fromFile(GetFileInPath("/content/images/Run_dn.png")); cursor = Texture::fromFile(GetFileInPath("/content/cursor.png")); - go_id = go->getOpenGLID(); - go_dn_id = go_dn->getOpenGLID(); - go_ovr_id = go_ovr->getOpenGLID(); fntdominant = GFont::fromFile(GetFileInPath("/content/font/dominant.fnt")); fntlighttrek = GFont::fromFile(GetFileInPath("/content/font/lighttrek.fnt")); sky = Sky::create(NULL, ExePath() + "/content/sky/");