Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8530 for code


Ignore:
Timestamp:
May 22, 2011, 9:51:15 PM (14 years ago)
Author:
landauf
Message:

added config value to define the scroll speed in CEGUI listboxes. default 1 line.

Location:
code/trunk/src/libraries/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/GUIManager.cc

    r8527 r8530  
    7373#include "util/Debug.h"
    7474#include "util/Exception.h"
     75#include "util/Math.h"
    7576#include "util/OrxAssert.h"
    7677#include "ConfigValueIncludes.h"
     
    355356    {
    356357        SetConfigValue(guiScheme_, GUIManager::defaultScheme_) .description("Changes the current GUI scheme.") .callback(this, &GUIManager::changedGUIScheme);
     358        SetConfigValue(numScrollLines_, 1).description("How many lines to scroll in a list if the scroll wheel is used");
    357359    }
    358360
     
    593595    void GUIManager::mouseScrolled(int abs, int rel)
    594596    {
    595         this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)rel));
     597        this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
    596598    }
    597599
  • code/trunk/src/libraries/core/GUIManager.h

    r8423 r8530  
    186186        std::string guiScheme_;
    187187
     188        int numScrollLines_; ///< How many lines to scroll in a list if the scroll wheel is used
     189
    188190    }; // tolua_export
    189191} // tolua_export
Note: See TracChangeset for help on using the changeset viewer.