X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=fa44e771c24fd1632412edd15630c186f533aaca;hb=dd84b7b1787629d37dd3cabeb8c5c6218190730f;hp=6ba029e74cb795b1b0e8902d34a678d9a47d89f7;hpb=548bc4ec64319d780a7bc38a6d0141bf526c7e16;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 6ba029e7..fa44e771 100644 --- a/src/screens.c +++ b/src/screens.c @@ -505,8 +505,8 @@ static void DrawCursorAndText_Main_Ext(int nr, boolean active_text, if (pos_text != NULL && text != NULL) { struct MenuPosInfo *pos = pos_text; - int x = mSX + ALIGNED_XPOS(pos->x, pos->width, pos->align); - int y = mSY + pos->y; + int x = mSX + ALIGNED_MENU_XPOS(pos); + int y = mSY + ALIGNED_MENU_YPOS(pos); DrawBackgroundForFont(x, y, pos->width, pos->height, font_text); DrawText(x, y, text, font_text); @@ -515,8 +515,8 @@ static void DrawCursorAndText_Main_Ext(int nr, boolean active_text, if (pos_input != NULL && input != NULL) { struct MenuPosInfo *pos = pos_input; - int x = mSX + ALIGNED_XPOS(pos->x, pos->width, pos->align); - int y = mSY + pos->y; + int x = mSX + ALIGNED_MENU_XPOS(pos); + int y = mSY + ALIGNED_MENU_YPOS(pos); DrawBackgroundForFont(x, y, pos->width, pos->height, font_input); DrawText(x, y, input, font_input); @@ -553,8 +553,8 @@ static boolean insideMenuPosRect(struct MenuPosInfo *rect, int x, int y) if (rect == NULL) return FALSE; - int rect_x = ALIGNED_XPOS(rect->x, rect->width, rect->align); - int rect_y = rect->y; + int rect_x = ALIGNED_MENU_XPOS(rect); + int rect_y = ALIGNED_MENU_YPOS(rect); return (x >= rect_x && x < rect_x + rect->width && y >= rect_y && y < rect_y + rect->height); @@ -2587,8 +2587,8 @@ void HandleTypeName(int newxpos, Key key) struct MainControlInfo *mci = getMainControlInfo(MAIN_CONTROL_NAME); #if 1 struct MenuPosInfo *pos = mci->pos_input; - int startx = mSX + ALIGNED_XPOS(pos->x, pos->width, pos->align); - int starty = mSY + pos->y; + int startx = mSX + ALIGNED_MENU_XPOS(pos); + int starty = mSY + ALIGNED_MENU_YPOS(pos); #endif #if 1 static int xpos = 0;