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


C++ GUI_Mouse_Show_Safe函数代码示例

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


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

示例1: GUI_FactoryWindow_FailScrollList

static void GUI_FactoryWindow_FailScrollList(int16 step)
{
	uint16 i;
	uint16 y = 32;

	GUI_FactoryWindow_B495_0F30();

	GUI_Mouse_Hide_Safe();

	GUI_FactoryWindow_B495_0F30();

	for (i = 0; i < 6; i++) {
		y += step;
		GFX_Screen_Copy2(72, y, 72, 16, 32, 136, SCREEN_1, SCREEN_0, false);
	}

	for (i = 0; i < 6; i++) {
		y -= step;
		GFX_Screen_Copy2(72, y, 72, 16, 32, 136, SCREEN_1, SCREEN_0, false);
	}

	GUI_Mouse_Show_Safe();

	GUI_FactoryWindow_UpdateSelection(true);
}
开发者ID:Haozerk,项目名称:OpenDUNE,代码行数:25,代码来源:widget_click.c

示例2: GameLoop_DrawMenu

static void GameLoop_DrawMenu(const char **strings)
{
	WidgetProperties *props;
	uint16 left;
	uint16 top;
	uint8 i;

	props = &g_widgetProperties[21];
	top = g_curWidgetYBase + props->yBase;
	left = (g_curWidgetXBase + props->xBase) << 3;

	GUI_Mouse_Hide_Safe();

	for (i = 0; i < props->height; i++) {
		uint16 pos = top + g_fontCurrent->height * i;

		if (i == props->fgColourBlink) {
			GUI_DrawText_Wrapper(strings[i], left, pos, props->fgColourSelected, 0, 0x22);
		} else {
			GUI_DrawText_Wrapper(strings[i], left, pos, props->fgColourNormal, 0, 0x22);
		}
	}

	GUI_Mouse_Show_Safe();

	Input_History_Clear();
}
开发者ID:166MMX,项目名称:OpenDUNE,代码行数:27,代码来源:opendune.c

示例3: async_GUI_Mentat_ShowOpen

void async_GUI_Mentat_ShowOpen() {
	Sprites_UnloadTiles();

	GUI_Mentat_Display(asyncMentatShow.wsaFilename, g_playerHouseID);

	GFX_Screen_SetActive(2);

	Widget_SetAndPaintCurrentWidget(8);

	if (asyncMentatShow.wsaFilename != NULL) {
		void *wsa;

		wsa = WSA_LoadFile(asyncMentatShow.wsaFilename, GFX_Screen_Get_ByIndex(5), GFX_Screen_GetSize_ByIndex(5), false);
		WSA_DisplayFrame(wsa, 0, g_curWidgetXBase * 8, g_curWidgetYBase, 2);
		WSA_Unload(wsa);
	}

	GUI_DrawSprite(2, g_sprites[397 + g_playerHouseID * 15], g_shoulderLeft, g_shoulderTop, 0, 0);
	GFX_Screen_SetActive(0);

	GUI_Mouse_Hide_Safe();
	GUI_Screen_Copy(0, 0, 0, 0, SCREEN_WIDTH / 8, SCREEN_HEIGHT, 2, 0);
	GUI_Mouse_Show_Safe();

	GUI_SetPaletteAnimated(g_palette1, 15);

	Async_GUI_Mentat_Loop(asyncMentatShow.wsaFilename, NULL, asyncMentatShow.stringBuffer, true, NULL);
	Async_Storage_uint16(&asyncMentatShow.ret);
}
开发者ID:damajor,项目名称:play-dune,代码行数:29,代码来源:mentat.c

示例4: AsyncGUI_Mentat_ShowHelpList

/**
 * Shows the Help window.
 * @param proceed Display a "Proceed" button if true, "Exit" otherwise.
 */
