~ubuntu-branches/ubuntu/edgy/pouetchess/edgy-updates

« back to all changes in this revision

Viewing changes to src/sxmlgui/GUIRadioButton.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc (mr_pouit)
  • Date: 2006-07-15 15:45:57 UTC
  • Revision ID: james.westby@ubuntu.com-20060715154557-3paxq02hx4od0wm4
Tags: upstream-0.2.0
ImportĀ upstreamĀ versionĀ 0.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "EasyGL.h"
 
2
 
 
3
GUIRadioButton::GUIRadioButton(const std::string &callback) : GUICheckBox(callback)
 
4
{
 
5
  secondaryTexDesc = WT_CHECK_RB_MARK;
 
6
  primaryTexDesc   = WT_RADIO_BUTTON;
 
7
  widgetType       = WT_RADIO_BUTTON;
 
8
  markRatio        = 0.75f;
 
9
}
 
10
 
 
11
void GUIRadioButton::checkMouseEvents(MouseEvent &newEvent, int extraInfo, bool bits)
 
12
{
 
13
  GUIRectangle::checkMouseEvents(newEvent, extraInfo, true);
 
14
 
 
15
  if(clicked) 
 
16
  {
 
17
    if(!checked)
 
18
    {
 
19
      setChecked(true);
 
20
     ((GUIPanel*)parent)->notify(this);
 
21
    }
 
22
  }
 
23
  released = false;
 
24
  clicked  = false;
 
25
}