void Menu_Init(menuDef_t *menu) { memset(menu, 0, sizeof(menuDef_t)); menu->cursorItem = -1; menu->fadeAmount = DC->Assets.fadeAmount; menu->fadeClamp = DC->Assets.fadeClamp; menu->fadeCycle = DC->Assets.fadeCycle; // by default, do NOT use item hotkey mode menu->itemHotkeyMode = qfalse; Window_Init(&menu->window); }
bool Renderer_Init( unsigned width, unsigned height, const char* title ) { Window_Init( width, height, title, FULL_SCREEN ); bool Initialisation = false; Initialisation = Init_Device(); assert( Initialisation ); Initialisation = Init_Vertex_Buffer(); assert( Initialisation ); Setup_Rasterization(); return Initialisation; }
int listener(int event_id, int wparam, int lparam) { static int setup_h; switch (event_id) { case PXE_RUN_CREATE_EVENT: TaskMngr_AppSetName(my_application, 0, 0, 0); // Устанавливам чуствительность тачскрина setup_h = SetUP_GetHandle(); SetUP_SetTouchpadSensitivity(setup_h, TOUCHPAD_SENSITIVITY_SET, 1); Window_Create(WINDOW_ID_SCREEN, Window_EventHandler); Window_Init(WINDOW_ID_SCREEN); return 1; case PXE_RUN_DESTROY_EVENT: SetUP_CloseHandle(setup_h); // Уничтожаем окно Window_DestroyAll(); ElfDestroy(); return 1; //Событие при активации приложения case PXE_RUN_RESUME_EVENT: Window_TransEvent(PXE_RUN_PAINT_EVENT, 0, 0); SetUP_SetTouchpadSensitivity(setup_h, TOUCHPAD_SENSITIVITY_SET, 1); return 1; case PXE_RUN_SUSPEND_EVENT: SetUP_SetTouchpadSensitivity(setup_h, TOUCHPAD_SENSITIVITY_DEFAULT, 0); return 1; default: Window_TransEvent(event_id, wparam, lparam); return 1; } }