当前位置: 首页>>代码示例>>C++>>正文


C++ DrawScreen函数代码示例

本文整理汇总了C++中DrawScreen函数的典型用法代码示例。如果您正苦于以下问题:C++ DrawScreen函数的具体用法?C++ DrawScreen怎么用?C++ DrawScreen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DrawScreen函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Button28OnClick

void Button28OnClick() {
    unsigned char l,cnt[4];
    if(i==6) {
        if(a==0) {  
            a=1; 
            i=0; 
            InitMCU();
            SF_Start();
            SF_mem();
            Write_Log("Security armed");             
        }
        else {  
            i=0;
            InitMCU();            
            SF_Start();
            SF_rem();
            Write_Log("Security disarmed");   
        }
        DrawScreen(&System_Log_Screen);
        Delay_ms(2000);
        strcpy(Label24.Caption," ");
        hom=1;
        DrawScreen(&Home);
    }
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:25,代码来源:Mikromedia_HMI_43C_Demo_events_code.c

示例2: SF_mem

void SF_mem()
{
  unsigned char i,l,cnt[4];
  long adr=0x111111;

  for(i=0;i<6;i++) {
    SerialFlash_WriteByte(arm[i],adr);
    adr+=0x000020;
  }

  strcpy(Label24.Caption,"  ******");
  DrawScreen(&System_Log_Screen);
  for(l=0;l<10;l++) {
    ByteToStr(10-l,cnt);
    strcpy(Label25.Caption,"      ");
    strcat(Label25.Caption,cnt);
    DrawScreen(&System_Log_Screen);
    FT812_Sound_SetAndPlay(_FT812_SOUND_CLICK,_FT812_SOUND_PITCH_B3,vol);
    Delay_ms(1000);
  }
  Box30.Color=0x00FF0000;
  Box36.Color=0x00FF0000;
  Image65.Visible=0;
  Image66.Visible=1;
  strcpy(Label25.Caption,"   ARMED");
  strcpy(Label8.Caption,"   ARMED");
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:27,代码来源:Mikromedia_HMI_70C_Demo_main.c

示例3: Gameplay

/**
 * Runs the game.
 * @param track file
 * @return
 */
int Gameplay(FILE* track)
{
  int sleeptime = START_PERIOD;
  int freeze = 0;
  size_t count = 0;
  unsigned planepos = SCREEN_WIDTH / 2;

  DrawScreen();
  while (1)
  {
    usleep(sleeptime);
    if (sleeptime > 100 * 1000)
      sleeptime = sleeptime - sleeptime / 20;

    if (input.key_pressed == quit) //TODO: Handle quit
    {
      break;
    }
    
    if (freeze)
    {
      continue;
    }

    if (!ScrollScreen(track))
    {
      mvprintw(SCREEN_HEIGHT / 2, 10, "   Track completed!   ");
      refresh();
      freeze = 1;
      continue;
    }
    pthread_mutex_lock(&input.lock);
    if ((input.key_pressed == left) && planepos > 0) // TODO: Handle left movement
    {
      planepos--;
      input.key_pressed = not_pressed;
    }
    
    if ((input.key_pressed == right) && planepos < SCREEN_WIDTH - 1) // TODO: Handle right movement
    {
      planepos++;
      input.key_pressed = not_pressed;
    }
    pthread_mutex_unlock(&input.lock);
    
    if (screen[SCREEN_WIDTH * (SCREEN_HEIGHT - 1) + planepos] == OBSTACLE)
    {
      // Ohhh no... Crash!
      mvprintw(SCREEN_HEIGHT / 2, 10, "   CRASH! Game over.   ");
      refresh();
      freeze = 1;
      continue;
    }
    screen[SCREEN_WIDTH * (SCREEN_HEIGHT - 1) + planepos] = PLANE;
    DrawScreen();
    mvprintw(0, 0, " %zu ", count++);
    refresh();
  }
  return 0;
}
开发者ID:tachyo,项目名称:SNP,代码行数:65,代码来源:flight.c

示例4: DrawScreen

bool OpenGLSWFrameBuffer::Wiper_Crossfade::Run(int ticks, OpenGLSWFrameBuffer *fb)
{
	Clock += ticks;

	// Put the initial screen back to the buffer.
	DrawScreen(fb, fb->InitialWipeScreen);

	// Draw the new screen on top of it.
	DrawScreen(fb, fb->FinalWipeScreen, GL_FUNC_ADD, ColorValue(0,0,0,Clock / 32.f), ColorRGBA(255,255,255,0));

	return Clock >= 32;
}
开发者ID:Xane123,项目名称:world-of-kirbycraft,代码行数:12,代码来源:gl_swwipe.cpp

示例5: DrawScreen

bool D3DFB::Wiper_Crossfade::Run(int ticks, D3DFB *fb)
{
	Clock += ticks;

	// Put the initial screen back to the buffer.
	DrawScreen(fb, fb->InitialWipeScreen);

	// Draw the new screen on top of it.
	DrawScreen(fb, fb->FinalWipeScreen, D3DBLENDOP_ADD,
		D3DCOLOR_COLORVALUE(0,0,0,Clock / 32.f), D3DCOLOR_RGBA(255,255,255,0));

	return Clock >= 32;
}
开发者ID:BadSanta1980,项目名称:gzdoom,代码行数:13,代码来源:fb_d3d9_wipe.cpp

示例6: CircleButton7OnPress

void CircleButton7OnPress() {
    if((Box62.Left+Box62.Width)>=(Box64.Left+Box64.Width)) Box64.Left+=1;
    d_l[choice_t]=0+(int)floor((Box64.Left-219)*100/197);
    dim_l[choice_t]=Box64.Left;
    IntToStr(d_l[choice_t],Label97.Caption);
    DrawScreen(&Light_Mode);
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:7,代码来源:Mikromedia_HMI_43C_Demo_events_code.c

示例7: while

void
App::Run()
{
    //
    // Initialize the event handler
    //
    EventManager eventHandler;
    
    // Main game loop
    while(1)
    {
        //
        // Draw the next screen
        //
        
        DrawScreen();
        
        // Step the physics world
        PhysicsWorld::GetInstance()->Step(1.0 / 60.0);
        
        // Sleep
        SDL_Delay(1000.0 / 60.0);
        
        //
        // Handle events
        //
        while(eventHandler.IsEventWaiting())
            eventHandler.HandleEvent();
    }
    
    
}
开发者ID:pkonneker,项目名称:Open2dAdventure,代码行数:32,代码来源:App.cpp

示例8: SM_BT_MMClick

void SM_BT_MMClick() {
// Go back to Main Screen
Counterflag = 0;
remote_mod=0;
DrawScreen(&MainMenu);

}
开发者ID:whuang86cn,项目名称:uC_Dev,代码行数:7,代码来源:ES613_GUI2_SP_events_code.c

示例9: doSettings

void doSettings() {
    BLED_Fade_Out();
    DrawScreen(&Settings);
    BLED_Fade_In();
    Logger_State = 2;

}
开发者ID:jemmicat,项目名称:Ducati_Mikro,代码行数:7,代码来源:User_code.c

示例10: ChangeResolution

void ChangeResolution()
{
if (bFullScreen)
  {
  if (vmVideoMode==vmGraph512)
    sfScreen = SDL_SetVideoMode(512, 384, 8,
                                SDL_SWSURFACE | SDL_FULLSCREEN |
                                SDL_HWPALETTE);
  else if (vmVideoMode==vmGraph800)
    sfScreen = SDL_SetVideoMode(800, 600, 8,
                                SDL_SWSURFACE | SDL_FULLSCREEN |
                                SDL_HWPALETTE);
  else
    sfScreen = SDL_SetVideoMode(640, 480, 8,
                                SDL_SWSURFACE | SDL_FULLSCREEN |
                                SDL_HWPALETTE);
  SDL_ShowCursor(SDL_DISABLE);
  }
else
  {
  if (vmVideoMode==vmGraph512)
    sfScreen = SDL_SetVideoMode(512, 384, 8,
                                SDL_SWSURFACE | SDL_HWPALETTE);
  else if (vmVideoMode==vmGraph800)
    sfScreen = SDL_SetVideoMode(800, 600, 8,
                                SDL_SWSURFACE | SDL_HWPALETTE);
  else
    sfScreen = SDL_SetVideoMode(640, 480, 8,
                                SDL_SWSURFACE | SDL_HWPALETTE);
  SDL_ShowCursor(SDL_ENABLE);
  }
//printf("w=%d, h=%d, pitch=%d\n",SDL_GetVideoSurface()->w,SDL_GetVideoSurface()->h,SDL_GetVideoSurface()->pitch);
SetPalette();
DrawScreen();
}
开发者ID:timtashpulatov,项目名称:emu80,代码行数:35,代码来源:sdllayer.cpp

示例11: Button40OnClick

void Button40OnClick() {
    char i;
    if(ti!=1 && tim[1]!=1) {
        ti=1;
        dat=2;
        Button39.Color=0x00800000;
        Button40.Color=0x00FF0000;
        Button41.Color=0x00800000;
        Button42.Color=0x00800000;
        Button46.Color=0x00800000;
        Label34.Font_Color=0x00FFFFFF;
        Label44.Font_Color=0x00400000;
        Label45.Font_Color=0x00FFFFFF;
        Label71.Font_Color=0x00FFFFFF;
        Label72.Font_Color=0x00FFFFFF;
        
        strcpy(Label44.Caption,"Minutes:  ");
        datum.min=0;
        for(i=2;i<4;i++) {
            date[i]=0;
        }
        
        DrawScreen(&Settings_Screen);
    }
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:25,代码来源:Mikromedia_HMI_43C_Demo_events_code.c

示例12: Button39OnClick

void Button39OnClick() {
    char i;
    if(ti!=0 && tim[0]!=1) {
        ti=0;
        dat=0;
        Button39.Color=0x00FF0000;
        Button40.Color=0x00800000;
        Button41.Color=0x00800000;
        Button42.Color=0x00800000;
        Button46.Color=0x00800000;
        Label34.Font_Color=0x00400000;
        Label44.Font_Color=0x00FFFFFF;
        Label45.Font_Color=0x00FFFFFF;
        Label71.Font_Color=0x00FFFFFF;
        Label72.Font_Color=0x00FFFFFF;
        
        strcpy(Label34.Caption,"Hour:  ");
        datum.hour=0;
        for(i=0;i<2;i++) {
            date[i]=0;
        }
        
        DrawScreen(&Settings_Screen);
    }
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:25,代码来源:Mikromedia_HMI_43C_Demo_events_code.c

示例13: Button11OnClick

void Button11OnClick() {
    unsigned char i;
    strcpy(Label73.Caption,"");
    strcpy(Label75.Caption,"");
    strcpy(Label76.Caption,"");
    strcpy(Label77.Caption,"");
    strcpy(Label78.Caption,"");
    strcpy(Label34.Caption,"Hours:  ");
    strcpy(Label44.Caption,"Minutes:  ");
    strcpy(Label45.Caption,"Day:  ");
    strcpy(Label71.Caption,"Month:  ");
    strcpy(Label72.Caption,"Year:  ");
    for(i=0;i<12;i++) {
        date[i]=0;
    } 
    for(i=0;i<5;i++) {
        tim[i]=0;
    }
    dat=0;
    datum.hour=0;
    datum.min=0;
    datum.day=0;
    datum.mon=0;
    datum.year=0;
    Button39OnClick();
    DrawScreen(&Settings_Screen);    
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:27,代码来源:Mikromedia_HMI_43C_Demo_events_code.c

示例14: Box24OnClick

void Box24OnClick() {
    CheckBox1.Checked=1-CheckBox1.Checked;
    DrawScreen(&Keyboard_Screen);
    vol=255-vol;
    FT812_Sound_SetAndPlay(_FT812_SOUND_XYLOPHONE,_FT812_SOUND_PITCH_B3,vol);
    Delay_ms(1000);
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:7,代码来源:Mikromedia_HMI_43C_Demo_events_code.c

示例15: Button27OnClick

void Button27OnClick() {
    char cnt;
    for(cnt=0;cnt<=5;cnt++) arm[cnt]=0;
    i=0;
    strcpy(Label24.Caption,"");
    DrawScreen(&System_Log_Screen);
}
开发者ID:MikroElektronika,项目名称:mikromedia_HMI,代码行数:7,代码来源:Mikromedia_HMI_43C_Demo_events_code.c


注:本文中的DrawScreen函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。