Commit eae39322 authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 4b6162ee a8748406
...@@ -1782,8 +1782,8 @@ void Game::OnResize() { ...@@ -1782,8 +1782,8 @@ void Game::OnResize() {
btnReset->setRelativePosition(recti(1, 1, width, height)); btnReset->setRelativePosition(recti(1, 1, width, height));
} }
wCardImg->setRelativePosition(Resize(1, 1, 1 + CARD_IMG_WIDTH + 20, 1 + CARD_IMG_HEIGHT + 18)); wCardImg->setRelativePosition(ResizeCard(1, 1, 20, 18));
imgCard->setRelativePosition(Resize(10, 9, 10 + CARD_IMG_WIDTH, 9 + CARD_IMG_HEIGHT)); imgCard->setRelativePosition(ResizeCard(10, 9, 0, 0));
wInfos->setRelativePosition(Resize(1, 275, 301, 639)); wInfos->setRelativePosition(Resize(1, 275, 301, 639));
stName->setRelativePosition(recti(10, 10, 287 * xScale, 32)); stName->setRelativePosition(recti(10, 10, 287 * xScale, 32));
lstLog->setRelativePosition(Resize(10, 10, 290, 290)); lstLog->setRelativePosition(Resize(10, 10, 290, 290));
...@@ -1867,6 +1867,18 @@ recti Game::ResizeElem(s32 x, s32 y, s32 x2, s32 y2) { ...@@ -1867,6 +1867,18 @@ recti Game::ResizeElem(s32 x, s32 y, s32 x2, s32 y2) {
y2 = sy + y; y2 = sy + y;
return recti(x, y, x2, y2); return recti(x, y, x2, y2);
} }
recti Game::ResizeCard(s32 x, s32 y, s32 x2, s32 y2) {
float mul = xScale;
if(xScale > yScale)
mul = yScale;
s32 sx = CARD_IMG_WIDTH * mul + x2 * xScale;
s32 sy = CARD_IMG_HEIGHT * mul + y2 * yScale;
x = x * xScale;
y = y * yScale;
x2 = sx + x;
y2 = sy + y;
return recti(x, y, x2, y2);
}
void Game::SetWindowsIcon() { void Game::SetWindowsIcon() {
#ifdef _WIN32 #ifdef _WIN32
HINSTANCE hInstance = (HINSTANCE)GetModuleHandleW(NULL); HINSTANCE hInstance = (HINSTANCE)GetModuleHandleW(NULL);
......
...@@ -174,6 +174,7 @@ public: ...@@ -174,6 +174,7 @@ public:
position2di ResizeReverse(s32 x, s32 y); position2di ResizeReverse(s32 x, s32 y);
recti ResizeElem(s32 x, s32 y, s32 x2, s32 y2); recti ResizeElem(s32 x, s32 y, s32 x2, s32 y2);
recti ResizeWin(s32 x, s32 y, s32 x2, s32 y2, bool chat = false); recti ResizeWin(s32 x, s32 y, s32 x2, s32 y2, bool chat = false);
recti ResizeCard(s32 x, s32 y, s32 x2, s32 y2);
void SetWindowsIcon(); void SetWindowsIcon();
void FlashWindow(); void FlashWindow();
......
Subproject commit 06182cf9ce381e3aba3e74368c9fd803c975ca04 Subproject commit c8902079735e21f3300e80e6d7ea2afdc71d447d
Subproject commit 5f197f2d2cd3a619b48ce30d20b57a7fe5bb0d65 Subproject commit 891444b15972bc6d52f36df1fe9ae306c45563b7
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment