Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8002 in orxonox.OLD


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

gui: multiple Connections also work

Location:
branches/gui/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl_gui/glgui_box.cc

    r7997 r8002  
    7373
    7474    this->show();
    75 
    7675  }
    7776
  • branches/gui/src/lib/gui/gl_gui/glgui_box.h

    r7997 r8002  
    3131    virtual void pack(GLGuiWidget* widget);
    3232    virtual void unpack(GLGuiWidget* widget);
     33    virtual void clear();
     34
    3335    virtual void showAll();
    3436    virtual void hideAll();
  • branches/gui/src/lib/gui/gl_gui/glgui_container.h

    r7779 r8002  
    2525    virtual ~GLGuiContainer();
    2626
    27     void init();
    28 
    29 
    30     void setBorderWidth(float borderwidth);
    31 
    32 
     27    /** @brief packs a widget into this one. */
    3328    virtual void pack(GLGuiWidget* widget) = 0;
    3429    /** unpacks a Widget from this container. @param widget the GLGuiWidget to unpack, if NULL all subwidgets will be unpackt. */
    3530    virtual void unpack(GLGuiWidget* widget) = 0;
     31    /** @brief clears all Widgets out. */
     32    virtual void clear() = 0;
     33
    3634    virtual void hideAll() = 0;
    3735    virtual void showAll() = 0;
     
    4139
    4240  private:
    43 
     41    void init();
    4442  };
    4543}
  • branches/gui/src/lib/gui/gl_gui/glgui_inputline.cc

    r7998 r8002  
    2121{
    2222  /**
    23    * standard constructor
     23   * @brief standard constructor
    2424  */
    2525  GLGuiInputLine::GLGuiInputLine ()
     
    3030
    3131  /**
    32    * standard deconstructor
    33   */
     32   * @brief standard deconstructor
     33   */
    3434  GLGuiInputLine::~GLGuiInputLine()
    3535  {}
     
    4040
    4141  /**
    42    * initializes the GUI-element
     42   * @brief initializes the GUI-element
    4343   */
    4444  void GLGuiInputLine::init()
     
    5353  }
    5454
     55
     56  /**
     57   * @brief sets the Text of the InputLine
     58   * @param text The new Text.
     59   */
    5560  void GLGuiInputLine::setText(const std::string& text)
    5661  {
     
    6166  }
    6267
     68  /**
     69   * @brief appends text to the InputLine
     70   * @param appendText the Text to append
     71   */
    6372  void GLGuiInputLine::append(const std::string& appendText)
    6473  {
     
    6877  }
    6978
     79
     80  /**
     81   * @brief appends a Character to the InputLine
     82   * @param character the Character to append.
     83   */
    7084  void GLGuiInputLine::appendCharacter(char character)
    7185  {
     
    7690
    7791
     92  /**
     93   * @brief Removes Characters from the InputLine
     94   * @param chars The count of characters to remove
     95   */
    7896  void GLGuiInputLine::removeCharacters(unsigned int chars)
    7997  {
     
    84102
    85103
     104  /**
     105   * removes the focus from this Widget.
     106   */
    86107  void GLGuiInputLine::removedFocus()
    87108  {
     
    92113
    93114
     115  /**
     116   * Processes an Event.
     117   * @param event The event to be processed
     118   * @return true if the event was catched.
     119   */
    94120  bool GLGuiInputLine::processEvent(const Event& event)
    95121  {
     
    130156
    131157
     158  /**
     159   * @brief Resizes the Widget to the new Size-constraints.
     160   */
    132161  void GLGuiInputLine::resize()
    133162  {
     
    139168
    140169
     170  /**
     171   * ticks the InputLine
     172   * @param dt the time passed.
     173   */
    141174  void GLGuiInputLine::tick(float dt)
    142175  {
  • branches/gui/src/lib/gui/gl_gui/glgui_inputline.h

    r8001 r8002  
    1616{
    1717
    18   //! This is part of the openglGUI class
     18  //! This is InputLine part of the openglGUI class
    1919  /**
     20   * The InputLine is a Widget, that displays a Line, that can be manipulated through
     21   * Writing Text on it.
    2022   *
     23   * Whenever the Text is changed the textChanged signal is emitted.
    2124   */
    2225  class GLGuiInputLine : public OrxGui::GLGuiWidget
     
    2730    virtual ~GLGuiInputLine();
    2831
    29     void init();
    3032
    3133    /** @returns the text of the inputLine */
     
    3638    void appendCharacter(char character);
    3739    void removeCharacters(unsigned int chars);
    38     const std::string& getName() const { return this->text.getText(); };
    39 
    4040
    4141    virtual void removedFocus();
     
    4848    DeclareSignal1(textChanged, const std::string&);
    4949
    50     private:
    51       void resize();
    52 
     50  private:
     51    void init();
     52    void resize();
    5353
    5454  private:
     
    6060    float                   delayNext;        //!< How much time must pass before next output.
    6161
    62     static float            repeatDelay;
    63     static float            repeatRate;
    64 
    65 
     62    static float            repeatDelay;      //!< Repead Delay.
     63    static float            repeatRate;       //!< Repeat Rate.
    6664  };
    6765}
  • branches/gui/src/lib/gui/gl_gui/glgui_widget.h

    r7988 r8002  
    8888    void setBorderSize(float borderSize);
    8989
     90
     91    void setBackgroundColor(float x, float y, float z) { this->backMaterial().setDiffuse(x,y,z); };
     92
    9093    inline void drawRect(const Rect2D& rect) const {
    9194      glBegin(GL_QUADS);
  • branches/gui/src/story_entities/simple_game_menu.cc

    r8001 r8002  
    104104  OrxGui::GLGuiSlider* slider = new OrxGui::GLGuiSlider();
    105105  slider->connect(SIGNAL(slider, valueChanged), this, SLOT(SimpleGameMenu, TEST));
    106   slider->setRange(-1, 10);
     106  slider->connect(SIGNAL(slider, valueChanged), slider, SLOT(OrxGui::GLGuiWidget, setBackgroundColor));
     107  slider->setRange(0, 1);
    107108  slider->setValue(slider->min());
    108109  slider->show();
Note: See TracChangeset for help on using the changeset viewer.