Skip to content

Commit

Permalink
Merge pull request KranX#600 from XiadaOku/chat-fix
Browse files Browse the repository at this point in the history
chat fixes
  • Loading branch information
stalkerg authored Aug 13, 2022
2 parents b4f3bb0 + b3c54de commit 76577dd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/iscreen/i_chat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ void iChatInit(void)
int x,y,sx,sy,bsx,col0,col1,bcol;
iChatButton* p;

sx = ICS_HISTORY_SIZE_X + ICS_DELTA + ICS_BUTTON_SIZE_X + (XGR_MAXX - 800);
sy = ICS_HISTORY_SIZE_Y + ICS_DELTA * 2 + ICS_BUTTON_SIZE_Y * 2 + (XGR_MAXY - 600);
sx = ICS_HISTORY_SIZE_X + ICS_DELTA + ICS_BUTTON_SIZE_X;
sy = ICS_HISTORY_SIZE_Y + ICS_DELTA * 2 + ICS_BUTTON_SIZE_Y * 2;

// bsx = (sx - ICS_DELTA * 2) / 3;
bsx = (ICS_HISTORY_SIZE_X - ICS_DELTA * 2) / 3;
Expand All @@ -481,13 +481,16 @@ void iChatInit(void)
bcol = ICS_BORDER_COLOR;
else {
y -= 30;
x -= (XGR_MAXX - 800) / 2;
y -= (XGR_MAXY - 600) / 2;
bcol = ICS_iBORDER_COLOR;
}

iChatButtons = new XList;

iChatHistory = new iChatHistoryScreen;
iChatHistory -> init(x,y + (ICS_BUTTON_SIZE_Y + ICS_DELTA) * 1,ICS_HISTORY_SIZE_X,ICS_HISTORY_SIZE_Y,bcol,bcol);
iChatHistory -> position = std::max(0, message_dispatcher.ListSize - ICS_HISTORY_MAX_MESSAGES);

iChatInput = new iChatInputField;
iChatInput -> init(x,y + ICS_HISTORY_SIZE_Y + ICS_DELTA + (ICS_BUTTON_SIZE_Y + ICS_DELTA) * 1,ICS_HISTORY_SIZE_X,ICS_BUTTON_SIZE_Y,bcol,bcol);
Expand Down

0 comments on commit 76577dd

Please sign in to comment.