From c852b713dcc39599493b07dd709f7990bc7443f5 Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Fri, 13 May 2016 07:46:06 -0400 Subject: [PATCH] menu --- assets/NPC.png | Bin 535 -> 473 bytes assets/cat.png | Bin 402 -> 402 bytes assets/player/playerk.png | Bin 473 -> 421 bytes assets/rabbit.png | Bin 296 -> 257 bytes assets/rabbit1.png | Bin 341 -> 295 bytes assets/robin.png | Bin 316 -> 287 bytes assets/style/classic/brazzier.png | Bin 282 -> 235 bytes assets/style/classic/door.png | Bin 289 -> 227 bytes assets/style/classic/fountain1.png | Bin 524 -> 401 bytes assets/style/classic/house1.png | Bin 749 -> 598 bytes assets/style/classic/house2.png | Bin 747 -> 610 bytes assets/style/classic/lampPost1.png | Bin 309 -> 275 bytes assets/style/classic/stall.png | Bin 739 -> 556 bytes assets/style/classic/stallFruit.png | Bin 635 -> 474 bytes assets/style/classic/townhall.png | Bin 802 -> 480 bytes brice.dat | 4 +- src/entities.cpp | 21 +++- src/ui_menu.cpp | 173 +++++++++++++++++----------- xml/playerSpawnHill1.xml | 9 +- 19 files changed, 130 insertions(+), 77 deletions(-) diff --git a/assets/NPC.png b/assets/NPC.png index 2317adeeff5d0bc3fca70a678642595fc529004f..fdebfa93189a744d6271fc43268498fc4017276e 100644 GIT binary patch delta 440 zcmV;p0Z0Cq1la>yiBL{Q4GJ0x0000DNk~Le0000F0000O2nGNE03`*dX#fBK24YJ` zL;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jB$^4lx3HYs!9+ zTP%M)Nkl_Kxz`Wi|Al3!(LS8jMauJ>FGNwK#j9j0 zlGJE6;hd8$U{Dtb!w@%viI%96xoS`st&M+(=eB!p7U}l!Ndk-UW?vzw3yjkY)&9`3 zZKbypKA3TuNko>b{Xwe?0MtMG!fRP$=-Vhi2LJ%kQSZQpz6}5vkt0UrDAg`691zc? z#%VKE0Jxi9OSx;>f4`n;&rDgh3;-|HDFE<^Yn7k3F$eNE|EaOQ9kITQvNlW5t3<)hh2tb i8cQu%J>QS<_xT2SP;yy2pFz$500001wNQpLCkU5c}#PW}Qnoq{-ti?)l4o8aK+Ah?MjLaj^f z@2ci-j7`+b*7pj4?+MVIr9F;O0|rfeow z2z}qzcJe%LqS#gvM`?uP6ng@WRm9av2P}UK?*LfYxCCJC!3E%E(91+>C9&39AszQ5 z>hrSzgfDNF*0J27khZUTsYE6{Ro0b$Ypt%3JJu2_Qd-P+j#;J&@BB`r)H8;Kh; z0{|X_AplE_3IM_Tw9?s>6UAM*gjBR#|Hu@0b#WBBAJ!sWcH8T*NW3)>@1NcRaCU#N zshsbJHLN23e-r2CaZ=)~$Qq9`??7aYmbZ?P+!e$x|m(|su1_+*CQ`>)sI7!yr t9j(b%oo=!n>8hkS|3LDZGN06WPB761SM delta 20 bcmbQlJc)Ti5GRWakF-?AL=(r2(dLW*HgE+g diff --git a/assets/player/playerk.png b/assets/player/playerk.png index 7abf012dc74b06b722c296d4b4722becf05340ed..ea0a7ab5300cfed329f44298e7dd2a5702283c80 100644 GIT binary patch delta 409 zcmV;K0cQT$1Em8qiBL{Q4GJ0x0000DNk~Le0000K0000U2nGNE04x$dYXATM24YJ` zL;(K){{a7>y{D6rAs2rD2XskIMF-#o3=Sa@Egr~A0003pNklEfKXt7{eP&?LQ%Mp4w>jz{=F ztvieb`_rTRE1;nx(G9Wbr^Cwzw1hod&wqU*U`a-^_1xsKt;K#QkEaXVKU_l}4%pm& zJHDOg8$WB7n-N_k0Oq>#dH@W~z188au9Z14*A?2{m|2H9yAU1jKVBT_DS(VE?uD}V zKOxCnSIl)qk}R-1%ci|f0xYm}JOF1M^XoB@k%jRC9^#_I9H{OU00000NkvXXu0mjf DX{)Wo literal 473 zcmV;~0Ve*5P)K5LOAMX(aNrbxD);7(m~88TZj5(G=ht>%wb>(vOsE;{0+2LDP!>j{1V7Q2V2^60@7 P00000NkvXXu0mjfFtf{5 diff --git a/assets/rabbit.png b/assets/rabbit.png index 6f35e9d9a55fd2a674de1c72929cc7fb31449ecd..2920c0be448090221e639b23912cf1a2b478676c 100644 GIT binary patch delta 222 zcmZ3%)W{Uw8Q|y6%O%Cdz`(%k>ERLtr1^oEhl34B?sa4nJa0`PlBg3pY5H=O_6MvydgnPbqH%uhBuBmm z1s<04&OiTy|7GvJ!NI}QS**#vjGHy$urI5^+Kz3jcPaBnPJ4f)YjOGXnIWg<<#L^y zv$0o&Imoa>S7qVcCliupGVHbTieGdn@bk32Em;Mw&F*q@H+?>RL_TIZhxU!*NgvJw P9l_w~>gTe~DWM4fcK1!0 delta 262 zcmZoERLtq~(BEf`bi6zRmRA52VO>_%)r1c48n{Iv*t(u1=&kHeO=k_bMbOpTC42wkDM5-Q{Ut1;uzv_{OPod zTn7|5Tuayd|G)C@^|uSzZl^{XwD;t66CKIO_bux!m)X+-=x8`KWO9^BJ6#b}jp|w!WI- zZ&RhbcBRQx8@Z~x{FcV~DZ46_*63Gljk2F~Z=b=VuTvO9kLiCXHuzHybS#6XtDnm{ Hr-UW|*dAdY diff --git a/assets/rabbit1.png b/assets/rabbit1.png index 6f32c962bc55f5f1d06f76848a7b2455a1398c7e..53092f8608bbc7b3f6ab37170ab0a51d91461eff 100644 GIT binary patch delta 217 zcmV;~04D#{0;d8YiBL{Q4GJ0x0000DNk~Le0000F0000C2nGNE0KG!zRyLg@ZeIdtZ_b zo{3i>0I+Z__20T9c?w!MlNn;4fjN@~!;uv54d7F+kE9_oZtvyJMK1u~nX~-^(a&l` TDReO?00000NkvXXu0mjf-LF{Q delta 263 zcmV+i0r>u>0@VT`iBL{Q4GJ0x0000DNk~Le0000U0000O2nGNE0PSf_zmXv@3f~G1 z3I`?69+dQl3CoFe_{|eD-h`=4KzwP%vp(Ydxw3^$Z-ym!=oC$C$|vo_|q!)cT2{gNv_ zWWH3k*t#_}O7`*ZLqW0(Zz?Ue`Y$zLm^0_)_67SSk4NnL!t7#{_5Xs1ZX3{*44$rj JF6*2Ung9iUP;>wQ delta 238 zcmbQww1-KtGr-TCmrII^fq{Y7)59eQNK1e)2OE%lP;UEUqM`xUeJ&|(LyH}YexIEf zty90i)5S5w<9PC)|Nrfobs2@3dk<>&pIsm50w%OMBDu2B1)dr;B5V#p$<`5Aq&R;Bft4t|$KD zNbG^VFP55KQF6JoWO|WM<8gkC54Y3R`raQ6xYBCD!1=)GX+^qArHRV&HRZRnd>Ox8 zV`zA~RyUA8FZAltG#1^1CP$dQzCF{R{vgmgbO~3U*^!s$GJLpZU5u$`n0Y9}rdsWv aD*u%t8^%RDFD?YSfx*+&&t;ucLK6VqTT}P| literal 282 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbB*pj^6U4S$Y{B+)352QE?JR*x3 z7`TN&n2}-D90{Nxdx@v7EBgaRUS1x(T*Zm^fkMkYT^vIq4!@o1&DWs7X+FbH59v@UsznX zW!;O_eE};ho_Kt{rnu(xDq|5gqYWWioTC5#brim2NcTFb^NQoAgRx}PtflE?K7zld zint$BS@`OEamTaXdLCA>qe)2i60J4jeeJVWN}spG3BU2l8~fVmc=zJD79C7MXJv`S64=EoSSL za@o4aO=Grz^6@5Z?gyu>3>0i8&V88s&;QgOH6ZI?)LhQp-5#g@{FVdQ&MBb@0M$o8nE(I) delta 249 zcmaFNxR6P)Gr-TCmrII^fq{Y7)59eQNUH#`4F?;LEalYaqsPo-JA^uBCQXT1!N8=${f0ND{#)yz%|B`nU`F0(`5;)d8+k)ZH|zgKSza+ z3a^og-!Zkh^1DtCboC@}|C-aceI{Ko_gAcQs+_%2XU?fZx(1isr)B(-y}WnMrC%prt+>07v!r^L uEmSwqm|eDa?UJ_t4{`FI`fOV68IG^>rMYvNRaO9<&fw|l=d#Wzp$P!v0AEZ1 diff --git a/assets/style/classic/fountain1.png b/assets/style/classic/fountain1.png index 46f7c44a05bbdbab278a02ef6b1483fe07d68dd8..78b8f1f03358eb83859c23519e33275095381b32 100644 GIT binary patch delta 343 zcmeBSnaFJ18Q|y6%O%Cdz`(%k>ERLtq`iUIhJy`A>Sel522yNE-tI08|3PrU-sO`g zD#~#^VCCU66=L2XFE`OsyPn~zr;B4q#jUru4hl6Xh_D7^{P`bW_cm+RNdxEkM|O6X z^;YdU;4oE5Ny(@>>yYW=Hw1R&Ft!Mi3FPfdxpswES(L>sHrx+25;r-rn`~GN#gP&wz4I z9!ypF_jV^=EU$50sa;X42~Q$O@3aF=tgnS`&pq(rXj%FZ`@?BDi(eH>v#;5BzvgBs z({F~aKNzmHZIXHy!P{N7HF{~J>@3sT-S@V7ZMHJazE!ps#4yX=RaTpIRcuY>fvAA! hji*%9g?+oN>zV8lI|aY;ssaOv!PC{xWt~$(69C*Mjrsrp literal 524 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{wgAGUu_;U*YDb50q$YKTtZeb8+WSBKa0w~B{ z;_2(kexHY%S5wh;SJ57zkZfj1M2T~LZfKy2lI~nU7uqn&?&1p-k$ZM2KAdS-fV7>g?jG zx4L5IA}UwQsN1eH7USSfRMZg=JLD9hpwrU2!65=D(6|98zyuU;VFikFa0A5!P!+nS zYS+Jxso>WU>yG?q?XmvX-gnmfVs9p)>I@0``1t;ZxJaE@TEDj+())jV=d1f7x*)r- znF+Q0Ape<*-`9!jh+WMoe_68gb?X!F2cOp|b-Uh@%$C+Yee~keD$~@B9`QP-k3L-b zDO#}}#JcVc6jIe`IVzQ|ldfAff31#~UMmN;on5kJ_Q#JmPbEDJ>e!I*UGj9~X(&hG zeb3W1PjgZ?uGk(i?Q~G2&MVz(w~H2XcDv4E|B&Evyd!+WOi&nmy85}Sb4q9e0B)Dc A?*IS* diff --git a/assets/style/classic/house1.png b/assets/style/classic/house1.png index ce97a810d2e11a47e8c0876fd6239e8e1476232a..f5acc2448a9c4b4a63f8413eaf2882841f257dba 100644 GIT binary patch delta 541 zcmV+&0^0000y2nGNE04`}qlK=n!24YJ` zL;(K){{a7>y{D6rAs!0g1q==~0f!D=z>!HSe*wBlL_t(|+U;5~Zo)tiyhSc}0u@RF z^z?3c249F!evl$xu=q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aqVKBztM!MDpV}?$ut7kFg`0)@ zpwor~-;eJVa)0}s_wBE*h}(bnXU(#W344yMTCb89H(mVn>JMM9ht|(sdFQa=_2R2Q zGfZ0o!e83d#+m<53H$7mv69B6iMOeN3tEdBoW#eYN*j z#?;ME%6We4dyc7CVP0z;^J=wg=%E30@kEvImn^%y*n5xK&&c_?d+Otb*=;6b%|Doa YUE1uPEdKEUFdZ^@y85}Sb4q9e0OJ8YDF6Tf diff --git a/assets/style/classic/house2.png b/assets/style/classic/house2.png index 7404cd9178f6b9b2f2351a6e46804db02f37db7a..0a981706524eeca28e4036a101d2d03d487ade96 100644 GIT binary patch delta 553 zcmV+^0@nTO1>yuViBL{Q4GJ0x0000DNk~Le0000>0000y2nGNE04`}qlK=n!24YJ` zL;(K){{a7>y{D6rAs!0g1q==}EZfR6^pQy`e*wlxL_t(|+U;5~Zo)tiyp3ETB&cZU zpx^~b$xkRErOsngP({jLD3ceYARP@AmJscwNE{jBv+s1f=e0dkp~Kj7K-z>u43#>|#<{3J%F%))|?UI`~J0|rtauTsb z44Iu}`{bsWj!8p`U2HTF!-yE#A-c)8W75!SQ%o&G38e#kHEle?Xe6jyJtj4|fr zbaH<8Je_(U!+9fI6O!VJn#EbOQsMDo@o((y{mVIyZiuDB0Atux^n8y=0coyq7N@hM z+c77wbU=ZJSg2Xja4j^;;~$@spRrZDTq|E#?Dj{tjcIv5S8RSm&tHgjzsjS}Ulqdj z_Ju_!wmaKR@hR6=v)0R*Ipmkx#}y%Wsq6%9q~w~_ktl2)I~i$kac$z8X_zdxXjnR6 rodvNV767sOx82c#%0J)&)f#;R$r;1=4^^cW00000NkvXXu0mjfU1s@7 literal 747 zcmeAS@N?(olHy`uVBq!ia0vp^(}1{wgAGUu_;U*YDb50q$YKTtZeb8+WSBKa0w~B{ z;_2(kexHYn*Iek`bZ?M4+02lL66gHf+|;}hAeVu`xhOTUBsE2$JhLQ2!QIn0AVn{g zoq>TV(bL5-q~g}wyM}(R9Yk0InpXrYS+Zzhvyyhhq`3hKftw|`v{b%1acVDU=u-<- za^13UlZ%g2Qgu)IvFB6b89%nqF8`~b=E^8*QNUuoc1~<K<_4O1>qkzXnpjh-)|QVqWqfs5xI;4@Z?>ET)YrV$38GKb=m1nU zM3H$VP%vuERB2)EP!Bnv+QlEAWh5=+^4!jKRo*cRXp88iFws@^P1hH7wrZ(d)M63t zexZKNZ1p0IuGOD~mmkqT|9-Q*aSBk2AkZ=vpc6JYY!HAk6=p2nCI8{^_FI8oU$08+ zoV&WyRYrJqiIrX7EBjA7e|RM+y{US(ylkDCSf!jCMgPc`_(XSoW4_K-6s(xP%89v^>bP0l+XkK8=yFM diff --git a/assets/style/classic/lampPost1.png b/assets/style/classic/lampPost1.png index 24f180712229c46a000061def2ccaf031d5b08de..8106a4d5d3525f708e536dac9cb8b10ba9b72de6 100644 GIT binary patch delta 261 zcmdnWG?~e`Gr-TCmrII^fq{Y7)59eQNb>`+4F?;L+-dQ^6G*WodAqwX{0G4WdzVk1 zs3=j-UgGKN%Km_rhtEVlMJnhKP}KrY7sn8f1p}NY7y+3#oR4&ffcon%}JREymn4Cl=Ielu*AT)+AM;_M?y49b3I&GlD5 zD%rg2U9O0&&lDA=S6OC#zZ*go%?jsy>`~tGQsBI&MUX^c=Ij|Y2bxaTMi{a6F3t-1 zyy98l*~PQmP5ZOtuG%~}%eBhtx4mXnL`R{K-g5q!5Jm>&LuT20;ccNn$1-@j`njxg HN@xNAm;+(- literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^azI?c!3HFs&UJbUq&N#aB8wRqxP?KOkzv*x383I} zPZ!6KjC*fyDe@f(;5qiO&qv8Xrg4El%kMV@yZId#aJU~(_`uJcCb_uQX4AfB_gPFY z$;aRNsHWx=DB|k6?#r)~t4ZtP@205z-5D<0Il1FR(SEtTKP>M0*v6{Q^O-gKPW_`x zd(*w|WbOYk@8ib!-Z=Y`?+<%k-+r~kbCt)vD^q_I-AggO_imk?F!S;D=(n|*d;1^H zIo|d^>)d0n^T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st0Hm>FApigX diff --git a/brice.dat b/brice.dat index 61d57c2..ea71945 100644 --- a/brice.dat +++ b/brice.dat @@ -1,5 +1,5 @@ 2 -canJump -0 canSprint 0 +canJump +0 diff --git a/src/entities.cpp b/src/entities.cpp index 5084fd6..14e1503 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -143,8 +143,6 @@ void Entity::setCooldown(unsigned int c) hitCooldown = c; } - - void Entity::handleHits(void) { hitCooldown = fmax(hitCooldown - game::time::getDeltaTime(), 0); @@ -203,6 +201,9 @@ Player::Player() : Entity() }); inv = new Inventory(PLAYER_INV_SIZE); + dim2 tmpDim = Texture::imageDim(tex.getTexturePath(0)); + width = HLINES(tmpDim.x/2); + height = HLINES(tmpDim.y/2); } Player::~Player() @@ -230,6 +231,10 @@ NPC::NPC() : Entity() randDialog = rand() % RAND_DIALOG_COUNT - 1; dialogIndex = 0; dialogCount = 0; + + dim2 tmpDim = Texture::imageDim(tex.getTexturePath(0)); + width = HLINES(tmpDim.x/2); + height = HLINES(tmpDim.y/2); } NPC::~NPC() @@ -261,6 +266,10 @@ Merchant::Merchant() : NPC() //randDialog = rand() % RAND_DIALOG_COUNT - 1; dialogIndex = 0; + + dim2 tmpDim = Texture::imageDim(tex.getTexturePath(0)); + width = HLINES(tmpDim.x/2); + height = HLINES(tmpDim.y/2); } Merchant::~Merchant() @@ -832,14 +841,14 @@ unsigned int Structures::spawn(BUILD_SUB sub, float x, float y) { case STALL_MARKET: tex = TextureIterator({ textureLoc }); dim = Texture::imageDim(textureLoc); - width = dim.x; - height = dim.y; + width = HLINES(dim.x/2); + height = HLINES(dim.y/2); break; default: tex = TextureIterator({ textureLoc }); dim = Texture::imageDim(textureLoc); - width = dim.x; - height = dim.y; + width = HLINES(dim.x/2); + height = HLINES(dim.y/2); inv = NULL; break; } diff --git a/src/ui_menu.cpp b/src/ui_menu.cpp index c9510c2..e766b61 100644 --- a/src/ui_menu.cpp +++ b/src/ui_menu.cpp @@ -106,6 +106,11 @@ namespace ui { SDL_Event e; + useShader(&textShader, + &textShader_uniform_texture, + &textShader_attribute_coord, + &textShader_attribute_tex); + setFontSize(24); game::config::update(); @@ -133,9 +138,24 @@ namespace ui { } } - //draw the dark transparent background + static GLuint backTex = Texture::genColor(Color(0, 0, 0, 204)); + //static GLuint bsTex = Texture::genColor(Color(30, 30, 30)); + static GLuint border = Texture::genColor(Color(245, 245, 245)); + + GLfloat line_tex[] = {0.0, 0.0, + 1.0, 0.0, + 1.0, 1.0, + 0.0, 1.0, + 0.0, 0.0}; + + //draw the dark transparent background glColor4f(0.0f, 0.0f, 0.0f, .8f); - glRectf(offset.x-SCREEN_WIDTH/2,-SCREEN_HEIGHT/2,offset.x+SCREEN_WIDTH/2,SCREEN_HEIGHT/2); + glUseProgram(textShader); + + glBindTexture(GL_TEXTURE_2D, backTex); + drawRect(vec2(offset.x - SCREEN_WIDTH / 2, offset.y - (SCREEN_HEIGHT / 2)), vec2(offset.x + SCREEN_WIDTH / 2, offset.y + (SCREEN_HEIGHT / 2))); + + glUseProgram(0); //loop through all elements of the menu for (auto &m : currentMenu->items) { @@ -143,11 +163,13 @@ namespace ui { if (m.member == 0 || m.member == -1 || m.member == -2) { //draw the button background - glColor3f(m.button.color.red,m.button.color.green,m.button.color.blue); - glRectf(offset.x+m.button.loc.x, - offset.y+m.button.loc.y, - offset.x+m.button.loc.x + m.button.dim.x, - offset.y+m.button.loc.y + m.button.dim.y); + GLuint bsTex = Texture::genColor(Color(m.button.color.red,m.button.color.green,m.button.color.blue)); + + glUseProgram(textShader); + glBindTexture(GL_TEXTURE_2D, bsTex); + + drawRect(vec2(offset.x + m.button.loc.x, offset.y + m.button.loc.y), + vec2(offset.x + m.button.loc.x + m.button.dim.x, offset.y + m.button.loc.y + m.button.dim.y)); //draw the button text putStringCentered(offset.x + m.button.loc.x + (m.button.dim.x/2), (offset.y + m.button.loc.y + (m.button.dim.y/2)) - ui::fontSize/2, @@ -158,15 +180,25 @@ namespace ui { if (mouse.y >= offset.y+m.button.loc.y && mouse.y <= offset.y+m.button.loc.y + m.button.dim.y) { //if the mouse if over the button, it draws this white outline - glColor3f(1.0f,1.0f,1.0f); - glBegin(GL_LINE_STRIP); - glVertex2f(offset.x+m.button.loc.x, offset.y+m.button.loc.y); - glVertex2f(offset.x+m.button.loc.x+m.button.dim.x, offset.y+m.button.loc.y); - glVertex2f(offset.x+m.button.loc.x+m.button.dim.x, offset.y+m.button.loc.y+m.button.dim.y); - glVertex2f(offset.x+m.button.loc.x, offset.y+m.button.loc.y+m.button.dim.y); - glVertex2f(offset.x+m.button.loc.x, offset.y+m.button.loc.y); - glEnd(); - + glBindTexture(GL_TEXTURE_2D, border); + + GLfloat verts[] = {offset.x+m.button.loc.x, offset.y+m.button.loc.y, 1.0, + offset.x+m.button.loc.x+m.button.dim.x, offset.y+m.button.loc.y, 1.0, + offset.x+m.button.loc.x+m.button.dim.x, offset.y+m.button.loc.y+m.button.dim.y, 1.0, + offset.x+m.button.loc.x, offset.y+m.button.loc.y+m.button.dim.y, 1.0, + offset.x+m.button.loc.x, offset.y+m.button.loc.y, 1.0}; + + glUseProgram(textShader); + glEnableVertexAttribArray(textShader_attribute_coord); + glEnableVertexAttribArray(textShader_attribute_tex); + + glVertexAttribPointer(textShader_attribute_coord, 3, GL_FLOAT, GL_FALSE, 0, verts); + glVertexAttribPointer(textShader_attribute_tex, 2, GL_FLOAT, GL_FALSE, 0, line_tex); + glDrawArrays(GL_LINE_STRIP, 0, 5); + + glDisableVertexAttribArray(textShader_attribute_coord); + glDisableVertexAttribArray(textShader_attribute_tex); + //if the mouse is over the button and clicks if (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(SDL_BUTTON_LEFT)) { switch(m.member) { @@ -206,27 +238,25 @@ namespace ui { m.slider.sliderLoc = m.slider.minValue + (*m.slider.var/m.slider.maxValue)*(m.slider.dim.x-sliderW); } //draw the background of the slider - glColor4f(m.slider.color.red,m.slider.color.green,m.slider.color.blue, .5f); - glRectf(offset.x+m.slider.loc.x, - offset.y+m.slider.loc.y, - offset.x+m.slider.loc.x + m.slider.dim.x, - offset.y+m.slider.loc.y + m.slider.dim.y); - - //draw the slider handle - glColor4f(m.slider.color.red,m.slider.color.green,m.slider.color.blue, 1.0f); - if (m.slider.dim.y > m.slider.dim.x) { - glRectf(offset.x+m.slider.loc.x, - offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05), - offset.x+m.slider.loc.x + sliderW, - offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH); + glUseProgram(textShader); + GLuint bsTex = Texture::genColor(Color(m.slider.color.red, m.slider.color.green, m.slider.color.blue, 175)); + GLuint hTex = Texture::genColor(Color(m.slider.color.red, m.slider.color.green, m.slider.color.blue, 255)); + + glBindTexture(GL_TEXTURE_2D, bsTex); + drawRect(vec2(offset.x + m.slider.loc.x, offset.y + m.slider.loc.y), + vec2(offset.x + m.slider.loc.x + m.slider.dim.x, offset.y + m.slider.loc.y + m.slider.dim.y)); + + //draw the slider handle + glBindTexture(GL_TEXTURE_2D, hTex); + if (m.slider.dim.y > m.slider.dim.x) { + drawRect(vec2(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)), + vec2(offset.x+m.slider.loc.x + sliderW, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH)); //draw the now combined slider text putStringCentered(offset.x + m.slider.loc.x + (m.slider.dim.x/2), (offset.y + m.slider.loc.y + (m.slider.dim.y*1.05)) - ui::fontSize/2, outSV); }else{ - glRectf(offset.x+m.slider.loc.x+m.slider.sliderLoc, - offset.y+m.slider.loc.y, - offset.x+m.slider.loc.x + m.slider.sliderLoc + sliderW, - offset.y+m.slider.loc.y + sliderH); + drawRect(vec2(offset.x+m.slider.loc.x+m.slider.sliderLoc, offset.y+m.slider.loc.y), + vec2(offset.x+m.slider.loc.x + m.slider.sliderLoc + sliderW, offset.y+m.slider.loc.y + sliderH)); //draw the now combined slider text putStringCentered(offset.x + m.slider.loc.x + (m.slider.dim.x/2), (offset.y + m.slider.loc.y + (m.slider.dim.y/2)) - ui::fontSize/2, outSV); @@ -236,31 +266,46 @@ namespace ui { if (mouse.y >= offset.y+m.slider.loc.y && mouse.y <= offset.y+m.slider.loc.y + m.slider.dim.y) { //if it is we draw a white border around it - glColor3f(1.0f,1.0f,1.0f); - glBegin(GL_LINE_STRIP); - glVertex2f(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y); - glVertex2f(offset.x+m.slider.loc.x+m.slider.dim.x, offset.y+m.slider.loc.y); - glVertex2f(offset.x+m.slider.loc.x+m.slider.dim.x, offset.y+m.slider.loc.y+m.slider.dim.y); - glVertex2f(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y+m.slider.dim.y); - glVertex2f(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y); + glBindTexture(GL_TEXTURE_2D, border); + glUseProgram(textShader); + + glEnableVertexAttribArray(textShader_attribute_coord); + glEnableVertexAttribArray(textShader_attribute_tex); + + GLfloat box_border[] = {offset.x+m.slider.loc.x, offset.y+m.slider.loc.y, 1.0, + offset.x+m.slider.loc.x+m.slider.dim.x, offset.y+m.slider.loc.y, 1.0, + offset.x+m.slider.loc.x+m.slider.dim.x, offset.y+m.slider.loc.y+m.slider.dim.y, 1.0, + offset.x+m.slider.loc.x, offset.y+m.slider.loc.y+m.slider.dim.y, 1.0, + offset.x+m.slider.loc.x, offset.y+m.slider.loc.y, 1.0}; + + glVertexAttribPointer(textShader_attribute_coord, 3, GL_FLOAT, GL_FALSE, 0, box_border); + glVertexAttribPointer(textShader_attribute_tex, 2, GL_FLOAT, GL_FALSE, 0, line_tex); + glDrawArrays(GL_LINE_STRIP, 0, 5); + if (m.slider.dim.y > m.slider.dim.x) { + //and a border around the slider handle + GLfloat handle_border[] = {offset.x+m.slider.loc.x, static_cast(offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)), 1.0, + offset.x+m.slider.loc.x + sliderW, static_cast(offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)), 1.0, + offset.x+m.slider.loc.x + sliderW, static_cast(offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH), 1.0, + offset.x+m.slider.loc.x, static_cast(offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH), 1.0, + offset.x+m.slider.loc.x, static_cast(offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)), 1.0}; + glVertexAttribPointer(textShader_attribute_coord, 3, GL_FLOAT, GL_FALSE, 0, handle_border); + glVertexAttribPointer(textShader_attribute_tex, 2, GL_FLOAT, GL_FALSE, 0, line_tex); + glDrawArrays(GL_LINE_STRIP, 0, 5); + }else{ + //and a border around the slider handle + GLfloat handle_border[] = {offset.x+m.slider.loc.x + m.slider.sliderLoc, offset.y+m.slider.loc.y, 1.0, + offset.x+m.slider.loc.x + (m.slider.sliderLoc + sliderW), offset.y+m.slider.loc.y, 1.0, + offset.x+m.slider.loc.x + (m.slider.sliderLoc + sliderW), offset.y+m.slider.loc.y+m.slider.dim.y,1.0, + offset.x+m.slider.loc.x + m.slider.sliderLoc, offset.y+m.slider.loc.y+m.slider.dim.y, 1.0, + offset.x+m.slider.loc.x + m.slider.sliderLoc, offset.y+m.slider.loc.y, 1.0}; + glVertexAttribPointer(textShader_attribute_coord, 3, GL_FLOAT, GL_FALSE, 0, handle_border); + glVertexAttribPointer(textShader_attribute_tex, 2, GL_FLOAT, GL_FALSE, 0, line_tex); + glDrawArrays(GL_LINE_STRIP, 0, 5); + } - if (m.slider.dim.y > m.slider.dim.x) { - //and a border around the slider handle - glVertex2f(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)); - glVertex2f(offset.x+m.slider.loc.x + sliderW, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)); - glVertex2f(offset.x+m.slider.loc.x + sliderW, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH); - glVertex2f(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH); - glVertex2f(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)); - }else{ - //and a border around the slider handle - glVertex2f(offset.x+m.slider.loc.x + m.slider.sliderLoc, offset.y+m.slider.loc.y); - glVertex2f(offset.x+m.slider.loc.x + (m.slider.sliderLoc + sliderW), offset.y+m.slider.loc.y); - glVertex2f(offset.x+m.slider.loc.x + (m.slider.sliderLoc + sliderW), offset.y+m.slider.loc.y+m.slider.dim.y); - glVertex2f(offset.x+m.slider.loc.x + m.slider.sliderLoc, offset.y+m.slider.loc.y+m.slider.dim.y); - glVertex2f(offset.x+m.slider.loc.x + m.slider.sliderLoc, offset.y+m.slider.loc.y); - } - glEnd(); + glDisableVertexAttribArray(textShader_attribute_coord); + glDisableVertexAttribArray(textShader_attribute_tex); //if we are inside the slider and click it will set the slider to that point if (SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(SDL_BUTTON_LEFT)) { @@ -268,20 +313,16 @@ namespace ui { if (m.slider.dim.y > m.slider.dim.x) { *m.slider.var = (((mouse.y-offset.y) - m.slider.loc.y)/m.slider.dim.y)*100; //draw a white box over the handle - glColor3f(1.0f,1.0f,1.0f); - glRectf(offset.x+m.slider.loc.x, - offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05), - offset.x+m.slider.loc.x + sliderW, - offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH); + glBindTexture(GL_TEXTURE_2D, border); + drawRect(vec2(offset.x+m.slider.loc.x, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05)), + vec2(offset.x+m.slider.loc.x + sliderW, offset.y+m.slider.loc.y + (m.slider.sliderLoc * 1.05) + sliderH)); }else{ *m.slider.var = (((mouse.x-offset.x) - m.slider.loc.x)/m.slider.dim.x)*100; //draw a white box over the handle - glColor3f(1.0f,1.0f,1.0f); - glRectf(offset.x+m.slider.loc.x + m.slider.sliderLoc, - offset.y+m.slider.loc.y, - offset.x+m.slider.loc.x + (m.slider.sliderLoc + sliderW), - offset.y+m.slider.loc.y + m.slider.dim.y); + glBindTexture(GL_TEXTURE_2D, border); + drawRect(vec2(offset.x+m.slider.loc.x + m.slider.sliderLoc, offset.y+m.slider.loc.y), + vec2(offset.x+m.slider.loc.x + (m.slider.sliderLoc + sliderW), offset.y+m.slider.loc.y + m.slider.dim.y)); } } diff --git a/xml/playerSpawnHill1.xml b/xml/playerSpawnHill1.xml index 3a831ce..d886df8 100644 --- a/xml/playerSpawnHill1.xml +++ b/xml/playerSpawnHill1.xml @@ -19,7 +19,7 @@ - + @@ -71,13 +71,16 @@ And it wasn't stormy. - Broooooooooooooo... + Broooooooooooooo... - Hey friend! It's dangerous out there, here take these! + Hey friend! It's dangerous out there, here take these! + + + Wait, promise you'll stop by my stand in the local market! -- 2.39.5