Commit 64e638d8 authored by nanahira's avatar nanahira Committed by GitHub

update select option dialog

now it works fine with `mainGame->yScale`.
parent 4bfcd40e
...@@ -619,7 +619,7 @@ void ClientField::ShowSelectOption(int select_hint) { ...@@ -619,7 +619,7 @@ void ClientField::ShowSelectOption(int select_hint) {
for(int i = 0; i < 5; i++) for(int i = 0; i < 5; i++)
mainGame->btnOption[i]->setVisible(i < count); mainGame->btnOption[i]->setVisible(i < count);
recti pos = mainGame->wOptions->getRelativePosition(); recti pos = mainGame->wOptions->getRelativePosition();
int newheight = 30 + 40 * count; int newheight = (30 + 40 * count) * mainGame->yScale;
int oldheight = pos.LowerRightCorner.Y - pos.UpperLeftCorner.Y; int oldheight = pos.LowerRightCorner.Y - pos.UpperLeftCorner.Y;
pos.UpperLeftCorner.Y = pos.UpperLeftCorner.Y + (oldheight - newheight) / 2; pos.UpperLeftCorner.Y = pos.UpperLeftCorner.Y + (oldheight - newheight) / 2;
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + newheight; pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + newheight;
...@@ -634,7 +634,7 @@ void ClientField::ShowSelectOption(int select_hint) { ...@@ -634,7 +634,7 @@ void ClientField::ShowSelectOption(int select_hint) {
for(int i = 0; i < 5; i++) for(int i = 0; i < 5; i++)
mainGame->btnOption[i]->setVisible(false); mainGame->btnOption[i]->setVisible(false);
recti pos = mainGame->wOptions->getRelativePosition(); recti pos = mainGame->wOptions->getRelativePosition();
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 140; pos.LowerRightCorner.Y = ((pos.UpperLeftCorner.Y / mainGame->yScale) + 140) * mainGame->yScale;
mainGame->wOptions->setRelativePosition(pos); mainGame->wOptions->setRelativePosition(pos);
} }
if(select_hint) if(select_hint)
...@@ -1513,4 +1513,4 @@ void ClientField::RefreshCardCountDisplay() { ...@@ -1513,4 +1513,4 @@ void ClientField::RefreshCardCountDisplay() {
mainGame->dInfo.card_count_color[1] = 0xffffffff; mainGame->dInfo.card_count_color[1] = 0xffffffff;
} }
} }
} }
\ No newline at end of file
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