diff --git a/Adventures in Lestoria/ScrollableWindowComponent.h b/Adventures in Lestoria/ScrollableWindowComponent.h index 24786692..5980369a 100644 --- a/Adventures in Lestoria/ScrollableWindowComponent.h +++ b/Adventures in Lestoria/ScrollableWindowComponent.h @@ -186,10 +186,23 @@ protected: bool mouseOverScrollbar=geom2d::overlaps(geom2d::rect(windowAbsPos+vf2d{rect.size.x-12,scrollBarTop+12},{12,scrollBarHeight}),game->GetMousePos()); + auto ScrollToClickedPosition=[&](){ + float spaceBetweenTopAndBottomArrows=rect.size.y-24; + float viewHeight=rect.size.y; + + float totalContentHeight=bounds.size.y; + if(totalContentHeight==0)totalContentHeight=1; + float scrollBarScale=(spaceBetweenTopAndBottomArrows/totalContentHeight); + //The scroll amount moves centered on the position the mouse is at. + float newScrollbarTop=(game->GetMousePos().y-windowAbsPos.y-12)-scrollBarHeight/2; + SetScrollAmount({GetScrollAmount().x,(-newScrollbarTop+1)/scrollBarScale}); + }; + if(mouseOverScrollbar||scrollBarSelected){ scrollBarHoverTime=std::min(scrollBarHoverTime+game->GetElapsedTime(),"ThemeGlobal.HighlightTime"_F); if(game->GetMouse(0).bPressed&&!geom2d::contains(rect,bounds)){ scrollBarSelected=true; + Menu::menus[parentMenu]->alreadyClicked=true; } if(game->GetMouse(0).bReleased){ scrollBarSelected=false; @@ -197,18 +210,16 @@ protected: } if(scrollBarSelected){ Menu::scrolling=true; - float spaceBetweenTopAndBottomArrows=rect.size.y-24; - float viewHeight=rect.size.y; - - float totalContentHeight=bounds.size.y; - if(totalContentHeight==0)totalContentHeight=1; - float scrollBarScale=(spaceBetweenTopAndBottomArrows/totalContentHeight); - //The scroll amount moves centered on the position the mouse is at. - float newScrollbarTop=(game->GetMousePos().y-windowAbsPos.y-12)-scrollBarHeight/2; - SetScrollAmount({GetScrollAmount().x,(-newScrollbarTop+1)/scrollBarScale}); + ScrollToClickedPosition(); } }else{ scrollBarHoverTime=std::max(scrollBarHoverTime-game->GetElapsedTime(),0.f); + //It's possible to still scroll by clicking outside the scrollbar but in the scroll region. + if(game->GetMouse(0).bHeld&&!geom2d::contains(rect,bounds)&& + geom2d::overlaps(geom2d::rect(windowAbsPos+vf2d{rect.size.x-12.f,12.f},{12.f,rect.size.y-12.f}),game->GetMousePos())){ + ScrollToClickedPosition(); + Menu::menus[parentMenu]->alreadyClicked=true; + } } if(game->GetMouseWheel()!=0){ diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index ada871f3..27ddf9dd 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -8,4 +8,7 @@ Materials for initial craft seems to be wrong? need to recheck do we need a minimap? (maybe with fog of war?) Maybe polling that once testing with more people. should gemstones dropp from boss stages aswell? (Maybe lower droprate?) -Toggle for displaying error messages \ No newline at end of file +Toggle for displaying error messages + +Equip Gear using Start menu tutorial +Steam Controller SDK \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 2ffe284c..433834bc 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 5 #define VERSION_PATCH 1 -#define VERSION_BUILD 8151 +#define VERSION_BUILD 8155 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryCapsule.png b/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryCapsule.png new file mode 100644 index 00000000..acde09fb Binary files /dev/null and b/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryCapsule.png differ diff --git a/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryHero.png b/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryHero.png new file mode 100644 index 00000000..2196fc70 Binary files /dev/null and b/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryHero.png differ diff --git a/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryLogo.png b/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryLogo.png new file mode 100644 index 00000000..b111aea2 Binary files /dev/null and b/Adventures in Lestoria/assets/AdventuresInLestoria_LibraryLogo.png differ diff --git a/Adventures in Lestoria/assets/BlueSlime_120.png b/Adventures in Lestoria/assets/BlueSlime_120.png new file mode 100644 index 00000000..a9a9f6ea Binary files /dev/null and b/Adventures in Lestoria/assets/BlueSlime_120.png differ diff --git a/Adventures in Lestoria/assets/GreenSlime_120.jpg b/Adventures in Lestoria/assets/GreenSlime_120.jpg new file mode 100644 index 00000000..89e0a0eb Binary files /dev/null and b/Adventures in Lestoria/assets/GreenSlime_120.jpg differ diff --git a/Adventures in Lestoria/assets/GreenSlime_120.png b/Adventures in Lestoria/assets/GreenSlime_120.png new file mode 100644 index 00000000..a284759f Binary files /dev/null and b/Adventures in Lestoria/assets/GreenSlime_120.png differ diff --git a/Adventures in Lestoria/assets/LinuxIcons.zip b/Adventures in Lestoria/assets/LinuxIcons.zip new file mode 100644 index 00000000..94099e1d Binary files /dev/null and b/Adventures in Lestoria/assets/LinuxIcons.zip differ diff --git a/Adventures in Lestoria/assets/RedSlime_120.jpg b/Adventures in Lestoria/assets/RedSlime_120.jpg new file mode 100644 index 00000000..34b65a15 Binary files /dev/null and b/Adventures in Lestoria/assets/RedSlime_120.jpg differ diff --git a/Adventures in Lestoria/assets/RedSlime_120.png b/Adventures in Lestoria/assets/RedSlime_120.png new file mode 100644 index 00000000..e5fede6b Binary files /dev/null and b/Adventures in Lestoria/assets/RedSlime_120.png differ diff --git a/Adventures in Lestoria/assets/config/credits.txt b/Adventures in Lestoria/assets/config/credits.txt index d06f1bb9..f79d3365 100644 --- a/Adventures in Lestoria/assets/config/credits.txt +++ b/Adventures in Lestoria/assets/config/credits.txt @@ -12,56 +12,60 @@ Credits LINE[9]="Music Design" LINE[10]="#5DE2E7A2Z#FFFFFF" LINE[11]=" " - LINE[12]="Tools & Tech" - LINE[13]="~~~~~~~~~~~~~~~~" - LINE[14]="Game Engine" - LINE[15]="#FE9900javidx9#FFFFFF" - LINE[16]="#FEF500olc::PixelGameEngine v.2.24#FFFFFF" - LINE[17]=" " - LINE[18]="olcPGEX_MiniAudio Copyright© 2024 by Moros Smith under the OLC-3 License" - LINE[19]=" " - LINE[20]="olcPGEX_ViewPort by Gorbit99" - LINE[21]=" " - LINE[22]="miniaudio library Copyright© 2024 by David Reid under the MIT No Attribution License" - LINE[23]="Ogg Vorbis audio decoder - v1.22 - public domain http://nothings.org/stb_vorbis/" + LINE[12]="Story & Background Artists" + LINE[13]="#A70002Scarlet#FFFFFF" + LINE[14]="&" + LINE[15]="#D8F4F5Killer Rabbit Media#FFFFFF" + LINE[16]=" " + LINE[17]="Tools & Tech" + LINE[18]="~~~~~~~~~~~~~~~~" + LINE[19]="Game Engine" + LINE[20]="#FE9900javidx9#FFFFFF" + LINE[21]="#FEF500olc::PixelGameEngine v.2.25#FFFFFF" + LINE[22]=" " + LINE[23]="olcPGEX_MiniAudio Copyright© 2024 by Moros Smith under the OLC-3 License" LINE[24]=" " - LINE[25]="Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). All rights reserved." + LINE[25]="olcPGEX_ViewPort by Gorbit99" LINE[26]=" " - LINE[27]="Assets" - LINE[28]="~~~~~~~~~~~~~~~~" - LINE[29]="Pokemon-based Nico Yazawa sprite that started it all..." - LINE[30]="DeviantArt: @kirbysmith" + LINE[27]="miniaudio library Copyright© 2024 by David Reid under the MIT No Attribution License" + LINE[28]="Ogg Vorbis audio decoder - v1.22 - public domain http://nothings.org/stb_vorbis/" + LINE[29]=" " + LINE[30]="Portions of this software are copyright © 2024 The FreeType Project (www.freetype.org). All rights reserved." LINE[31]=" " - LINE[32]="ERA OF FANTASY - GRASSLANDS" - LINE[33]="X: @Namatnieks" - LINE[34]=" " - LINE[35]="*** Minifantasy - Tiny Overworld v1.0 ***" - LINE[36]="Minifantasy is an original idea by Krishna Palacio" - LINE[37]=" " - LINE[38]="Public Domain Font Authors" - LINE[39]="c64esque by andraaspar" - LINE[40]="Habbo by Omni" - LINE[41]="Unknown by Anonymous" + LINE[32]="Assets" + LINE[33]="~~~~~~~~~~~~~~~~" + LINE[34]="Pokemon-based Nico Yazawa sprite that started it all..." + LINE[35]="DeviantArt: @kirbysmith" + LINE[36]=" " + LINE[37]="ERA OF FANTASY - GRASSLANDS" + LINE[38]="X: @Namatnieks" + LINE[39]=" " + LINE[40]="*** Minifantasy - Tiny Overworld v1.0 ***" + LINE[41]="Minifantasy is an original idea by Krishna Palacio" LINE[42]=" " - LINE[43]="Nb Pixel Font Bundle" - LINE[44]="Nb Pixel Font Bundle 2" - LINE[45]=" " - LINE[46]=" " - LINE[47]="Game License" - LINE[48]="~~~~~~~~~~~~~~~~" - LINE[49]="License (OLC-3)" - LINE[50]="~~~~~~~~~~~~~~~" + LINE[43]="Public Domain Font Authors" + LINE[44]="c64esque by andraaspar" + LINE[45]="Habbo by Omni" + LINE[46]="Unknown by Anonymous" + LINE[47]=" " + LINE[48]="Nb Pixel Font Bundle" + LINE[49]="Nb Pixel Font Bundle 2" + LINE[50]=" " LINE[51]=" " - LINE[52]="Copyright 2024 Joshua Sigona " - LINE[53]=" " - LINE[54]="Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:" - LINE[55]=" " - LINE[56]="1. Redistributions or derivations of source code must retain the above copyright notice, this list of conditions and the following disclaimer." - LINE[57]=" " - LINE[58]="2. Redistributions or derivative works in binary form must reproduce the above copyright notice. This list of conditions and the following disclaimer must be reproduced in the documentation and/or other materials provided with the distribution." - LINE[59]=" " - LINE[60]="3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission." - LINE[61]=" " - LINE[62]="THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." - + LINE[52]="Game License" + LINE[53]="~~~~~~~~~~~~~~~~" + LINE[54]="License (OLC-3)" + LINE[55]="~~~~~~~~~~~~~~~" + LINE[56]=" " + LINE[57]="Copyright 2024 Joshua Sigona " + LINE[58]=" " + LINE[59]="Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:" + LINE[60]=" " + LINE[61]="1. Redistributions or derivations of source code must retain the above copyright notice, this list of conditions and the following disclaimer." + LINE[62]=" " + LINE[63]="2. Redistributions or derivative works in binary form must reproduce the above copyright notice. This list of conditions and the following disclaimer must be reproduced in the documentation and/or other materials provided with the distribution." + LINE[64]=" " + LINE[65]="3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission." + LINE[66]=" " + LINE[67]="THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." } \ No newline at end of file diff --git a/Adventures in Lestoria/assets/title_icon_128.png b/Adventures in Lestoria/assets/title_icon_128.png new file mode 100644 index 00000000..e4cb21fb Binary files /dev/null and b/Adventures in Lestoria/assets/title_icon_128.png differ diff --git a/Adventures in Lestoria/assets/title_icon_16.png b/Adventures in Lestoria/assets/title_icon_16.png new file mode 100644 index 00000000..ab330a9c Binary files /dev/null and b/Adventures in Lestoria/assets/title_icon_16.png differ diff --git a/Adventures in Lestoria/assets/title_icon_16.tga b/Adventures in Lestoria/assets/title_icon_16.tga new file mode 100644 index 00000000..22acf19c Binary files /dev/null and b/Adventures in Lestoria/assets/title_icon_16.tga differ diff --git a/Adventures in Lestoria/assets/title_icon_184.jpg b/Adventures in Lestoria/assets/title_icon_184.jpg new file mode 100644 index 00000000..abaa1b37 Binary files /dev/null and b/Adventures in Lestoria/assets/title_icon_184.jpg differ diff --git a/Adventures in Lestoria/assets/title_icon_256.png b/Adventures in Lestoria/assets/title_icon_256.png new file mode 100644 index 00000000..b77c4837 Binary files /dev/null and b/Adventures in Lestoria/assets/title_icon_256.png differ diff --git a/Adventures in Lestoria/assets/title_icon_64.png b/Adventures in Lestoria/assets/title_icon_64.png new file mode 100644 index 00000000..b6a6ab6b Binary files /dev/null and b/Adventures in Lestoria/assets/title_icon_64.png differ diff --git a/Adventures in Lestoria/assets/title_icon_96.png b/Adventures in Lestoria/assets/title_icon_96.png new file mode 100644 index 00000000..fa803dc1 Binary files /dev/null and b/Adventures in Lestoria/assets/title_icon_96.png differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 0577f42c..54661556 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