Commit 9783f9e7 authored by VanillaSalt's avatar VanillaSalt

fix

parent 9240b001
......@@ -1577,7 +1577,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break;
}
case irr::KEY_KEY_R: {
if(!event.KeyInput.PressedDown && !mainGame->env->hasFocus(mainGame->ebChatInput))
if(!event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX))
mainGame->textFont->setTransparency(true);
break;
}
......@@ -1588,7 +1588,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case irr::KEY_F6:
case irr::KEY_F7: {
if(!event.KeyInput.PressedDown && !mainGame->dInfo.isReplay && mainGame->dInfo.player_type != 7 && mainGame->dInfo.isStarted
&& !mainGame->wCardDisplay->isVisible() && !mainGame->env->hasFocus(mainGame->ebChatInput)) {
&& !mainGame->wCardDisplay->isVisible() && !mainGame->HasFocus(EGUIET_EDIT_BOX)) {
int loc_id = 0;
display_cards.clear();
switch(event.KeyInput.Key) {
......
......@@ -97,6 +97,11 @@ public:
int LocalPlayer(int player);
const wchar_t* LocalName(int local_player);
bool HasFocus(EGUI_ELEMENT_TYPE type) const {
irr::gui::IGUIElement* focus = env->getFocus();
return focus && focus->hasType(type);
}
Mutex gMutex;
Mutex gBuffer;
Signal frameSignal;
......
Subproject commit e8420f07388d2f47adab11ba8d3fd5d3462837dd
Subproject commit f7089e78827fea0aebc245639b27f59f76f5f35f
Subproject commit 6324c1c9b481348acba68f704da3ff6bea2f65d6
Subproject commit 741b50f028be514a8a9ab950836e3cbf74c5875e
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