diff --git a/po/colobot.pot b/po/colobot.pot index c7639f72..3d411f9e 100644 --- a/po/colobot.pot +++ b/po/colobot.pot @@ -399,6 +399,9 @@ msgstr "" msgid "Quake at explosions\\The screen shakes at explosions" msgstr "" +msgid "System mouse\\Use system mouse cursor" +msgstr "" + msgid "Automatic indent\\When program editing" msgstr "" diff --git a/po/de.po b/po/de.po index dc41575c..70f3eeab 100644 --- a/po/de.po +++ b/po/de.po @@ -1452,6 +1452,9 @@ msgstr "Überlebenskit" msgid "Switch bots <-> buildings" msgstr "Anzeige Roboter <-> Bauten" +msgid "System mouse\\Use system mouse cursor" +msgstr "" + msgid "Take off to finish the mission" msgstr "Abheben nach vollbrachter Mission" diff --git a/po/fr.po b/po/fr.po index c632eaea..3eef7581 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1448,6 +1448,9 @@ msgstr "Sac de survie" msgid "Switch bots <-> buildings" msgstr "Permute robots <-> bâtiments" +msgid "System mouse\\Use system mouse cursor" +msgstr "" + msgid "Take off to finish the mission" msgstr "Décolle pour terminer la mission" diff --git a/po/pl.po b/po/pl.po index a36a63d2..6df509e7 100644 --- a/po/pl.po +++ b/po/pl.po @@ -1449,6 +1449,9 @@ msgstr "Zestaw przetrwania" msgid "Switch bots <-> buildings" msgstr "Przełącz roboty <-> budynki" +msgid "System mouse\\Use system mouse cursor" +msgstr "Systemowy kursor\\Użyj systemowego kursora myszy" + msgid "Take off to finish the mission" msgstr "Odleć, aby zakończyć misję" diff --git a/po/ru.po b/po/ru.po index 84901917..7b063707 100644 --- a/po/ru.po +++ b/po/ru.po @@ -1444,6 +1444,9 @@ msgstr "Аптечка" msgid "Switch bots <-> buildings" msgstr "Переключение между ботами и зданиями" +msgid "System mouse\\Use system mouse cursor" +msgstr "" + msgid "Take off to finish the mission" msgstr "Взлететь, чтобы закончить миссию" diff --git a/src/common/event.cpp b/src/common/event.cpp index f87eefe7..d0ecfb44 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -209,6 +209,7 @@ void InitializeEventTypeTexts() EVENT_TYPE_TEXT[EVENT_INTERFACE_INVERTX] = "EVENT_INTERFACE_INVERTX"; EVENT_TYPE_TEXT[EVENT_INTERFACE_INVERTY] = "EVENT_INTERFACE_INVERTY"; EVENT_TYPE_TEXT[EVENT_INTERFACE_EFFECT] = "EVENT_INTERFACE_EFFECT"; + EVENT_TYPE_TEXT[EVENT_INTERFACE_MOUSE] = "EVENT_INTERFACE_MOUSE"; EVENT_TYPE_TEXT[EVENT_INTERFACE_GROUND] = "EVENT_INTERFACE_GROUND"; EVENT_TYPE_TEXT[EVENT_INTERFACE_GADGET] = "EVENT_INTERFACE_GADGET"; EVENT_TYPE_TEXT[EVENT_INTERFACE_FOG] = "EVENT_INTERFACE_FOG"; diff --git a/src/common/event.h b/src/common/event.h index 1d14e0b0..7566ec96 100644 --- a/src/common/event.h +++ b/src/common/event.h @@ -232,6 +232,7 @@ enum EventType EVENT_INTERFACE_INVERTX = 468, EVENT_INTERFACE_INVERTY = 469, EVENT_INTERFACE_EFFECT = 470, + EVENT_INTERFACE_MOUSE = 471, EVENT_INTERFACE_GROUND = 472, EVENT_INTERFACE_GADGET = 473, EVENT_INTERFACE_FOG = 474, diff --git a/src/common/restext.cpp b/src/common/restext.cpp index 4883587f..0d89d031 100644 --- a/src/common/restext.cpp +++ b/src/common/restext.cpp @@ -206,6 +206,7 @@ void InitializeRestext() stringsEvent[EVENT_INTERFACE_INVERTX] = TR("Mouse inversion X\\Inversion of the scrolling direction on the X axis"); stringsEvent[EVENT_INTERFACE_INVERTY] = TR("Mouse inversion Y\\Inversion of the scrolling direction on the Y axis"); stringsEvent[EVENT_INTERFACE_EFFECT] = TR("Quake at explosions\\The screen shakes at explosions"); + stringsEvent[EVENT_INTERFACE_MOUSE] = TR("System mouse\\Use system mouse cursor"); stringsEvent[EVENT_INTERFACE_EDITMODE] = TR("Automatic indent\\When program editing"); stringsEvent[EVENT_INTERFACE_EDITVALUE] = TR("Big indent\\Indent 2 or 4 spaces per level defined by braces"); stringsEvent[EVENT_INTERFACE_SOLUCE4] = TR("Access to solutions\\Show program \"4: Solution\" in the exercises"); diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp index 665197e4..12826657 100644 --- a/src/ui/maindialog.cpp +++ b/src/ui/maindialog.cpp @@ -1303,6 +1303,8 @@ void CMainDialog::ChangePhase(Phase phase) pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_RAIN); pc->SetState(STATE_SHADOW); pos.y -= 0.048f; + pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_MOUSE); + pc->SetState(STATE_SHADOW); pos.y -= 0.048f; pos.y -= 0.048f; if ( !m_bSimulSetup ) @@ -2526,6 +2528,16 @@ bool CMainDialog::EventProcess(const Event &event) UpdateSetupButtons(); break; + case EVENT_INTERFACE_MOUSE: + if (m_app->GetMouseMode() == MOUSE_SYSTEM) + m_app->SetMouseMode(MOUSE_ENGINE); + else + m_app->SetMouseMode(MOUSE_SYSTEM); + + ChangeSetupButtons(); + UpdateSetupButtons(); + break; + case EVENT_INTERFACE_EDITMODE: m_engine->SetEditIndentMode(!m_engine->GetEditIndentMode()); ChangeSetupButtons(); @@ -4692,6 +4704,12 @@ void CMainDialog::UpdateSetupButtons() pc->SetState(STATE_CHECK, m_bRain); } + pc = static_cast(pw->SearchControl(EVENT_INTERFACE_MOUSE)); + if ( pc != 0 ) + { + pc->SetState(STATE_CHECK, m_app->GetMouseMode() == MOUSE_SYSTEM); + } + pc = static_cast(pw->SearchControl(EVENT_INTERFACE_EDITMODE)); if ( pc != 0 ) { @@ -5002,6 +5020,7 @@ void CMainDialog::SetupMemorize() GetProfile().SetIntProperty("Setup", "MusicVolume", m_sound->GetMusicVolume()); GetProfile().SetIntProperty("Setup", "EditIndentMode", m_engine->GetEditIndentMode()); GetProfile().SetIntProperty("Setup", "EditIndentValue", m_engine->GetEditIndentValue()); + GetProfile().SetIntProperty("Setup", "SystemMouse", m_app->GetMouseMode() == MOUSE_SYSTEM); GetProfile().SetIntProperty("Setup", "MipmapLevel", m_engine->GetTextureMipmapLevel()); GetProfile().SetIntProperty("Setup", "Anisotropy", m_engine->GetTextureAnisotropyLevel()); @@ -5076,6 +5095,11 @@ void CMainDialog::SetupRecall() m_bRain = iValue; } + if ( GetProfile().GetIntProperty("Setup", "SystemMouse", iValue) ) + { + m_app->SetMouseMode(iValue ? MOUSE_SYSTEM : MOUSE_ENGINE); + } + if ( GetProfile().GetIntProperty("Setup", "Soluce4", iValue) ) { m_bSoluce4 = iValue;