Example #1
0
void SaveOverlay::renderOverlay()
{
    Window *win = getWindow();
    if(win == NULL)
        return;

    win->clear();

    if(action == 0)
    	win->AttribOn(COLOR_PAIR(30));
    win->printAt(10, 2, "SAVEGARDER");
    win->AttribOff(COLOR_PAIR(30));
    if(action == 1)
    	win->AttribOn(COLOR_PAIR(30));
    win->printAt(-17, 2, "CHARGER");
    win->AttribOff(COLOR_PAIR(30));

    if(askSlot)
    {
    	int slot = 0;
	    win->printAt(2, 4, "Slot : 0");
	    win->readAnyAt(9, 4, "%d", &slot);
	    close();
	    close();
	    if(action == 0)
	    	this->game->saveState(slot);
	    else if(action == 1)
	    	this->game->restoreState(slot);
	    action = -1;
	    ungetch(-1);
    }
}
Example #2
0
void CellCursor::drawBox()
{
    Window *win = getWindow();
    if(win == NULL)
        return;

    win->AttribResetOff();
    drawBox(prev_x, prev_y);

    win->AttribOn(COLOR_PAIR(this->color));
    drawBox(x, y);
    win->AttribOff(COLOR_PAIR(this->color));

    win->refresh();

}