main_gui.c
changeset 2549 5587f9a38563
parent 2548 49c8a096033f
child 2552 5b586a545665
equal deleted inserted replaced
2548:49c8a096033f 2549:5587f9a38563
   150 
   150 
   151 typedef void ToolbarButtonProc(Window *w);
   151 typedef void ToolbarButtonProc(Window *w);
   152 
   152 
   153 static void ToolbarPauseClick(Window *w)
   153 static void ToolbarPauseClick(Window *w)
   154 {
   154 {
   155 	if (_networking && !_network_server) { return;} // only server can pause the game
   155 	if (_networking && !_network_server) return; // only server can pause the game
   156 
   156 
   157 	if (DoCommandP(0, _pause ? 0 : 1, 0, NULL, CMD_PAUSE))
   157 	if (DoCommandP(0, _pause ? 0 : 1, 0, NULL, CMD_PAUSE))
   158 		SndPlayFx(SND_15_BEEP);
   158 		SndPlayFx(SND_15_BEEP);
   159 }
   159 }
   160 
   160 
   911 		assert(wt);
   911 		assert(wt);
   912 
   912 
   913 		// update the toolbar button too
   913 		// update the toolbar button too
   914 		CLRBIT(wt->disabled_state, button);
   914 		CLRBIT(wt->disabled_state, button);
   915 		CLRBIT(wt->disabled_state, button + 1);
   915 		CLRBIT(wt->disabled_state, button + 1);
   916 		if (vp->zoom == 0) SETBIT(wt->disabled_state, button);
   916 		switch (vp->zoom) {
   917 		else if (vp->zoom == 2) SETBIT(wt->disabled_state, button + 1);
   917 			case 0: SETBIT(wt->disabled_state, button); break;
       
   918 			case 2: SETBIT(wt->disabled_state, button + 1); break;
       
   919 		}
   918 		SetWindowDirty(wt);
   920 		SetWindowDirty(wt);
   919 	}
   921 	}
   920 
   922 
   921 	return true;
   923 	return true;
   922 }
   924 }