Пример #1
0
static bool doBlank;
static f_displayStaticFunc displayStaticFunc;
static f_displayFunc displayFunc;

static inline void drawStatic(void);

void display_setMode(byte mode)
{
	static byte displayMode = DISPLAY_MODE_BLANK;
	if(mode != displayMode || mode == DISPLAY_MODE_BLANK)
	{
		displayMode = mode;
		
		switch(mode)
		{
			case 0:
				displayStaticFunc = displayMode1Static;
				displayFunc = displayMode1;
				break;
			case 1:
				displayStaticFunc = displayMode2Static;
				displayFunc = displayMode2;
				break;
			case 255:
				displayStaticFunc = NULL;
				displayFunc = NULL;
				break;
			default:
				break;
Пример #2
0
void CrewUI::onGui()
{
    if (mySpaceship)
    {
        switch(showPosition)
        {
        case helmsOfficer:
            helmsUI();
            break;
        case weaponsOfficer:
            weaponsUI();
            break;
        case engineering:
            engineeringUI();
            break;
        case scienceOfficer:
            scienceUI();
            break;
        case commsOfficer:
            commsUI();
            break;
        default:
            drawStatic();
            text(sf::FloatRect(0, 500, 1600, 100), "???", AlignCenter, 100);
            break;
        }
        if (myPlayerInfo->main_screen_control)
            mainScreenSelectGUI();
    }else{
        drawStatic();
    }

    int offset = 0;
    for(int n=0; n<maxCrewPositions; n++)
    {
        if (myPlayerInfo->crew_position[n])
        {
            if (toggleButton(sf::FloatRect(200 * offset, 0, 200, 25), showPosition == ECrewPosition(n), getCrewPositionName(ECrewPosition(n)), 20))
            {
                showPosition = ECrewPosition(n);
            }
            offset++;
        }
    }
    
    MainUI::onGui();
}
Пример #3
0
			void drawStatic(T& element, int x, int y)
			{
				drawStatic(element, sf::Vector2i(x, y));
			}
void ViewLevelHistogram::rangeChanged() {
    drawStatic();
}