mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
add ini setting for capturing mouse on start
This commit is contained in:
12
EU07.cpp
12
EU07.cpp
@@ -365,8 +365,15 @@ int main(int argc, char *argv[])
|
||||
::SetWindowPos( Hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
|
||||
#endif
|
||||
|
||||
if (Global.captureonstart)
|
||||
{
|
||||
Global.ControlPicking = false;
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor
|
||||
}
|
||||
else
|
||||
Global.ControlPicking = true;
|
||||
|
||||
try {
|
||||
Global.ControlPicking = true;
|
||||
|
||||
if ((false == GfxRenderer.Init(window))
|
||||
|| (false == UILayer.init(window)))
|
||||
@@ -422,9 +429,6 @@ int main(int argc, char *argv[])
|
||||
Console::On(); // włączenie konsoli
|
||||
#endif
|
||||
|
||||
Global.ControlPicking = false;
|
||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor
|
||||
|
||||
try {
|
||||
while( ( false == glfwWindowShouldClose( window ) )
|
||||
&& ( true == World.Update() )
|
||||
|
||||
@@ -669,6 +669,10 @@ global_settings::ConfigParse(cParser &Parser) {
|
||||
Parser.getTokens( 1 );
|
||||
Parser >> compress_tex;
|
||||
}
|
||||
else if (token == "captureonstart") {
|
||||
Parser.getTokens( 1 );
|
||||
Parser >> captureonstart;
|
||||
}
|
||||
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
|
||||
// na koniec trochę zależności
|
||||
if (!bLoadTraction) // wczytywanie drutów i słupów
|
||||
|
||||
Reference in New Issue
Block a user