static void AsyncGUI_Mentat_ShowHelpList(bool proceed)
{
	GUI_Mentat_ShowHelpList_oldScreenID = GFX_Screen_SetActive(2);

	Input_Flags_SetBits(INPUT_FLAG_KEY_REPEAT);
	Input_History_Clear();

	GUI_Mentat_Display(NULL, g_playerHouseID);

	g_widgetMentatFirst = GUI_Widget_Allocate(1, GUI_Widget_GetShortcut(*String_Get_ByIndex(STR_EXIT)), 200, 168, proceed ? 379 : 377, 5);
	g_widgetMentatFirst->shortcut2 = 'n';

	GUI_Mentat_Create_HelpScreen_Widgets();

	GUI_Mouse_Hide_Safe();
	GUI_Screen_Copy(0, 0, 0, 0, SCREEN_WIDTH / 8, SCREEN_HEIGHT, 2, 0);
	GUI_Mouse_Show_Safe();

	GUI_Mentat_LoadHelpSubjects(true);

	GUI_Mentat_Draw(true);

	GFX_Screen_SetActive(0);

	AsyncGUI_Mentat_HelpListLoop();
	Async_InvokeAfterAsync(GUI_Mentat_ShowHelpList_Close);
}
开发者ID:damajor,项目名称:play-dune,代码行数:31,代码来源:mentat.c

示例5: GUI_Window_RestoreScreen

static void GUI_Window_RestoreScreen(WindowDesc *desc)
{
	Widget_SetCurrentWidget(desc->index);

	GUI_Mouse_Hide_Safe();
	GFX_CopyFromBuffer(g_curWidgetXBase * 8, g_curWidgetYBase, g_curWidgetWidth * 8, g_curWidgetHeight, GFX_Screen_Get_ByIndex(SCREEN_2));
	GUI_Mouse_Show_Safe();
}
开发者ID:Haozerk,项目名称:OpenDUNE,代码行数:8,代码来源:widget_click.c

示例6: GUI_Window_BackupScreen

static void GUI_Window_BackupScreen(WindowDesc *desc)
{
	Widget_SetCurrentWidget(desc->index);

	GUI_Mouse_Hide_Safe();
	GFX_CopyToBuffer(g_curWidgetXBase * 8, g_curWidgetYBase, g_curWidgetWidth * 8, g_curWidgetHeight, GFX_Screen_Get_ByIndex(5));
	GUI_Mouse_Show_Safe();
}
开发者ID:alex-game-of-2012,项目名称:opendune,代码行数:8,代码来源:widget_click.c

示例7: House_UpdateRadarState

/**
 * Updates the radar state for the given house.
 * @param h The house.
 * @return True if and only if the radar has been activated.
 */
bool House_UpdateRadarState(House *h)
{
	void *wsa;
	uint16 frame;
	uint16 frameCount;
	bool activate;

	if (h == NULL || h->index != g_playerHouseID) return false;

	wsa = NULL;

	activate = h->flags.radarActivated;

	if (h->flags.radarActivated) {
		/* Deactivate radar */
		if ((h->structuresBuilt & (1 << STRUCTURE_OUTPOST)) == 0 || h->powerProduction < h->powerUsage) activate = false;
	} else {
		/* Activate radar */
		if ((h->structuresBuilt & (1 << STRUCTURE_OUTPOST)) != 0 && h->powerProduction >= h->powerUsage) activate = true;
	}

	if (h->flags.radarActivated == activate) return false;

	wsa = WSA_LoadFile("STATIC.WSA", GFX_Screen_Get_ByIndex(3), GFX_Screen_GetSize_ByIndex(3), true);
	frameCount = WSA_GetFrameCount(wsa);

	g_textDisplayNeedsUpdate = true;

	GUI_Mouse_Hide_Safe();

	while (Driver_Voice_IsPlaying()) sleepIdle();

	Voice_Play(62);

	Sound_Output_Feedback(activate ? 28 : 29);

	frameCount = WSA_GetFrameCount(wsa);

	for (frame = 0; frame < frameCount; frame++) {
		WSA_DisplayFrame(wsa, activate ? frameCount - frame : frame, 256, 136, 0);
		GUI_PaletteAnimate();

		g_timerTimeout = 3;
		while (g_timerTimeout != 0) sleepIdle();
	}

	h->flags.radarActivated = activate;

	WSA_Unload(wsa);

	g_viewport_forceRedraw = true;

	GUI_Mouse_Show_Safe();

	GUI_Widget_Viewport_RedrawMap(0);

	return activate;
}
开发者ID:damajor,项目名称:play-dune,代码行数:63,代码来源:house.c

