Exemplo n.º 1
0
void cConsole::clear()
{
	history[console.displayedPage].clear();
	resetScroll();
	if (displayedPage == SUBCMD_ALL)
	{
		history[SUBCMD_ALL].push_back("[CONSOLE] All Messages Tab");
		history[SUBCMD_ALL].push_back("============================");
	}
	else if (displayedPage == SUBCMD_INFO)
	{
		history[SUBCMD_INFO].push_back("[CONSOLE] Info Messages Tab");
		history[SUBCMD_INFO].push_back("============================");
	}
	else if (displayedPage == SUBCMD_ECHO)
	{
		history[SUBCMD_ECHO].push_back("[CONSOLE] Echo Messages Tab");
		history[SUBCMD_ECHO].push_back("============================");
	}
	else if (displayedPage == SUBCMD_ERROR)
	{
		history[SUBCMD_ERROR].push_back("[CONSOLE] Error Messages Tab");
		history[SUBCMD_ERROR].push_back("============================");
	}
	else if (displayedPage == SUBCMD_DEBUG)
	{
		history[SUBCMD_DEBUG].push_back("[CONSOLE] Debug Messages Tab");
		history[SUBCMD_DEBUG].push_back("============================");
	}
}
Exemplo n.º 2
0
/*!
 * Activation (focus change) eventhandler
 */
static void handleActiveEvent(SDL_ActiveEvent * activeEvent)
{
	// Ignore focus loss through SDL_APPMOUSEFOCUS, since it mostly happens accidentialy
	// active.state is a bitflag! Mixed events (eg. APPACTIVE|APPMOUSEFOCUS) will thus not be ignored.
	if ( activeEvent->state == SDL_APPMOUSEFOCUS )
	{
		setMouseScroll(activeEvent->gain);
		return;
	}

	if ( activeEvent->gain == 1 )
	{
		debug( LOG_NEVER, "WM_SETFOCUS");
		if (focusState != FOCUS_IN)
		{
			focusState = FOCUS_IN;

			// Don't pause in multiplayer!
			if (war_GetPauseOnFocusLoss() && !NetPlay.bComms)
			{
				gameTimeStart();
				audio_ResumeAll();
				cdAudio_Resume();
			}
			// enable scrolling
			setScrollPause(false);
			resetScroll();
		}
	}
	else
	{
		debug( LOG_NEVER, "WM_KILLFOCUS");
		if (focusState != FOCUS_OUT)
		{
			focusState = FOCUS_OUT;

			// Don't pause in multiplayer!
			if (war_GetPauseOnFocusLoss() && !NetPlay.bComms)
			{
				gameTimeStop();
				audio_PauseAll();
				cdAudio_Pause();
			}
			/* Have to tell the input system that we've lost focus */
			inputLooseFocus();
			// stop scrolling
			setScrollPause(true);
		}
	}
}
Exemplo n.º 3
0
void CurveWnd::initCurve(CurveSpecs *cs){
	this->cs = cs;
	p.setTrigMode(cs->tm);
	p.parse(cs->expr);

	if(ypx != NULL){
		delete[] ypx;
		ypx = NULL;
	}

	gwidth = cs->width;

	ypx = new int[gwidth + 1];
	if(ypx == NULL)
		throw ERR_MEMORY;

	int i;
	double x = cs->x1, y;


	maxy = miny = y = p.evaluate(x);
	xsf = gwidth / (cs->x2 - cs->x1);
	ysf = cs->yscale * xsf;
	ypx[0] = (int)(y * cs->yscale * xsf);
	for(i = 1; i <= gwidth; i++){
		y = p.evaluate(cs->x1 + i / xsf);
		if(y < miny) miny = y;
		if(y > maxy) maxy = y;
		ypx[i] = (int)(y * ysf);
	}

	int maxypx, minypx;
	maxypx = (int)(maxy * ysf);
	minypx = (int)(miny * ysf);
	gheight = maxypx - minypx;

	for(i = 0; i <= gwidth; i++)
		ypx[i] = maxypx - ypx[i];
	setGraphSize(gwidth + 2 * MARGIN, gheight + 2 * MARGIN);
	resetScroll();
	InvalidateRect(hwnd, NULL, TRUE);
}
Exemplo n.º 4
0
static void _disclaimer_simple ( )
{
	displayInit();
	displayOff(0);

	SYS_disableInts();

	resetPalettes();
	resetScroll();
	resetSprites();
	resetScreen();

	VDP_drawImageEx ( PLAN_A, &ob_cs_disclaimer, TILE_ATTR_FULL(PAL1, FALSE, FALSE, FALSE, 16),  0, 0, 0, 0 );

	preparePal ( PAL1, ob_cs_disclaimer.palette->data );

	SYS_enableInts();

	displayOn(0);

	waitJoySc(3);

	displayOff(10);
}
Exemplo n.º 5
0
void LuaTableView::reloadData(){
	CCTableView::reloadData();
	resetScroll();
}
Exemplo n.º 6
0
	virtual void reloadData(){
		CCTableView::reloadData();
		resetScroll();
	}
Exemplo n.º 7
0
// solo borra los display inferiores
void FrenteCustomSD::borrar(void){
  int i;
  resetScroll();
  for(i=0;i<CANTIDAD_DISPLAYS/2;i++)
    getDisplay(i)->borrar();  
}