Product not found

Game Development Community

GuiScrollCtrl enhancement - horizontal scroll

by Fyodor "bank" Osokin · 02/19/2008 (2:32 pm) · 0 comments

Changes:
open:
guiScrollCtrl.cc

locate:
bool GuiScrollCtrl::onMouseWheelUp(const GuiEvent &event)
change:
scrollByRegion((event.modifier & SI_CTRL) ? UpPage : UpArrow);
to this:
scrollByRegion(
      (event.modifier & SI_SHIFT || !mVBarEnabled) ? 
      ( (event.modifier & SI_CTRL) ? LeftPage : LeftArrow) :
      ( (event.modifier & SI_CTRL) ? UpPage : UpArrow )
      );

locate:
bool GuiScrollCtrl::onMouseWheelDown(const GuiEvent &event)
change:
scrollByRegion((event.modifier & SI_CTRL) ? DownPage : DownArrow);
to this:
scrollByRegion(
      (event.modifier & SI_SHIFT || !mVBarEnabled) ? 
      ( (event.modifier & SI_CTRL) ? RightPage : RightArrow) :
      ( (event.modifier & SI_CTRL) ? DownPage : DownArrow)
      );

Save. Rebuild. Enjoy!