Example #1
0
int main() {

	char *text[10];
	drawConsole(text, 10);

	return 0;
}
Example #2
0
 /*--------------------------------------------------------------------------------
     Function    : Display::refresh
     Description : Calls all of the various console drawing functions and then the
                   Display blit function which puts each console onto the root
                   console.
     Inputs      : None
     Outputs     : None
     Return      : void
 --------------------------------------------------------------------------------*/
 void Display::refresh()
 {
     setDisplayValues();
     drawPlayfield();
     //drawPartyBar();
     drawConsole();
     draw();
 }
Example #3
0
void debug::run()
{
	mr_ConsoleRect.x = gfx::getScreenWidth() / 2 - gfx::getScreenWidth() / 2 / 2;
	mr_ConsoleRect.y = gfx::getScreenHeight() - gfx::getScreenHeight() / 12;
	mr_ConsoleRect.w = gfx::getScreenWidth() / 2;
	mr_ConsoleRect.h = gfx::getScreenHeight() / 10;

	if (input::keyHeld(SDLK_F3))
	{
		mb_active = !mb_active;
	}

	if (input::chord(SDLK_LCTRL, SDLK_TAB) || input::chord(SDLK_RCTRL, SDLK_TAB))
	{
		if (mb_ConsoleActive)
		{
			mb_ConsoleActive = false;
		}
		else
		{
			mb_ConsoleActive = true;
		}
	}

	while (moss_CoutString.str().length())
	{
		if (moss_CoutString.str().find('\n') != string::npos && moss_CoutString.str().length() > 1)
		{
			mls_CoutList.push_front(moss_CoutString.str().substr(0, moss_CoutString.str().find('\n')));
			moss_CoutString.str(moss_CoutString.str().substr(moss_CoutString.str().find('\n') + 1, moss_CoutString.str().length() - 1));
		}
		else if (moss_CoutString.str().find('\n') != string::npos)
		{
			moss_CoutString.str("");
		}
		else
		{
			mls_CoutList.push_front(moss_CoutString.str());
			moss_CoutString.str("");
		}
	}
	moss_CoutString.clear();

	if (mb_active)
	{
		drawFps();
	}
	if (mb_ConsoleActive)
	{
		drawConsole();
	}
}
Example #4
0
File: gui.c Project: alxm/inimaker
void gui_draw(Menu* const m)
{
    a_draw_fill_fast(0);
    drawTitle();

    if(m) {
        drawMenu(m);
        drawControls();
        drawDryRun(0);
    } else {
        drawConsole();
        drawDryRun(1);
    }
}
Example #5
0
void Gui::draw() {
	if (_engine->_isGameOver) {
		_wm.draw();

		return;
	}

	if (!_engine->_world->_player->_currentScene)
		return;

	if (_scene != _engine->_world->_player->_currentScene) {
		_sceneDirty = true;

		_scene = _engine->_world->_player->_currentScene;

		_sceneWindow->setDimensions(*_scene->_designBounds);
		_sceneWindow->setTitle(_scene->_name);
		_consoleWindow->setDimensions(*_scene->_textBounds);

		_wm.setFullRefresh(true);
	}

	drawScene();
	drawConsole();

	_wm.draw();

	if (_cursorDirty && _cursorRect.left < _screen.w && _cursorRect.bottom < _screen.h) {
		int x = _cursorRect.left, y = _cursorRect.top, w = _cursorRect.width(), h = _cursorRect.height();
		if (x < 0) {
			w += x;
			x = 0;
		}
		if (y < 0) {
			h += y;
			y = 0;
		}
		if (x + w > _screen.w) w = _screen.w - x;
		if (y + h > _screen.h) h = _screen.h - y;
		if (w != 0 && h != 0)
			g_system->copyRectToScreen(_screen.getBasePtr(x, y), _screen.pitch, x, y, w, h);

		_cursorDirty = false;
	}

	_sceneDirty = false;
	_consoleDirty = false;
	_consoleFullRedraw = false;
}
Example #6
0
void Gui::draw() {
	if (_engine->_isGameOver) {
		_wm.draw();

		return;
	}

	if (!_engine->_world->_player->_currentScene)
		return;

	if (_scene != _engine->_world->_player->_currentScene) {
		_sceneDirty = true;

		_scene = _engine->_world->_player->_currentScene;

		_sceneWindow->setDimensions(*_scene->_designBounds);
		_sceneWindow->setTitle(_scene->_name);
		_consoleWindow->setDimensions(*_scene->_textBounds);

		_wm.setFullRefresh(true);
	}

	drawScene();
	drawConsole();

	_wm.draw();

	if (_cursorDirty && _cursorRect.left < _screen.w && _cursorRect.bottom < _screen.h) {
		g_system->copyRectToScreen(_screen.getBasePtr(_cursorRect.left, _cursorRect.top), _screen.pitch,
				_cursorRect.left, _cursorRect.top, _cursorRect.width(), _cursorRect.height());

		_cursorDirty = false;
	}

	_sceneDirty = false;
	_consoleDirty = false;
	_consoleFullRedraw = false;
}
Example #7
0
    void draw() {
        ofSetupScreenOrtho(0,0,OF_ORIENTATION_UNKNOWN,true,-200,200);
        ofScale(globalScale,globalScale);
        ofSetColor(255);

        bg.draw(0,0);
        
        //ofSetColor(0);
        //ofDrawBitmapString("?",ofGetWidth()-16,ofGetHeight()-16);

        ofSetColor(255);
        canvas.draw();
        if (debug) canvas.drawDebug();
        side.draw();
        shapes.draw(shapeButtons.x,shapeButtons.y);
        if (ultimaker.isStartTagFound) thermometer.draw();
        ofSetColor(0);

        ofSetColor(255);
        btnHelp.draw(btnHelpPos);
        
        if (debug) drawConsole();
    }