示例8: GUI_Mentat_Show

/**
 * Show the Mentat screen.
 * @param spriteBuffer The buffer of the strings.
 * @param wsaFilename The WSA to show.
 * @param w The widgets to handle. Can be NULL for no widgets.
 * @param unknown A boolean.
 * @return Return value of GUI_Widget_HandleEvents() or f__B4DA_0AB8_002A_AAB2() (latter when no widgets).
 */
uint16 GUI_Mentat_Show(char *stringBuffer, const char *wsaFilename, Widget *w, bool unknown)
{
    uint16 ret;

    Sprites_UnloadTiles();

    GUI_Mentat_Display(wsaFilename, g_playerHouseID);

    GFX_Screen_SetActive(SCREEN_1);

    Widget_SetAndPaintCurrentWidget(8);

    if (wsaFilename != NULL) {
        void *wsa;

        wsa = WSA_LoadFile(wsaFilename, GFX_Screen_Get_ByIndex(SCREEN_2), GFX_Screen_GetSize_ByIndex(SCREEN_2), false);
        WSA_DisplayFrame(wsa, 0, g_curWidgetXBase * 8, g_curWidgetYBase, SCREEN_1);
        WSA_Unload(wsa);
    }

    GUI_DrawSprite(SCREEN_1, g_sprites[397 + g_playerHouseID * 15], g_shoulderLeft, g_shoulderTop, 0, 0);
    GFX_Screen_SetActive(SCREEN_0);

    GUI_Mouse_Hide_Safe();
    GUI_Screen_Copy(0, 0, 0, 0, SCREEN_WIDTH / 8, SCREEN_HEIGHT, SCREEN_1, SCREEN_0);
    GUI_Mouse_Show_Safe();

    GUI_SetPaletteAnimated(g_palette1, 15);

    ret = GUI_Mentat_Loop(wsaFilename, NULL, stringBuffer, true, NULL);

    if (w != NULL) {
        do {
            GUI_Widget_DrawAll(w);
            ret = GUI_Widget_HandleEvents(w);

            GUI_PaletteAnimate();
            GUI_Mentat_Animation(0);

            sleepIdle();
        } while ((ret & 0x8000) == 0);
    }

    Input_History_Clear();

    if (unknown) {
        Load_Palette_Mercenaries();
        Sprites_LoadTiles();
    }

    return ret;
}
开发者ID:gnaghi,项目名称:OpenDUNE,代码行数:60,代码来源:mentat.c

示例9: GameLoop_DrawText2

static void GameLoop_DrawText2(const char *string, uint16 left, uint16 top, uint8 fgColourNormal, uint8 fgColourSelected, uint8 bgColour)
{
	uint8 i;

	for (i = 0; i < 3; i++) {
		GUI_Mouse_Hide_Safe();

		GUI_DrawText_Wrapper(string, left, top, fgColourSelected, bgColour, 0x22);
		Timer_Sleep(2);

		GUI_DrawText_Wrapper(string, left, top, fgColourNormal, bgColour, 0x22);
		GUI_Mouse_Show_Safe();
		Timer_Sleep(2);
	}
}
开发者ID:166MMX,项目名称:OpenDUNE,代码行数:15,代码来源:opendune.c

示例10: GUI_Mentat_ShowHelpList

/**
 * Shows the Help window.
 * @param proceed Display a "Proceed" button if true, "Exit" otherwise.
 */
