Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 979 vs 1002 for /trunk/Source Code/GUI/GUIButton.cpp

Diff revisions: vs.
  @@ -36,8 +36,6 @@
36 36 CEGUI::Event::Subscriber(&GUIButton::joystickButtonPressed, this));
37 37
38 38 _parent->addChild(_btnWindow);
39 - _btnWindow->setEnabled(true);
40 -
41 39 setActive(true);
42 40 }
43 41
  @@ -47,25 +45,23 @@
47 45 }
48 46
49 47 void GUIButton::setActive(const bool active) {
50 - _btnWindow->setEnabled(active);
51 - GUIElement::setActive(active);
48 + if (isActive() != active) {
49 + _btnWindow->setEnabled(active);
50 + GUIElement::setActive(active);
51 + }
52 52 }
53 53
54 54 void GUIButton::setVisible(const bool visible) {
55 - _btnWindow->setVisible(visible);
56 - GUIElement::setVisible(visible);
55 + if (isVisible() != visible) {
56 + _btnWindow->setVisible(visible);
57 + GUIElement::setVisible(visible);
58 + }
57 59 }
58 60
59 61 void GUIButton::setText(const stringImpl& text) {
60 62 _btnWindow->setText(text.c_str());
61 63 }
62 64
63 - void GUIButton::draw(GFXDevice& context, GFX::CommandBuffer& bufferInOut) const {
64 - ACKNOWLEDGE_UNUSED(context);
65 - ACKNOWLEDGE_UNUSED(bufferInOut);
66 - //Nothing. CEGUI should handle this
67 - }
68 -
69 65 void GUIButton::setTooltip(const stringImpl& tooltipText) {
70 66 _btnWindow->setTooltipText(tooltipText.c_str());
71 67 }