Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8007 in orxonox.OLD for branches/gui


Ignore:
Timestamp:
May 31, 2006, 12:58:31 AM (18 years ago)
Author:
bensch
Message:

gui: new Element2D functionality

Location:
branches/gui/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/graphics/render2D/element_2d.cc

    r7919 r8007  
    299299
    300300/**
     301 * @brief updates the Rel - Coordinate in x-direction
     302 * @param x the x coordinate
     303 */
     304void Element2D::setRelCoorX2D(float x)
     305{
     306  this->setRelCoor2D(Vector2D(x, this->relCoordinate.y));
     307}
     308
     309/**
     310 * @brief updates the Rel - Coordinate in y-direction
     311 * @param y the y coordinate
     312 */
     313void Element2D::setRelCoorY2D(float y)
     314{
     315  this->setRelCoor2D(Vector2D(this->relCoordinate.x, y));
     316}
     317
     318
     319/**
    301320 * @brief sets the Relative coordinate to the parent in Pixels
    302321 * @param x the relCoord X
     
    388407  this->setAbsCoor2D(Vector2D(x, y));
    389408}
     409
     410/**
     411 * @brief updates the Abs - Coordinate in x-direction
     412 * @param x the x coordinate
     413 */
     414void Element2D::setAbsCoorX2D(float x)
     415{
     416  this->setAbsCoor2D(x, this->getAbsCoor2D().y);
     417}
     418
     419/**
     420 * @brief updates the Abs - Coordinate in y-direction
     421 * @param y the y coordinate
     422 */
     423void Element2D::setAbsCoorY2D(float y)
     424{
     425  this->setAbsCoor2D(this->getAbsCoor2D().x, y);
     426}
     427
    390428
    391429/**
  • branches/gui/src/lib/graphics/render2D/element_2d.h

    r7919 r8007  
    143143  public:
    144144    void setRelCoor2D (const Vector2D& relCoord);
     145    void setRelCoorX2D(float x);
     146    void setRelCoorY2D(float y);
    145147    void setRelCoor2D (float x, float y);
    146148    void setRelCoor2Dpx (int x, int y);
     
    155157    void setAbsCoor2D (const Vector2D& absCoord);
    156158    void setAbsCoor2D (float x, float y);
     159    void setAbsCoorX2D(float x);
     160    void setAbsCoorY2D(float y);
    157161    void setAbsCoor2Dpx (int x, int y);
    158162    void setAbsCoorSoft2D (const Vector2D& absCoordSoft, float bias = 1.0);
  • branches/gui/src/story_entities/simple_game_menu.cc

    r8005 r8007  
    116116
    117117  OrxGui::GLGuiSlider* slider = new OrxGui::GLGuiSlider();
    118   slider->connect(SIGNAL(slider, valueChanged), box, SLOT(Element2D, setAbsCoor2D));
     118  slider->connect(SIGNAL(slider, valueChanged), box, SLOT(Element2D, setRelCoorX2D));
    119119  slider->setRange(100, 500);
    120120  slider->setStep(50);
    121121  slider->setValue(slider->min());
    122122  slider->show();
    123   slider->setAbsCoor2D(100, 200);
     123  slider->setAbsCoor2D(100, 00);
    124124
    125125  /////
Note: See TracChangeset for help on using the changeset viewer.