static void GUI_Mentat_ShowHelpList(bool proceed)
{
    Screen oldScreenID;

    oldScreenID = GFX_Screen_SetActive(SCREEN_1);

    /* ENHANCEMENT -- After visiting Mentat (the help) window, auto-repeat of keys gets disabled. */
    if (!g_dune2_enhanced) Input_Flags_SetBits(INPUT_FLAG_KEY_REPEAT);
    Input_History_Clear();

    GUI_Mentat_Display(NULL, g_playerHouseID);

    g_widgetMentatFirst = GUI_Widget_Allocate(1, GUI_Widget_GetShortcut(*String_Get_ByIndex(STR_EXIT)), 200, 168, proceed ? 379 : 377, 5);
    g_widgetMentatFirst->shortcut2 = 'n';

    GUI_Mentat_Create_HelpScreen_Widgets();

    GUI_Mouse_Hide_Safe();
    GUI_Screen_Copy(0, 0, 0, 0, SCREEN_WIDTH / 8, SCREEN_HEIGHT, SCREEN_1, SCREEN_0);
    GUI_Mouse_Show_Safe();

    GUI_Mentat_LoadHelpSubjects(true);

    GUI_Mentat_Draw(true);

    GFX_Screen_SetActive(SCREEN_0);

    GUI_Mentat_HelpListLoop();

    free(g_widgetMentatFirst);
    g_widgetMentatFirst = NULL;

    Load_Palette_Mercenaries();

    GUI_Widget_Free_WithScrollbar(g_widgetMentatScrollbar);
    g_widgetMentatScrollbar = NULL;

    free(g_widgetMentatScrollUp);
    g_widgetMentatScrollUp = NULL;
    free(g_widgetMentatScrollDown);
    g_widgetMentatScrollDown = NULL;

    /* ENHANCEMENT -- After visiting Mentat (the help) window, auto-repeat of keys gets disabled. */
    if (!g_dune2_enhanced) Input_Flags_ClearBits(INPUT_FLAG_KEY_REPEAT);

    GFX_Screen_SetActive(oldScreenID);
}
开发者ID:gnaghi,项目名称:OpenDUNE,代码行数:51,代码来源:mentat.c

示例11: GUI_Mentat_ShowHelpList

/**
 * Shows the Help window.
 * @param proceed Display a "Proceed" button if true, "Exit" otherwise.
 */
static void GUI_Mentat_ShowHelpList(bool proceed)
{
	uint16 oldScreenID;

	oldScreenID = GFX_Screen_SetActive(2);

	Input_Flags_SetBits(INPUT_FLAG_KEY_REPEAT);
	Input_History_Clear();

	GUI_Mentat_Display(NULL, g_playerHouseID);

	g_widgetMentatFirst = GUI_Widget_Allocate(1, GUI_Widget_GetShortcut(*String_Get_ByIndex(STR_EXIT)), 200, 168, proceed ? 379 : 377, 5);
	g_widgetMentatFirst->shortcut2 = 'n';

	GUI_Mentat_Create_HelpScreen_Widgets();

	GUI_Mouse_Hide_Safe();
	GUI_Screen_Copy(0, 0, 0, 0, SCREEN_WIDTH / 8, SCREEN_HEIGHT, 2, 0);
	GUI_Mouse_Show_Safe();

	GUI_Mentat_LoadHelpSubjects(true);

	GUI_Mentat_Draw(true);

	GFX_Screen_SetActive(0);

	GUI_Mentat_HelpListLoop();

	free(g_widgetMentatFirst); g_widgetMentatFirst = NULL;

	Load_Palette_Mercenaries();

	GUI_Widget_Free_WithScrollbar(g_widgetMentatScrollbar);
	g_widgetMentatScrollbar = NULL;

	free(g_widgetMentatScrollUp); g_widgetMentatScrollUp = NULL;
	free(g_widgetMentatScrollDown); g_widgetMentatScrollDown = NULL;

	Input_Flags_ClearBits(INPUT_FLAG_KEY_REPEAT);

	GFX_Screen_SetActive(oldScreenID);
}
开发者ID:alex-game-of-2012,项目名称:opendune,代码行数:46,代码来源:mentat.c

