more fixes

This commit is contained in:
Cary Sandvig 2001-03-21 20:22:34 +00:00
parent b5d745d230
commit d835222177
2 changed files with 6 additions and 0 deletions

View File

@ -40,6 +40,7 @@ INLINE void GuiButton::exit(void) {
INLINE void GuiButton::up(void) {
switch (_state) {
case NONE:
case DOWN:
case INACTIVE:
switch_state(UP);
@ -59,6 +60,7 @@ INLINE void GuiButton::up(void) {
INLINE void GuiButton::down(void) {
switch (_state) {
case NONE:
case UP:
case INACTIVE:
switch_state(DOWN);
@ -78,6 +80,7 @@ INLINE void GuiButton::down(void) {
INLINE void GuiButton::inactive(void) {
switch (_state) {
case NONE:
case UP:
case DOWN:
switch_state(INACTIVE);
@ -95,6 +98,7 @@ INLINE void GuiButton::inactive(void) {
INLINE void GuiButton::click(void) {
switch (_state) {
case NONE:
case UP:
case UP_ROLLOVER:
down();

View File

@ -112,8 +112,10 @@ static void click_button_up(CPT_Event e) {
void GuiButton::switch_state(GuiButton::States nstate) {
if (_mgr == (GuiManager*)0L) {
/*
gui_cat.warning()
<< "Tried to switch state of unmanaged button\n";
*/
_state = nstate;
return;
}