Commit 6a8e2d4f authored by edo9300's avatar edo9300

Merge remote-tracking branch 'refs/remotes/Fluorohydride/master'

parents baa0386b 7cf1125a
...@@ -138,6 +138,7 @@ public: ...@@ -138,6 +138,7 @@ public:
void ShowCancelOrFinishButton(int buttonOp); void ShowCancelOrFinishButton(int buttonOp);
void SetShowMark(ClientCard* pcard, bool enable); void SetShowMark(ClientCard* pcard, bool enable);
void SetResponseSelectedCards() const; void SetResponseSelectedCards() const;
void CancelOrFinish();
}; };
} }
......
...@@ -643,6 +643,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -643,6 +643,11 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case irr::EMIE_MOUSE_WHEEL: { case irr::EMIE_MOUSE_WHEEL: {
if(!mainGame->scrFilter->isVisible()) if(!mainGame->scrFilter->isVisible())
break; break;
if(mainGame->env->hasFocus(mainGame->scrFilter))
break;
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(mouse_pos) != root)
break;
if(event.MouseInput.Wheel < 0) { if(event.MouseInput.Wheel < 0) {
if(mainGame->scrFilter->getPos() < mainGame->scrFilter->getMax()) if(mainGame->scrFilter->getPos() < mainGame->scrFilter->getMax())
mainGame->scrFilter->setPos(mainGame->scrFilter->getPos() + 1); mainGame->scrFilter->setPos(mainGame->scrFilter->getPos() + 1);
......
...@@ -203,6 +203,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) { ...@@ -203,6 +203,7 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
mainGame->btnCreateHost->setEnabled(true); mainGame->btnCreateHost->setEnabled(true);
mainGame->btnJoinHost->setEnabled(true); mainGame->btnJoinHost->setEnabled(true);
mainGame->btnJoinCancel->setEnabled(true); mainGame->btnJoinCancel->setEnabled(true);
mainGame->stTip->setVisible(false);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->closeDoneSignal.Reset(); mainGame->closeDoneSignal.Reset();
mainGame->closeSignal.Set(); mainGame->closeSignal.Set();
......
This diff is collapsed.
...@@ -736,7 +736,7 @@ void Game::MainLoop() { ...@@ -736,7 +736,7 @@ void Game::MainLoop() {
atkdy = (float)sin(atkframe); atkdy = (float)sin(atkframe);
driver->beginScene(true, true, SColor(0, 0, 0, 0)); driver->beginScene(true, true, SColor(0, 0, 0, 0));
gMutex.Lock(); gMutex.Lock();
if(dInfo.isStarted) { if(dInfo.isStarted || dInfo.isReplaySkiping) {
if (showcardcode == 1 || showcardcode == 3) if (showcardcode == 1 || showcardcode == 3)
PlayMusic("./sound/duelwin.mp3", true); PlayMusic("./sound/duelwin.mp3", true);
else if (showcardcode == 2) else if (showcardcode == 2)
...@@ -836,6 +836,8 @@ void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cH ...@@ -836,6 +836,8 @@ void Game::InitStaticText(irr::gui::IGUIStaticText* pControl, u32 cWidth, u32 cH
SetStaticText(pControl, cWidth - 10, font, text); SetStaticText(pControl, cWidth - 10, font, text);
if(font->getDimension(dataManager.strBuffer).Height <= cHeight) { if(font->getDimension(dataManager.strBuffer).Height <= cHeight) {
scrCardText->setVisible(false); scrCardText->setVisible(false);
if(env->hasFocus(scrCardText))
env->removeFocus(scrCardText);
return; return;
} }
const auto& tsize = scrCardText->getRelativePosition(); const auto& tsize = scrCardText->getRelativePosition();
......
...@@ -47,7 +47,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -47,7 +47,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
switch(event.GUIEvent.EventType) { switch(event.GUIEvent.EventType) {
case irr::gui::EGET_ELEMENT_HOVERED: { case irr::gui::EGET_ELEMENT_HOVERED: {
// Set cursor to an I-Beam if hovering over an edit box // Set cursor to an I-Beam if hovering over an edit box
if (event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX) if (event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX && event.GUIEvent.Caller->isEnabled())
{ {
utils.changeCursor(ECI_IBEAM); utils.changeCursor(ECI_IBEAM);
} }
...@@ -55,7 +55,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -55,7 +55,7 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
} }
case irr::gui::EGET_ELEMENT_LEFT: { case irr::gui::EGET_ELEMENT_LEFT: {
// Set cursor to normal if left an edit box // Set cursor to normal if left an edit box
if (event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX) if (event.GUIEvent.Caller->getType() == EGUIET_EDIT_BOX && event.GUIEvent.Caller->isEnabled())
{ {
utils.changeCursor(ECI_NORMAL); utils.changeCursor(ECI_NORMAL);
} }
......
This diff is collapsed.
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