示例12: GUI_EditBox_BlinkCursor

/**
 * Draw a blinking cursor, used inside the EditBox.
 *
 * @param positionX Where to draw the cursor on the X position.
 * @param resetBlink If true, the blinking is reset and restarted.
 */
static void GUI_EditBox_BlinkCursor(uint16 positionX, bool resetBlink)
{
	static uint32 tickEditBox = 0;           /* Ticker for cursor blinking. */
	static bool   editBoxShowCursor = false; /* Cursor is active. */

	if (resetBlink) {
		tickEditBox = 0;
		editBoxShowCursor = true;
	}

	if (tickEditBox > g_timerGUI) return;
	if (!resetBlink) {
		tickEditBox = g_timerGUI + 20;
	}

	editBoxShowCursor = !editBoxShowCursor;

	GUI_Mouse_Hide_Safe();
	GUI_DrawFilledRectangle(positionX, g_curWidgetYBase, positionX + Font_GetCharWidth('W'), g_curWidgetYBase + g_curWidgetHeight - 1, (editBoxShowCursor) ? g_curWidgetFGColourBlink : g_curWidgetFGColourNormal);
	GUI_Mouse_Show_Safe();
}
开发者ID:166MMX,项目名称:OpenDUNE,代码行数:27,代码来源:editbox.c

示例13: GUI_Security_Show

/**
 * Ask the security question to the user. Give him 3 times. If he fails,
 *  return false, otherwise true.
 * @return True if and only if the user answered one of the three questions
 *   correct.
 */
