Review windowShow
This commit is contained in:
parent
029a84a113
commit
b36ac50425
|
@ -1172,7 +1172,7 @@ static void showHelp()
|
|||
if (backgroundFrmImage.lock(backgroundFid)) {
|
||||
paletteSetEntries(gPaletteBlack);
|
||||
blitBufferToBuffer(backgroundFrmImage.getData(), HELP_SCREEN_WIDTH, HELP_SCREEN_HEIGHT, HELP_SCREEN_WIDTH, windowBuffer, HELP_SCREEN_WIDTH);
|
||||
windowUnhide(win);
|
||||
windowShow(win);
|
||||
colorPaletteLoad("art\\intrface\\helpscrn.pal");
|
||||
paletteSetEntries(_cmap);
|
||||
|
||||
|
|
|
@ -1058,7 +1058,7 @@ void gameDialogRenderSupplementaryMessage(char* msg)
|
|||
379,
|
||||
_colorTable[992] | 0x2000000);
|
||||
|
||||
windowUnhide(_gd_replyWin);
|
||||
windowShow(_gd_replyWin);
|
||||
windowRefresh(gGameDialogReplyWindow);
|
||||
}
|
||||
|
||||
|
@ -1236,11 +1236,11 @@ static int gdHide()
|
|||
static int gdUnhide()
|
||||
{
|
||||
if (_gd_replyWin != -1) {
|
||||
windowUnhide(_gd_replyWin);
|
||||
windowShow(_gd_replyWin);
|
||||
}
|
||||
|
||||
if (_gd_optionsWin != -1) {
|
||||
windowUnhide(_gd_optionsWin);
|
||||
windowShow(_gd_optionsWin);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -797,7 +797,7 @@ void _intface_show()
|
|||
interfaceUpdateItems(false, INTERFACE_ITEM_ACTION_DEFAULT, INTERFACE_ITEM_ACTION_DEFAULT);
|
||||
interfaceRenderHitPoints(false);
|
||||
interfaceRenderArmorClass(false);
|
||||
windowUnhide(gInterfaceBarWindow);
|
||||
windowShow(gInterfaceBarWindow);
|
||||
sidePanelsShow();
|
||||
_intfaceHidden = false;
|
||||
}
|
||||
|
@ -2577,11 +2577,11 @@ static void sidePanelsHide()
|
|||
static void sidePanelsShow()
|
||||
{
|
||||
if (gInterfaceSidePanelsLeadingWindow != -1) {
|
||||
windowUnhide(gInterfaceSidePanelsLeadingWindow);
|
||||
windowShow(gInterfaceSidePanelsLeadingWindow);
|
||||
}
|
||||
|
||||
if (gInterfaceSidePanelsTrailingWindow != -1) {
|
||||
windowUnhide(gInterfaceSidePanelsTrailingWindow);
|
||||
windowShow(gInterfaceSidePanelsTrailingWindow);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -995,7 +995,7 @@ static void mainMenuWindowUnhide(bool animate)
|
|||
return;
|
||||
}
|
||||
|
||||
windowUnhide(gMainMenuWindow);
|
||||
windowShow(gMainMenuWindow);
|
||||
|
||||
if (animate) {
|
||||
colorPaletteLoad("color.pal");
|
||||
|
|
|
@ -300,7 +300,7 @@ void _map_init()
|
|||
mapNewMap();
|
||||
tickersAdd(gameMouseRefresh);
|
||||
_gmouse_disable(0);
|
||||
windowUnhide(gIsoWindow);
|
||||
windowShow(gIsoWindow);
|
||||
|
||||
messageListRepositorySetStandardMessageList(STANDARD_MESSAGE_LIST_MAP, &gMapMessageList);
|
||||
}
|
||||
|
|
|
@ -470,7 +470,7 @@ int _scriptsCheckGameEvents(int* moviePtr, int window)
|
|||
gameMoviePlay(movie, movieFlags);
|
||||
|
||||
if (window != -1) {
|
||||
windowUnhide(window);
|
||||
windowShow(window);
|
||||
}
|
||||
|
||||
if (adjustRep) {
|
||||
|
|
|
@ -657,40 +657,41 @@ void windowFill(int win, int x, int y, int width, int height, int a6)
|
|||
}
|
||||
|
||||
// 0x4D6DAC
|
||||
void windowUnhide(int win)
|
||||
void windowShow(int win)
|
||||
{
|
||||
Window* window;
|
||||
int v3;
|
||||
int v5;
|
||||
int v7;
|
||||
Window* v6;
|
||||
|
||||
window = windowGetWindow(win);
|
||||
v3 = gWindowIndexes[window->id];
|
||||
Window* window = windowGetWindow(win);
|
||||
int index = gWindowIndexes[window->id];
|
||||
|
||||
if (!gWindowSystemInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (window->flags & WINDOW_HIDDEN) {
|
||||
if ((window->flags & WINDOW_HIDDEN) != 0) {
|
||||
window->flags &= ~WINDOW_HIDDEN;
|
||||
if (v3 == gWindowsLength - 1) {
|
||||
if (index == gWindowsLength - 1) {
|
||||
_GNW_win_refresh(window, &(window->rect), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
v5 = gWindowsLength - 1;
|
||||
if (v3 < v5 && !(window->flags & WINDOW_DONT_MOVE_TOP)) {
|
||||
v7 = v3;
|
||||
while (v3 < v5 && ((window->flags & WINDOW_MOVE_ON_TOP) || !(gWindows[v7 + 1]->flags & WINDOW_MOVE_ON_TOP))) {
|
||||
v6 = gWindows[v7 + 1];
|
||||
gWindows[v7] = v6;
|
||||
v7++;
|
||||
gWindowIndexes[v6->id] = v3++;
|
||||
if (index < gWindowsLength - 1 && (window->flags & WINDOW_DONT_MOVE_TOP) == 0) {
|
||||
while (index < gWindowsLength - 1) {
|
||||
Window* nextWindow = gWindows[index + 1];
|
||||
if ((window->flags & WINDOW_MOVE_ON_TOP) == 0 && (nextWindow->flags & WINDOW_MOVE_ON_TOP) != 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
gWindows[v3] = window;
|
||||
gWindowIndexes[window->id] = v3;
|
||||
gWindows[index] = nextWindow;
|
||||
gWindowIndexes[nextWindow->id] = index;
|
||||
index++;
|
||||
}
|
||||
|
||||
gWindows[index] = window;
|
||||
gWindowIndexes[window->id] = index;
|
||||
_GNW_win_refresh(window, &(window->rect), NULL);
|
||||
} else {
|
||||
// SFALL: Fix for the window with the "DontMoveTop" flag not being
|
||||
// redrawn after the show function call if it is not the topmost
|
||||
// one.
|
||||
_GNW_win_refresh(window, &(window->rect), NULL);
|
||||
}
|
||||
}
|
||||
|
@ -1016,7 +1017,7 @@ void _win_drag(int win)
|
|||
return;
|
||||
}
|
||||
|
||||
windowUnhide(win);
|
||||
windowShow(win);
|
||||
|
||||
Rect rect;
|
||||
rectCopy(&rect, &(window->rect));
|
||||
|
@ -1741,7 +1742,7 @@ int _GNW_check_buttons(Window* window, int* keyCodePtr)
|
|||
window->clickedButton = NULL;
|
||||
}
|
||||
} else {
|
||||
windowUnhide(window->id);
|
||||
windowShow(window->id);
|
||||
}
|
||||
|
||||
if (prevHoveredButton != NULL) {
|
||||
|
|
|
@ -158,7 +158,7 @@ void _win_text(int win, char** fileNameList, int fileNameListLength, int maxWidt
|
|||
void windowDrawLine(int win, int left, int top, int right, int bottom, int color);
|
||||
void windowDrawRect(int win, int left, int top, int right, int bottom, int color);
|
||||
void windowFill(int win, int x, int y, int width, int height, int a6);
|
||||
void windowUnhide(int win);
|
||||
void windowShow(int win);
|
||||
void windowHide(int win);
|
||||
void windowRefresh(int win);
|
||||
void windowRefreshRect(int win, const Rect* rect);
|
||||
|
|
Loading…
Reference in New Issue