Commit 28b54186 authored by mercury233's avatar mercury233

Merge branch 'resize' into test

parents 154f11d1 b529edff
......@@ -132,7 +132,7 @@ void ClientCard::UpdateInfo(char* buf) {
int l = BufferIO::ReadInt8(buf);
int s = BufferIO::ReadInt8(buf);
BufferIO::ReadInt8(buf);
ClientCard* ecard = mainGame->dField.GetCard(c, l, s);
ClientCard* ecard = mainGame->dField.GetCard(mainGame->LocalPlayer(c), l, s);
equipTarget = ecard;
ecard->equipped.insert(this);
}
......@@ -143,7 +143,7 @@ void ClientCard::UpdateInfo(char* buf) {
int l = BufferIO::ReadInt8(buf);
int s = BufferIO::ReadInt8(buf);
BufferIO::ReadInt8(buf);
ClientCard* tcard = mainGame->dField.GetCard(c, l, s);
ClientCard* tcard = mainGame->dField.GetCard(mainGame->LocalPlayer(c), l, s);
cardTarget.insert(tcard);
tcard->ownerTarget.insert(this);
}
......
......@@ -677,15 +677,15 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
return false;
}
void DeckBuilder::GetHoveredCard() {
int pre_code = hovered_code;
hovered_pos = 0;
hovered_code = 0;
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(mouse_pos) != root)
return;
position2di pos = mainGame->ResizeReverse(mouse_pos.X, mouse_pos.Y);
int x = pos.X;
int y = pos.Y;
int pre_code = hovered_code;
hovered_pos = 0;
hovered_code = 0;
is_lastcard = 0;
if(x >= 314 && x <= 794) {
if(y >= 164 && y <= 435) {
......
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