bool GUI_Security_Show(void)
{
	const char *wsaHouseFilename;
	uint16 questionsCount;
	uint16 oldCurrentWidget;
	Screen oldScreenID;
	uint16 i;
	bool valid;

	g_disableOtherMovement = true;
	g_interrogation = true;

	wsaHouseFilename = House_GetWSAHouseFilename(g_playerHouseID);
	if (wsaHouseFilename == NULL) return true;

	GUI_SetPaletteAnimated(g_palette2, 15);

	GUI_Mentat_Display(wsaHouseFilename, g_playerHouseID);

	GUI_Mouse_Hide_Safe();
	GUI_Screen_Copy(0, 0, 0, 0, SCREEN_WIDTH / 8, SCREEN_HEIGHT, SCREEN_1, SCREEN_0);
	GUI_Mouse_Show_Safe();

	GUI_SetPaletteAnimated(g_palette1, 15);

	strncpy(g_readBuffer, String_Get_ByIndex(STR_SECURITY_TEXT_HARKONNEN + g_playerHouseID * 3), g_readBufferSize);
	GUI_Mentat_Loop(wsaHouseFilename, NULL, g_readBuffer, true, NULL);

	questionsCount = atoi(String_Get_ByIndex(STR_SECURITY_COUNT));

	oldCurrentWidget = Widget_SetCurrentWidget(8);

	oldScreenID = GFX_Screen_SetActive(SCREEN_2);

	for (i = 0, valid = false; i < 3 && !valid; i++) {
		void *wsa;
		uint16 questionIndex;
		uint32 tickWaitTill;
		char buffer[81];

		questionIndex = Tools_RandomLCG_Range(0, questionsCount - 1) * 3 + STR_SECURITY_QUESTIONS;

		Widget_SetCurrentWidget(8);

		wsa = WSA_LoadFile(String_Get_ByIndex(questionIndex + 1), GFX_Screen_Get_ByIndex(SCREEN_1), GFX_Screen_GetSize_ByIndex(SCREEN_1), false);
		WSA_DisplayFrame(wsa, 0, g_curWidgetXBase << 3, g_curWidgetYBase, SCREEN_2);
		WSA_Unload(wsa);

		GUI_DrawSprite(SCREEN_2, g_sprites[397 + g_playerHouseID * 15], g_shoulderLeft, g_shoulderTop, 0, 0);

		GUI_Mouse_Hide_InWidget(g_curWidgetIndex);
		GUI_Screen_Copy(g_curWidgetXBase, g_curWidgetYBase, g_curWidgetXBase, g_curWidgetYBase, g_curWidgetWidth, g_curWidgetHeight, SCREEN_2, SCREEN_0);
		GUI_Mouse_Show_InWidget();

		strncpy(g_readBuffer, String_Get_ByIndex(questionIndex), g_readBufferSize);
		GUI_Security_DrawText(g_readBuffer);

		g_interrogationTimer = g_timerGUI + (uint32)strlen(g_readBuffer) * 4;

		Widget_SetCurrentWidget(9);

		GUI_Mouse_Hide_Safe();
		GUI_Screen_Copy(g_curWidgetXBase - 1, g_curWidgetYBase - 8, 0, 0, g_curWidgetWidth + 2, g_curWidgetHeight + 16, SCREEN_0, SCREEN_2);
		GUI_Mouse_Show_Safe();

		GFX_Screen_SetActive(SCREEN_0);

		GUI_Mouse_Hide_Safe();
		GUI_DrawBorder((g_curWidgetXBase << 3) - 6, g_curWidgetYBase - 6, (g_curWidgetWidth << 3) + 12, g_curWidgetHeight + 12, 1, true);
		GUI_DrawBorder((g_curWidgetXBase << 3) - 2, g_curWidgetYBase - 2, (g_curWidgetWidth << 3) + 4, g_curWidgetHeight + 4, 2, false);
		GUI_Mouse_Show_Safe();

		Input_History_Clear();

		buffer[0] = 0;

		GUI_DrawText_Wrapper(NULL, 0, 0, 0, 0, 0x22);

		GUI_EditBox(buffer, sizeof(buffer) - 1, 9, NULL, &GUI_Mentat_Tick, 0);

		GUI_Security_UndrawText();

		GUI_Mouse_Hide_Safe();
		GUI_Screen_Copy(0, 0, g_curWidgetXBase - 1, g_curWidgetYBase - 8, g_curWidgetWidth + 2, g_curWidgetHeight + 16, SCREEN_2, SCREEN_0);
		GUI_Mouse_Show_Safe();

		GUI_Security_NormaliseText(buffer);

		strncpy(g_readBuffer, String_Get_ByIndex(questionIndex + 2), g_readBufferSize);
		GUI_Security_NormaliseText(g_readBuffer);

		if (strcasecmp(g_readBuffer, buffer) != 0) {
			strncpy(g_readBuffer, String_Get_ByIndex(STR_SECURITY_WRONG_HARKONNEN + g_playerHouseID * 3), g_readBufferSize);
		} else {
//.........这里部分代码省略.........
开发者ID:gnaghi,项目名称:OpenDUNE,代码行数:101,代码来源:security.c

示例14: GUI_Mentat_Draw

static void GUI_Mentat_Draw(bool force)
{
    static uint16 displayedHelpSubject = 0;

    Screen oldScreenID;
    Widget *line;
    Widget *w = g_widgetMentatTail;
    uint8 *helpSubjects = s_helpSubjects;
    uint16 i;

    if (!force && s_topHelpList == displayedHelpSubject) return;

    displayedHelpSubject = s_topHelpList;

    oldScreenID = GFX_Screen_SetActive(SCREEN_1);

    Widget_SetAndPaintCurrentWidget(8);

    GUI_DrawSprite(SCREEN_1, g_sprites[397 + g_playerHouseID * 15], g_shoulderLeft, g_shoulderTop, 0, 0);

    GUI_DrawText_Wrapper(String_Get_ByIndex(STR_SELECT_SUBJECT), (g_curWidgetXBase << 3) + 16, g_curWidgetYBase + 2, 12, 0, 0x12);
    GUI_DrawText_Wrapper(NULL, 0, 0, 0, 0, 0x11);

    line = GUI_Widget_Get_ByIndex(w, 3);
    for (i = 0; i < 11; i++) {
        line->drawParameterDown.text     = (char *)helpSubjects + 7;
        line->drawParameterSelected.text = (char *)helpSubjects + 7;
        line->drawParameterNormal.text   = (char *)helpSubjects + 7;

        if (helpSubjects[6] == '0') {
            line->offsetX          = 16;
            line->fgColourSelected = 11;
            line->fgColourDown     = 11;
            line->fgColourNormal   = 11;
            line->stringID         = 0x30;
        } else {
            uint8 colour = (i == s_selectedHelpSubject) ? 8 : 15;
            line->offsetX          = 24;
            line->fgColourSelected = colour;
            line->fgColourDown     = colour;
            line->fgColourNormal   = colour;
            line->stringID         = 0x31;
        }

        GUI_Widget_MakeNormal(line, false);
        GUI_Widget_Draw(line);

        line = GUI_Widget_GetNext(line);
        helpSubjects = String_NextString(helpSubjects);
    }

    GUI_Widget_Scrollbar_Init(GUI_Widget_Get_ByIndex(w, 15), s_numberHelpSubjects, 11, s_topHelpList);

    GUI_Widget_Draw(GUI_Widget_Get_ByIndex(w, 16));
    GUI_Widget_Draw(GUI_Widget_Get_ByIndex(w, 17));

    GUI_Mouse_Hide_Safe();
    GUI_Screen_Copy(g_curWidgetXBase, g_curWidgetYBase, g_curWidgetXBase, g_curWidgetYBase, g_curWidgetWidth, g_curWidgetHeight, SCREEN_1, SCREEN_0);
    GUI_Mouse_Show_Safe();
    GFX_Screen_SetActive(oldScreenID);
}
开发者ID:gnaghi,项目名称:OpenDUNE,代码行数:61,代码来源:mentat.c

示例15: GUI_Widget_Savegame_Click

/**
 * Handles Click event for savegame button.
 *
 * @param key The index of the clicked button.
 * @return True if a game has been saved, False otherwise.
 */
static bool GUI_Widget_Savegame_Click(uint16 key)
{
	WindowDesc *desc = &g_savegameNameWindowDesc;
	bool loop;
	char *saveDesc = g_savegameDesc[key];
	uint16 loc08;
	uint16 loc0A;
	bool ret;

	if (*saveDesc == '[') *saveDesc = 0;

	GUI_Window_BackupScreen(desc);

	GUI_Window_Create(desc);

	ret = false;
	loc08 = 1;

	if (*saveDesc == '[') key = s_savegameCountOnDisk;

	GFX_Screen_SetActive(SCREEN_0);

	Widget_SetCurrentWidget(15);

	GUI_Mouse_Hide_Safe();
	GUI_DrawBorder((g_curWidgetXBase << 3) - 1, g_curWidgetYBase - 1, (g_curWidgetWidth << 3) + 2, g_curWidgetHeight + 2, 4, false);
	GUI_Mouse_Show_Safe();

	for (loop = true; loop; sleepIdle()) {
		Widget *w = g_widgetLinkedListTail;

		GUI_DrawText_Wrapper(NULL, 0, 0, 232, 235, 0x22);

		loc0A = GUI_EditBox(saveDesc, 50, 15, g_widgetLinkedListTail, NULL, loc08);
		loc08 = 2;

		if ((loc0A & 0x8000) == 0) continue;

		GUI_Widget_MakeNormal(GUI_Widget_Get_ByIndex(w, loc0A & 0x7FFF), false);

		switch (loc0A & 0x7FFF) {
			case 0x1E:
				if (*saveDesc == 0) break;

				SaveFile(GenerateSavegameFilename(s_savegameIndexBase - key), saveDesc);
				loop = false;
				ret = true;
				break;

			case 0x1F:
				loop = false;
				ret = false;
				FillSavegameDesc(true);
				break;

			default: break;
		}
	}

	GUI_Window_RestoreScreen(desc);

	return ret;
}
开发者ID:Haozerk,项目名称:OpenDUNE,代码行数:69,代码来源:widget_click.c


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