void ArxDbgDbAdeskLogo::commonDraw(AcGiCommonDraw* drawContext) { if (drawContext->regenAbort()) return; AcGeMatrix3d scaleMat; m_scale.getMatrix(scaleMat); AcGeMatrix3d mat; getEcs(mat); // push ECS of this Logo mat *= scaleMat; drawContext->rawGeometry()->pushModelTransform(mat); ArxDbgDbAdeskLogoStyle* lStyle = NULL; Acad::ErrorStatus es = acdbOpenObject(lStyle, m_logoStyleId, AcDb::kForRead); drawLogo(drawContext, lStyle); drawLabel(drawContext, lStyle); drawBorder(drawContext, lStyle); if (es == Acad::eOk) lStyle->close(); drawContext->rawGeometry()->popModelTransform(); drawRefLine(drawContext); }
// // MAIN: Keyboard check example // void main(void) { // 32 bits counter, to let it count passed 65536 (up to 4 Billions) u32 i; // Disable firmware to prevent it from interfering with setVideoMode cpct_disableFirmware(); // Convert palettes from firmware colour values to // hardware colours (which are used by cpct_setPalette) cpct_fw2hw(G_banner_palette, 16); cpct_fw2hw(G_logo_palette, 4); // Set the border white, using colour 0 from G_banner_palette // after converting the colours to hardware values cpct_setBorder(G_banner_palette[0]); // Infinite main loop while (1) { // Draw CPCtelera's Logo and wait for a while drawLogo(); for(i=0; i < WAITLOOPS; ++i); // Draw CPCtelera's Banner and wait for a while drawBanner(); for(i=0; i < WAITLOOPS; ++i); } }
void CursynthGui::redrawBase() { erase(); refresh(); drawLogo(); drawModulationMatrix(); curs_set(0); }
void Menu() { int done = 0; int ctrl = 0; // Set video mode based on aspect ratio if(CONF_GetAspectRatio() == CONF_ASPECT_16_9) isWide = 1; setVideoMode(); drawLogo(); dListTotal = findPaks(); dListCurrentPosition = 0; if(dListTotal != 1) { sortList(); getAllLogs(); initMenu(1); drawMenu(); pControl = ControlMenu; while(!done) { ctrl = Control(); switch(ctrl) { case 1: case 2: done = 1; break; case 3: drawLogs(); break; case -1: drawMenu(); break; case -2: // BGM player isn't supported break; } } freeAllLogs(); termMenu(); if(ctrl == 2) { if (filelist) { free(filelist); filelist = NULL; } borExit(0); } } getBasePath(packfile, filelist[dListCurrentPosition+dListScrollPosition].filename, 1); free(filelist); }
//--------------------------------------------------------------------- void SaveloadDraw::update() { DrawGraph(0, 0, image_back, TRUE); drawSavedata(); DrawGraph(0, 0, image_margin, TRUE); drawButtonPage(); drawButtonBack(); drawLogo(); }
static void initMain(void){ // Method for displaying the screen for the main menu drawLogo(); RIT128x96x4StringDraw("Classic", 10, 50, 15); RIT128x96x4StringDraw("Continuous", 10, 60, 15); RIT128x96x4StringDraw("Instructions", 10, 70, 15); RIT128x96x4StringDraw("High Scores", 10, 80, 15); drawPointer(50); }
void InsetSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const { frontend::FontMetrics const & fm = theFontMetrics(mi.base.font); dim.asc = fm.maxAscent(); dim.des = 0; dim.wid = 0; docstring s; switch (kind_) { case ALLOWBREAK: dim.asc = fm.xHeight(); dim.des = fm.descent('g'); dim.wid = fm.em() / 8; break; case LIGATURE_BREAK: s = from_ascii("|"); break; case END_OF_SENTENCE: s = from_ascii("."); break; case LDOTS: s = from_ascii(". . ."); break; case MENU_SEPARATOR: // ▹ U+25B9 WHITE RIGHT-POINTING SMALL TRIANGLE // There is a \thinspace on each side of the triangle dim.wid = 2 * fm.em() / 6 + fm.width(char_type(0x25B9)); break; case HYPHENATION: dim.wid = fm.width(from_ascii("-")); if (dim.wid > 5) dim.wid -= 2; // to make it look shorter break; case SLASH: s = from_ascii("/"); dim.des = fm.descent(s[0]); break; case NOBREAKDASH: s = from_ascii("-"); break; case PHRASE_LYX: case PHRASE_TEX: case PHRASE_LATEX2E: case PHRASE_LATEX: dim.asc = fm.maxAscent(); dim.des = fm.maxDescent(); frontend::NullPainter np; PainterInfo pi(mi.base.bv, np); pi.base.font = mi.base.font; drawLogo(pi, dim.wid, 0, kind_); break; } if (dim.wid == 0) dim.wid = fm.width(s); }
void CursynthGui::drawHelp() { erase(); drawLogo(); move(7, 41); attron(A_BOLD); printw(gettext("INFO")); attroff(A_BOLD); move(8, 43); printw(gettext("version")); printw(" - "); printw(VERSION); move(9, 43); printw(gettext("website")); printw(" - gnu.org/software/cursynth"); move(10, 43); printw(gettext("contact")); printw(" - "); printw(PACKAGE_BUGREPORT); move(12, 41); attron(A_BOLD); printw(gettext("CONTROLS")); attroff(A_BOLD); move(14, 43); printw("awsedftgyhujkolp;' - "); printw(gettext("a playable keyboard")); move(16, 43); printw("`1234567890 - "); printw(gettext("a slider for the current selected control")); move(18, 43); printw(gettext("up/down")); printw(" - "); printw(gettext("previous/next control")); move(20, 43); printw(gettext("left/right")); printw(" - "); printw(gettext("decrement/increment control")); move(22, 43); printw(gettext("F1 (or [shift] + H)")); printw(" - "); printw(gettext("help/controls")); move(24, 43); printw(gettext("[shift] + L")); printw(" - "); printw(gettext("browse/load patches")); move(26, 43); printw(gettext("[shift] + S")); printw(" - "); printw(gettext("save patch")); move(28, 43); printw("m - "); printw(gettext("arm MIDI learn")); move(30, 43); printw("c - "); printw(gettext("erase MIDI learn")); }
void DisplayModulo::drawSplashScreen() { setFillColor(.27,0,.24); setLineColor(0,0,0); drawRect(0, 0, width(), height()); setCursor(0, 40); setTextSize(1); setTextColor(1,1,1); print(" MODULO"); setLineColor(0,0,0,0); setFillColor(1,1,1); drawLogo(width()/2-18, 10, 35, 26); }
void RunningDraw::draw(bool start){ Settings* s = Settings::getInstance(); if (start){ ofBackground(255); //ofTranslate(40, 40); ofSetColor(0); ofRect(0, 0, s->getWidth(), s->getHeight()); } // drawHeader(); drawTeams(start); if(start){ drawLogo(); } }
// draw void draw(void) { MMouse * mouse = MMouse::getInstance(); MRenderingContext * render = MEngine::getInstance()->getRenderingContext(); Maratis::getInstance()->graphicLoop(); if(logo) { set2dMode(render); render->setBlendingMode(M_BLENDING_ALPHA); render->enableTexture(); render->setColor4(MVector4(1.0f)); drawLogo(); } if(mouse->isLeftButtonPushed() || mouse->isMiddleButtonPushed() || (mouse->getWheelDirection() != 0)) logo = false; MWindow::getInstance()->swapBuffer(); }
void LogoDrawer::draw(QPainter *painter, const QRectF &bg) { const double w = bg.width(); const double h = bg.height(); painter->save(); painter->setPen(Qt::NoPen); painter->setRenderHint(QPainter::Antialiasing); painter->save(); painter->scale(w, h); painter->fillRect(bg, m_bgBrush); painter->restore(); painter->save(); painter->scale(w, h); painter->setOpacity(0.2); painter->setBrush(m_lightBrush); painter->drawPath(m_lightPath); painter->restore(); drawLogo(painter, bg); painter->restore(); }
void menuFrame(void) { if(!d3dScreen)initProjectionMatrix(&menuCamera, 70*90, inttof32(4)/3, inttof32(2), inttof32(1000)); else initProjectionMatrixBottom(&menuCamera, 70*90, inttof32(4)/3, inttof32(2), inttof32(1000)); projectCamera(&menuCamera); glLoadIdentity(); glLight(0, RGB15(31,31,31), cosLerp(lightAngle)>>3, 0, sinLerp(lightAngle)>>3); GFX_CLEAR_COLOR=RGB15(0,0,0)|(31<<16); scanKeys(); touchRead(¤tTouch); if((keysHeld() & KEY_R) && (keysHeld() & KEY_L))changeState(&menuState); if(keysHeld() & KEY_R)tempState.position=addVect(tempState.position,vect(0,0,inttof32(1)/64)); if(keysHeld() & KEY_L)tempState.position=addVect(tempState.position,vect(0,0,-inttof32(1)/64)); if(keysHeld() & KEY_UP)tempState.position=addVect(tempState.position,vect(0,inttof32(1)/64,0)); if(keysHeld() & KEY_DOWN)tempState.position=addVect(tempState.position,vect(0,-inttof32(1)/64,0)); if(keysHeld() & KEY_RIGHT)tempState.position=addVect(tempState.position,vect(inttof32(1)/64,0,0)); if(keysHeld() & KEY_LEFT)tempState.position=addVect(tempState.position,vect(-inttof32(1)/64,0,0)); //TEMP (updateCamera stuff) menuCamera.viewPosition=menuCamera.position; // if(keysHeld() & KEY_A)lightAngle+=128; // else if(keysHeld() & KEY_B)lightAngle-=128; if(keysHeld() & KEY_A)tempState.angle.x+=64; if(keysHeld() & KEY_B)tempState.angle.x-=64; if(keysHeld() & KEY_X)tempState.angle.y+=64; if(keysHeld() & KEY_Y)tempState.angle.y-=64; if(keysHeld() & KEY_START)tempState.angle.z+=64; if(keysHeld() & KEY_SELECT)tempState.angle.z-=64; // if(keysUp() & KEY_TOUCH) // { // if(tempbool)testTransition=startCameraTransition(&cameraStates[1],&cameraStates[0],64); // else testTransition=startCameraTransition(&cameraStates[0],&cameraStates[1],64); // tempbool^=1; // } if(!(keysHeld() & KEY_TOUCH)) updateSimpleGui(-1, -1); else updateSimpleGui(currentTouch.px, currentTouch.py); // applyCameraState(&menuCamera,&tempState); updateCameraTransition(&menuCamera,&testTransition); drawMenuScene(); switch(d3dScreen) { case true: drawSimpleGui(); updateMenuScene(); break; default: if(logoAlpha)drawLogo(); break; } glFlush(0); swiWaitForVBlank(); updateD3D(); }
// returns 1 if should restart char __fastcall__ runMenu(char canReturn) { if (canReturn) { playSound(SOUND_STNMOV); } waitForEscReleased(); drawLogo(); // printCentered("akronyme analogiker", 0); // printCentered("presents", 1); enterNumberInMenuItem(caMenus[2][0] + 15, getEffectsVolume()); enterNumberInMenuItem(caMenus[2][1] + 13, getMusicVolume()); menu = 0; item = 0; stackDepth = 0; drawMenu(canReturn); while (menu != 255) { oldKeys = moveKeys; oldCtrlKeys = ctrlKeys; moveKeys = readInput(); ctrlKeys = getControlKeys(); if (keyPressed(KEY_FORWARD)) { char oldItem = item; --item; if (item == 255) item = menuSize-1; drawMenuItem(oldItem); drawMenuItem(item); playSound(SOUND_STNMOV); } if (keyPressed(KEY_BACK)) { char oldItem = item; ++item; if (item == menuSize) item = 0; drawMenuItem(oldItem); drawMenuItem(item); playSound(SOUND_STNMOV); } if (menu == 2) { if (keyPressed(KEY_MOVERIGHT) || ctrlKeyPressed(KEY_RETURN)) { if (item == 0) { addToEffectsVolume(1); } else if (item == 1) { addToMusicVolume(1); } } if (keyPressed(KEY_MOVELEFT)) { if (item == 0) { addToEffectsVolume(255); } else if (item == 1) { addToMusicVolume(255); } } } if (ctrlKeyPressed(KEY_ESC)) { if (stackDepth == 0) { if (canReturn) { playSound(SOUND_OOF); waitForEscReleased(); return 0; } } else { playSound(SOUND_OOF); --stackDepth; menu = menuStack[stackDepth]; item = itemStack[stackDepth]; drawMenu(canReturn); } } if (ctrlKeyPressed(KEY_RETURN)) { signed char next; if (menu == 1) episode = item; next = nextMenu[menu][item]; if (next == -66) { playSound(SOUND_OOF); return 0; } else if (next != -10) { playSound(SOUND_PISTOL); if (next >= 0) { if (next > menu) { menuStack[stackDepth] = menu; itemStack[stackDepth] = item; ++stackDepth; item = 0; } else { --stackDepth; item = itemStack[stackDepth]; } menu = next; drawMenu(canReturn); } else { next = (-next)-1; clearScreen(); waitForRaster(30); load_full_text_screen(textScreens[next]); setupBitmap(8 + 2); // multicolor red drawLogo(); drawMenu(canReturn); } } else if (menu == 3) { stopMusic(); playSound(SOUND_PISTOL); clearScreen(); waitForRaster(30); difficulty = item; return 1; } } } }
// doIntro - display the game intro and wait for menu selections // returns FALSE if user selects exit, TRUE otherwise short int doIntro(short int *gamespeed, short int *gamedifficulty) { short int selector = MENUSTART, done = FALSE, key, options = FALSE, selection = 0; short int speed = *gamespeed, difficulty = *gamedifficulty; // clear the screen ClrScr(); // draw the intro screen drawBorder(); drawLogo(); drawMenu(); drawCopyright(); drawSelector(selector); while (!done) { // wait for keypress while ((key = getKey()) == 0); if (key == KUP) { // move up the menu drawSelector(selector); if (selector == MENUSTART) { selector = MENUEND; } else { selector -= MENUSTEP; } drawSelector(selector); } else if (key == KDOWN) { // move down the menu drawSelector(selector); if (selector == MENUEND) { selector = MENUSTART; } else { selector += MENUSTEP; } drawSelector(selector); } else if (key == KLEFT) { if (options) { // if we are in the options menu selection = (selector - MENUSTART) / MENUSTEP; // set the speed option if (selection == START) { // same as speed option -- option 1 == SPEED drawSpeedOption(speed); if (speed == VERYSLOW) { speed = VERYFAST; } else { speed--; } drawSpeedOption(speed); // set the difficulty option } else if (selection == OPTIONS) { // same as difficulty option -- option 2 == DIFFICULTY drawDifficultyOption(difficulty); if (difficulty == EASY) { difficulty = HARD; } else { difficulty--; } drawDifficultyOption(difficulty); } } } else if (key == KENTER || key == KRIGHT) { // select menu option selection = (selector - MENUSTART) / MENUSTEP; if (options) { // if we're in the options menu // exit the options menu if (selection == QUIT) { // close options menu options = FALSE; // switch the options and main menus drawOptionsMenu(speed,difficulty); drawMenu(); // reset the selector drawSelector(selector); selector = MENUSTART; drawSelector(selector); } else if (selection == START) { // same as speed option -- option 1 == SPEED drawSpeedOption(speed); if (speed == VERYFAST) { speed = VERYSLOW; } else { speed++; } drawSpeedOption(speed); } else if (selection == OPTIONS) { // same as difficulty option -- option 2 == DIFFICULTY drawDifficultyOption(difficulty); if (difficulty == HARD) { difficulty = EASY; } else { difficulty++; } drawDifficultyOption(difficulty); } } else { // if we chose to start or exit, end the loop if (selection == START || selection == QUIT) { done = TRUE; } else { // enter the options menu options = TRUE; // switch the main and options menus drawMenu(); drawOptionsMenu(speed,difficulty); // reset the selector drawSelector(selector); selector = MENUSTART; drawSelector(selector); } } } else if (key == KESC) { // exit the options menu if (options) { // close options menu options = FALSE; // switch the options and main menus drawOptionsMenu(speed,difficulty); drawMenu(); // reset the selector drawSelector(selector); selector = MENUSTART; drawSelector(selector); } else { selection = QUIT; done = TRUE; } } // wait for keypress to dissipate delay(KEYDELAY); } // set the game options *gamespeed = speed; *gamedifficulty = difficulty; return (selection == START) ? TRUE : FALSE; }
// drawHiScoreBoard - draws the hiscore board, and updates it with the hiscore from the latest game void drawHiScoreBoard(unsigned long int newscore) { SCORE scores[MAX_HISCORES]; short int loop, pos = -1; char name[10], str[50], *error = "File I/O Error"; HANDLE dlg; // restore interrupt handlers OSSetSR(0x0000); if (!loadHiScores(scores)) { // cannot open hiscore file -- display error DlgMessage(error,"Unable to Load HiScore Data",BT_OK,BT_NONE); return; } // check if latest score is a highscore for (loop = (MAX_HISCORES - 1); loop >= 0; loop--) { if (newscore > scores[loop].score) { // new HiScore!! pos = loop; } } if (pos != -1) { // if we found a new hiscore if ((dlg = DialogNewSimple(DLGWIDTH,DLGHEIGHT)) == H_NULL) { DlgMessage("Memory Allocation Error","Not Enough Free Memory!",BT_OK,BT_NONE); } else { DialogAddTitle(dlg,"New Hiscore!",BT_OK,BT_NONE); DialogAddRequest(dlg,5,25,"Your Name:",0,9,11); sprintf(str,"You earned the #%hd hiscore position!",pos+1); DialogAddText(dlg,5,15,str); do { // truncate name variable name[0] = 0; } while (DialogDo(dlg,CENTER,CENTER,name,NULL) != KEY_ENTER); // free the dialog box memory HeapFree(dlg); // move the hiscore list down if (pos < (MAX_HISCORES - 1)) { for (loop = (MAX_HISCORES - 1); loop > pos; loop--) { scores[loop].score = scores[loop - 1].score; scores[loop].name[0] = 0; strcpy(scores[loop].name,scores[loop - 1].name); } } // fill in the new hiscore scores[pos].score = newscore; scores[pos].name[0] = 0; strcpy(scores[pos].name,name); if (!saveHiScores(scores)) { DlgMessage(error,"Unable to save HiScore Board",BT_OK,BT_NONE); } } } // display the hiscore board // clear the screen ClrScr(); // draw the screen borders drawBorder(); // draw the game logo drawLogo(); FontSetSys(F_8x10); DrawStr(25,35,"Hiscore Board",A_NORMAL); FontSetSys(F_6x8); for (loop = 0; loop < 5; loop++) { printf_xy(20,50+loop*10,"#%hd %-9s %lu",loop+1,scores[loop].name,scores[loop].score); } ngetchx(); // disable interrupts OSSetSR(0x0700); // wait for keypresses to dissipate delay(KEYDELAY); }
void CursynthGui::drawMain() { erase(); drawLogo(); drawModulationMatrix(); }
void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) const { FontInfo font = pi.base.font; switch (kind_) { case HYPHENATION: { font.setColor(Color_special); pi.pain.text(x, y, char_type('-'), font); break; } case ALLOWBREAK: { // A small vertical line int const asc = theFontMetrics(pi.base.font).xHeight(); int const desc = theFontMetrics(pi.base.font).descent('g'); int const x0 = x; // x + 1; // FIXME: incline, int const x1 = x; // x - 1; // similar to LibreOffice? int const y0 = y + desc; int const y1 = y - asc / 3; pi.pain.line(x0, y1, x1, y0, Color_special); break; } case LIGATURE_BREAK: { font.setColor(Color_special); pi.pain.text(x, y, char_type('|'), font); break; } case END_OF_SENTENCE: { font.setColor(Color_special); pi.pain.text(x, y, char_type('.'), font); break; } case LDOTS: { font.setColor(Color_special); string ell = ". . . "; docstring dell(ell.begin(), ell.end()); pi.pain.text(x, y, dell, font); break; } case MENU_SEPARATOR: { frontend::FontMetrics const & fm = theFontMetrics(font); // There is a \thinspace on each side of the triangle x += fm.em() / 6; // ▹ U+25B9 WHITE RIGHT-POINTING SMALL TRIANGLE // ◃ U+25C3 WHITE LEFT-POINTING SMALL TRIANGLE char_type const c = pi.ltr_pos ? 0x25B9 : 0x25C3; font.setColor(Color_special); pi.pain.text(x, y, c, font); break; } case SLASH: { font.setColor(Color_special); pi.pain.text(x, y, char_type('/'), font); break; } case NOBREAKDASH: { font.setColor(Color_latex); pi.pain.text(x, y, char_type('-'), font); break; } case PHRASE_LYX: case PHRASE_TEX: case PHRASE_LATEX2E: case PHRASE_LATEX: drawLogo(pi, x, y, kind_); break; } }
void Game::drawHeader() { drawLogo(); }