Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9021 in orxonox.OLD


Ignore:
Timestamp:
Jul 2, 2006, 10:25:41 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: GUI: mapped water can no be edited with the mouse

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_handler.cc

    r9006 r9021  
    1818#include "glgui_handler.h"
    1919#include "event_handler.h"
     20#include "key_names.h"
    2021
    2122#include "glgui_mainwidget.h"
     
    203204    switch (event.type)
    204205    {
     206      case EV_MOUSE_MOTION:
     207        this->checkFocus();
     208        break;
     209
    205210      case  EV_MOUSE_BUTTON_LEFT:
    206211        if (GLGuiWidget::mouseFocused() != NULL && event.bPressed)
     
    247252    }
    248253
     254
     255    // Send the Event to the Widget below.
    249256    if (GLGuiWidget::selected() != NULL)
    250257    {
     258      printf("event is %s\n", EVToKeyName(event.type).c_str());
    251259      GLGuiWidget::selected()->processEvent(event);
    252260    }
  • trunk/src/world_entities/environments/mapped_water.cc

    r9019 r9021  
    2727CREATE_FACTORY(MappedWater, CL_MAPPED_WATER);
    2828
    29 SHELL_COMMAND(gui, MappedWater, openGui);
     29SHELL_COMMAND(gui, MappedWater, toggleGui);
    3030SHELL_COMMAND(output, MappedWater, saveParams);
    3131
     
    343343 * @brief starts the slider gui that lets you edit all water parameters
    344344 */
    345 void MappedWater::openGui()
     345void MappedWater::toggleGui()
    346346{
    347347  if (this->box == NULL)
     
    518518    OrxGui::GLGuiHandler::getInstance()->activateCursor();
    519519  }
    520 }
    521 
    522 /**
    523  * @brief closes the water gui
    524  */
    525 void MappedWater::closeGui()
    526 {
    527   delete this->box;
    528   this->box = NULL;
     520  else
     521  {
     522    OrxGui::GLGuiHandler::getInstance()->deactivate();
     523    OrxGui::GLGuiHandler::getInstance()->deactivateCursor();
     524    delete this->box;
     525    this->box = NULL;
     526  }
    529527}
    530528
  • trunk/src/world_entities/environments/mapped_water.h

    r9006 r9021  
    5252
    5353  // slider gui to edit water params during gameplay
    54   void openGui();
    55   void closeGui();
     54  void toggleGui();
    5655
    5756  // functions to set parameters for the water, usually they're called through loadparam
Note: See TracChangeset for help on using the changeset viewer.