From b0b3b9d3aeac3352b21daa75c9393a80a472968b Mon Sep 17 00:00:00 2001 From: auria Date: Sat, 9 May 2009 20:20:16 +0000 Subject: [PATCH] Resolutions in options menu are now obtained from irrlicht git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3472 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- data/gui/screen32.png | Bin 0 -> 17320 bytes src/graphics/irr_driver.cpp | 27 ++++--- src/graphics/irr_driver.hpp | 8 +++ src/gui/state_manager.cpp | 66 ++++++++++++++---- src/gui/widget.cpp | 24 +++++++ src/gui/widget.hpp | 4 +- .../Xcode/STK_XCode.xcodeproj/project.pbxproj | 30 ++++---- 7 files changed, 122 insertions(+), 37 deletions(-) create mode 100644 data/gui/screen32.png diff --git a/data/gui/screen32.png b/data/gui/screen32.png new file mode 100644 index 0000000000000000000000000000000000000000..ac9a9ac8dace53b859b27463ad0b4e27c920235a GIT binary patch literal 17320 zcma%Dbx<5nus+=7aF@d+xO;-Ty9bA0!9#F&cXxMphXgqY1a~LcAwhz^`@O37|GV4W zsokob+nMg|`MUe-i&9gO#Xu!N1pojT@^Vrd&^GYD9T^dN91%00f;KR28nT}N^un-!%fI51lB+H|Iw|CW)6m+YyYlE zESA$q6#sO(dZe9HjTZ{iN``%t&s7sKBnsg$`_dQ}Cf_LX(-W=jce=rcs>RKY9*E0$ z--E&S!<(M3h)sd7bBE=Zo7S?02p0scvuuck?b|_yeZ&wQ`-B`2l+r7GA#!H7X8<` zJEZSn9@?wQe?8F3r@E>5K(rf{OH?W(M|KmJmX|rnFy8}4;B!{s`3Bk`P0MFL7i)BX zU3glFP)rRE2iw-I5{(FIUR7yU(AtE4Vn$xHdF^}HQq0N8VU7m*{kyRupJ?J6x20^i@CI3Xn`Ij{_uTkmr(5roG;( z=rduTQvE^SalY6xE9NlI6BkvfD21j_WmV^)8pAr6S+7w|1By{#s!Ig{etwece$NK`s;aA%Ta$Sm--Hv&c#th8N2B)A_&%!s%aLUV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}Ia1MGJGHW#w()y5EQ(gVF-uP8oI1<{M+a>-Giv;KMB;1=cA z0FY3^m{bJG2@WFS(P%WC5j8Ji1G~KM*P55VE&}13AQdo&_}GIv=KgMJX{k`=>N=lS zYFR+s@Aol9Xv`t7?32*nG@^gA7+|k!ws{isBn9^P+;*PpW&rG+>)6HsvdiahD$(oP Z{|C$P)Ar+CG=2a8002ovPDHLkV1l*KPKy8l literal 0 HcmV?d00001 diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 3206706dd..45e6e0fdd 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -65,17 +65,26 @@ void IrrDriver::initDevice() video::IVideoModeList* modes = m_device->getVideoModeList(); const int count = modes->getVideoModeCount(); - std::cout << "--------------\n allowed modes \n--------------\n"; - std::cout << "Desktop depth : " << modes->getDesktopDepth() << std::endl; - std::cout << "Desktop resolution : " << modes->getDesktopResolution().Width << "," << modes->getDesktopResolution().Height << std::endl; + //std::cout << "--------------\n allowed modes \n--------------\n"; + //std::cout << "Desktop depth : " << modes->getDesktopDepth() << std::endl; + //std::cout << "Desktop resolution : " << modes->getDesktopResolution().Width << "," << modes->getDesktopResolution().Height << std::endl; - std::cout << "Found " << count << " valid modes\n"; + //std::cout << "Found " << count << " valid modes\n"; for(int i=0; igetVideoModeDepth(i) << - " resolution=" << modes->getVideoModeResolution(i).Width << - "x" << modes->getVideoModeResolution(i).Height << std::endl; + // only consider 32-bit resolutions for now + if(modes->getVideoModeDepth(i) == 32) + { + VideoMode mode; + mode.width = modes->getVideoModeResolution(i).Width; + mode.height = modes->getVideoModeResolution(i).Height; + m_modes.push_back( mode ); + } + + //std::cout << + //"bits : " << modes->getVideoModeDepth(i) << + //" resolution=" << modes->getVideoModeResolution(i).Width << + //"x" << modes->getVideoModeResolution(i).Height << std::endl; } m_device->closeDevice(); @@ -91,7 +100,7 @@ void IrrDriver::initDevice() : (driver_type==1 ? video::EDT_DIRECT3D9 : video::EDT_DIRECT3D8); - // Try 32 and 16 bit per pixels + // Try 32 and, upon failure, 16 bit per pixels for(int bits=32; bits>15; bits -=16) { m_device = createDevice(type, diff --git a/src/graphics/irr_driver.hpp b/src/graphics/irr_driver.hpp index 0ff265f7d..b45b3ed97 100644 --- a/src/graphics/irr_driver.hpp +++ b/src/graphics/irr_driver.hpp @@ -26,6 +26,11 @@ #include "irrlicht.h" using namespace irr; +struct VideoMode +{ + int width, height; +}; + class IrrDriver : public IEventReceiver { private: @@ -39,12 +44,15 @@ private: irr::gui::IGUIFont *m_race_font; void setAllMaterialFlags(scene::IAnimatedMesh *mesh) const; + std::vector m_modes; public: IrrDriver(); ~IrrDriver(); void initDevice(); + const std::vector& getVideoModes() const { return m_modes; } + IrrlichtDevice *getDevice() const { return m_device; } scene::ISceneManager *getSceneManager() const { return m_scene_manager; } scene::IAnimatedMesh *getAnimatedMesh(const std::string &name); diff --git a/src/gui/state_manager.cpp b/src/gui/state_manager.cpp index ec863e80a..e8e4c6a3e 100644 --- a/src/gui/state_manager.cpp +++ b/src/gui/state_manager.cpp @@ -313,22 +313,64 @@ namespace StateManager static bool resolutions_inited = false; + // --- get resolution list from irrlicht the first time if(!resolutions_inited) { - res->addItem("1280x1024","1280x1024","gui/screen54.png"); // 0 - res->addItem("800x600","800x600","gui/screen43.png"); // 1 - res->addItem("1024x768","1024x768","gui/screen43.png"); // 2 - res->addItem("1152x864","1152x864","gui/screen43.png"); // 3 - res->addItem("1280x960","1280x960","gui/screen43.png"); // 4 - res->addItem("1400x1050","1400x1050","gui/screen43.png"); // 5 - res->addItem("1280x800","1280x800","gui/screen1610.png"); // 6 - res->addItem("1440x900","1440x900","gui/screen1610.png"); // 7 - res->addItem("1680x1050","1680x1050","gui/screen1610.png"); // 8 - res->addItem("1920x1200","1920x1200","gui/screen1610.png"); // 9 - res->addItem("1280x768","1280x768","gui/screen53.png"); // 10 + const std::vector& modes = irr_driver->getVideoModes(); + const int amount = modes.size(); + for(int n=0; naddItem(name,name,"gui/screen54.png"); + else if( ABOUT_EQUAL( ratio, (4.0f/3.0f) ) ) + res->addItem(name,name,"gui/screen43.png"); + else if( ABOUT_EQUAL( ratio, (16.0f/10.0f) ) ) + res->addItem(name,name,"gui/screen1610.png"); + else if( ABOUT_EQUAL( ratio, (5.0f/3.0f) ) ) + res->addItem(name,name,"gui/screen53.png"); + else if( ABOUT_EQUAL( ratio, (3.0f/2.0f) ) ) + res->addItem(name,name,"gui/screen32.png"); + else + { + std::cout << "Unknown screen size ratio : " << ratio << std::endl; + res->addItem(name,name,"gui/screen1610.png"); + } +#undef ABOUT_EQUAL + } // next resolution + resolutions_inited = true; - } + } // end if not inited + res->updateItemDisplay(); + + // ---- select curernt resolution every time + const std::vector& modes = irr_driver->getVideoModes(); + const int amount = modes.size(); + for(int n=0; nm_width && h == user_config->m_height) + { + // that's the current one + res->setSelection(n); + break; + } + } // end for + } } else if(screen_name == "options_input.stkgui") diff --git a/src/gui/widget.cpp b/src/gui/widget.cpp index 554b737b8..7d9dc5bbf 100644 --- a/src/gui/widget.cpp +++ b/src/gui/widget.cpp @@ -1073,6 +1073,30 @@ void RibbonGridWidget::addItem( std::string user_name, std::string code_name, st m_items.push_back(desc); } // ----------------------------------------------------------------------------- +void RibbonGridWidget::setSelection(int item_id) +{ + setSelection(m_items[item_id].m_code_name); +} +void RibbonGridWidget::setSelection(const std::string& code_name) +{ + if(m_rows.size() > 1) + { + std::cout << "/!\\ Warning, RibbonGridWidget::setSelection only makes sense on 1-row ribbons (since there can't logically be a selection with more than one row)\n"; + } + + + // select the said item (mostly to get its ID) + RibbonWidget* ribbon = m_rows.get(0); + ribbon->select(code_name); + + // scroll so selection is visible + m_scroll_offset = ribbon->m_selection; + updateItemDisplay(); + + // set selection again, because scrolling made it wrong + ribbon->select(code_name); +} +// ----------------------------------------------------------------------------- void RibbonGridWidget::updateItemDisplay() { int icon_id = 0; diff --git a/src/gui/widget.hpp b/src/gui/widget.hpp index 502c07eec..d02e5048e 100644 --- a/src/gui/widget.hpp +++ b/src/gui/widget.hpp @@ -240,10 +240,10 @@ namespace GUIEngine int getSelection() const { return m_selection; } void setSelection(const int i) { m_selection = i; updateSelection(); } + void select(std::string item); RibbonType getRibbonType() const { return m_ribbon_type; } const std::string& getSelectionName() { return m_children[m_selection].m_properties[PROP_ID]; } - void select(std::string item); void setLabel(const int id, std::string new_name); RibbonWidget(const RibbonType type=RIBBON_COMBO); @@ -302,6 +302,8 @@ namespace GUIEngine bool mouseHovered(Widget* child); const std::string& getSelectionName(); + void setSelection(int item_id); + void setSelection(const std::string& code_name); }; class ModelViewWidget : public Widget diff --git a/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj b/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj index 93f7baa47..18c06c8ef 100644 --- a/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj +++ b/src/ide/Xcode/STK_XCode.xcodeproj/project.pbxproj @@ -1747,26 +1747,26 @@ 95C2AE870F296542000D3E5D /* graphics */ = { isa = PBXGroup; children = ( - 95C65D8E0F532FCE00BE7BA7 /* moving_texture.hpp */, - 95C65D8F0F532FCE00BE7BA7 /* shadow.hpp */, - 95C65D900F532FCE00BE7BA7 /* skid_marks.hpp */, - 95C65D910F532FCE00BE7BA7 /* particle_system.hpp */, - 95C65D920F532FCE00BE7BA7 /* nitro.hpp */, - 95C65D930F532FCE00BE7BA7 /* scene.hpp */, + 95C65D980F532FD400BE7BA7 /* camera.cpp */, + 95C65D960F532FCE00BE7BA7 /* camera.hpp */, + 95C65D990F532FD400BE7BA7 /* irr_driver.cpp */, 95C65D940F532FCE00BE7BA7 /* irr_driver.hpp */, 95C65D950F532FCE00BE7BA7 /* mesh_tools.hpp */, - 95C65D970F532FD400BE7BA7 /* smoke.hpp */, - 95C65D980F532FD400BE7BA7 /* camera.cpp */, - 95C65D990F532FD400BE7BA7 /* irr_driver.cpp */, 95C65D9A0F532FD400BE7BA7 /* mesh_tools.cpp */, 95C65D9B0F532FD400BE7BA7 /* moving_texture.cpp */, - 95C65D9C0F532FD400BE7BA7 /* particle_system.cpp */, - 95C65D9D0F532FD400BE7BA7 /* skid_marks.cpp */, - 95C65D9E0F532FD400BE7BA7 /* smoke.cpp */, - 95C65D9F0F532FD400BE7BA7 /* scene.cpp */, - 95C65DA00F532FD400BE7BA7 /* shadow.cpp */, + 95C65D8E0F532FCE00BE7BA7 /* moving_texture.hpp */, 95C65DA10F532FD400BE7BA7 /* nitro.cpp */, - 95C65D960F532FCE00BE7BA7 /* camera.hpp */, + 95C65D920F532FCE00BE7BA7 /* nitro.hpp */, + 95C65D9C0F532FD400BE7BA7 /* particle_system.cpp */, + 95C65D910F532FCE00BE7BA7 /* particle_system.hpp */, + 95C65D9F0F532FD400BE7BA7 /* scene.cpp */, + 95C65D930F532FCE00BE7BA7 /* scene.hpp */, + 95C65D9D0F532FD400BE7BA7 /* skid_marks.cpp */, + 95C65D900F532FCE00BE7BA7 /* skid_marks.hpp */, + 95C65D9E0F532FD400BE7BA7 /* smoke.cpp */, + 95C65D970F532FD400BE7BA7 /* smoke.hpp */, + 95C65DA00F532FD400BE7BA7 /* shadow.cpp */, + 95C65D8F0F532FCE00BE7BA7 /* shadow.hpp */, ); name = graphics; path = ../../graphics;