*** empty log message ***

This commit is contained in:
David Rose 2001-04-23 17:35:55 +00:00
parent 79395a40df
commit 903ee1889e
2 changed files with 8 additions and 8 deletions

View File

@ -77,7 +77,7 @@ static void exit_button(CPT_Event e) {
static void click_button_down(CPT_Event e) {
const MouseWatcherRegion* rgn = DCAST(MouseWatcherRegion, e->get_parameter(0).get_ptr());
string button = e->get_parameter(1).get_string_value();
if ((button != "mouse1") && (button != "mouse2") && (button != "mouse3"))
if (!(button == "mouse1" || button == "mouse2" || button == "mouse3"))
return;
GuiButton* val = find_in_buttons_map(rgn);
if (val == (GuiButton *)0L)
@ -89,7 +89,7 @@ static void click_button_down(CPT_Event e) {
static void click_button_up(CPT_Event e) {
const MouseWatcherRegion* rgn = DCAST(MouseWatcherRegion, e->get_parameter(0).get_ptr());
string button = e->get_parameter(1).get_string_value();
if ((button != "mouse1") && (button != "mouse2") && (button != "mouse3"))
if (!(button == "mouse1" || button == "mouse2" || button == "mouse3"))
return;
GuiButton* val = find_in_buttons_map(rgn);
if (val == (GuiButton *)0L)
@ -471,7 +471,7 @@ GuiButton::GuiButton(const string& name, GuiLabel* up, GuiLabel* down)
_rgn = new MouseWatcherRegion("button-" + name, _left, _right, _bottom,
_top);
_rgn->set_suppress_below(true);
buttons[this->_rgn] = this;
buttons[this->_rgn.p()] = this;
}
GuiButton::GuiButton(const string& name, GuiLabel* up, GuiLabel* down,
@ -491,7 +491,7 @@ GuiButton::GuiButton(const string& name, GuiLabel* up, GuiLabel* down,
_rgn = new MouseWatcherRegion("button-" + name, _left, _right, _bottom,
_top);
_rgn->set_suppress_below(true);
buttons[this->_rgn] = this;
buttons[this->_rgn.p()] = this;
}
GuiButton::GuiButton(const string& name, GuiLabel* up, GuiLabel* up_roll,
@ -512,7 +512,7 @@ GuiButton::GuiButton(const string& name, GuiLabel* up, GuiLabel* up_roll,
_rgn = new MouseWatcherRegion("button-" + name, _left, _right, _bottom,
_top);
_rgn->set_suppress_below(true);
buttons[this->_rgn] = this;
buttons[this->_rgn.p()] = this;
}
GuiButton::~GuiButton(void) {
@ -521,7 +521,7 @@ GuiButton::~GuiButton(void) {
// Remove the names from the buttons map, so we don't end up with
// an invalid pointer.
string name = get_name();
buttons.erase(this->_rgn);
buttons.erase(this->_rgn.p());
if ((buttons.size() == 0) && added_hooks) {
_eh->remove_hook("gui-enter", enter_button);
_eh->remove_hook("gui-exit" + get_name(), exit_button);

View File

@ -75,7 +75,7 @@ GuiRollover::GuiRollover(const string& name, GuiLabel* off, GuiLabel* on)
_rgn = new MouseWatcherRegion("rollover-" + name, _left, _right, _bottom,
_top);
_rgn->set_suppress_below(false);
rollovers[this->_rgn] = this;
rollovers[this->_rgn.p()] = this;
}
GuiRollover::~GuiRollover(void) {
@ -84,7 +84,7 @@ GuiRollover::~GuiRollover(void) {
// Remove the names from the rollovers map, so we don't end up with
// an invalid pointer.
string name = get_name();
rollovers.erase(this->_rgn);
rollovers.erase(this->_rgn.p());
if ((rollovers.size() == 0) && added_hooks) {
_eh->remove_hook("gui-enter", enter_rollover);
_eh->remove_hook("gui-exit", exit_rollover);