Commit 6a8e2d4f authored by edo9300's avatar edo9300

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

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