mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19: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 );
|
::SetWindowPos( Hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (Global.captureonstart)
|
||||||
|
{
|
||||||
|
Global.ControlPicking = false;
|
||||||
|
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Global.ControlPicking = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Global.ControlPicking = true;
|
|
||||||
|
|
||||||
if ((false == GfxRenderer.Init(window))
|
if ((false == GfxRenderer.Init(window))
|
||||||
|| (false == UILayer.init(window)))
|
|| (false == UILayer.init(window)))
|
||||||
@@ -422,9 +429,6 @@ int main(int argc, char *argv[])
|
|||||||
Console::On(); // włączenie konsoli
|
Console::On(); // włączenie konsoli
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Global.ControlPicking = false;
|
|
||||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); //capture cursor
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
while( ( false == glfwWindowShouldClose( window ) )
|
while( ( false == glfwWindowShouldClose( window ) )
|
||||||
&& ( true == World.Update() )
|
&& ( true == World.Update() )
|
||||||
|
|||||||
@@ -669,6 +669,10 @@ global_settings::ConfigParse(cParser &Parser) {
|
|||||||
Parser.getTokens( 1 );
|
Parser.getTokens( 1 );
|
||||||
Parser >> compress_tex;
|
Parser >> compress_tex;
|
||||||
}
|
}
|
||||||
|
else if (token == "captureonstart") {
|
||||||
|
Parser.getTokens( 1 );
|
||||||
|
Parser >> captureonstart;
|
||||||
|
}
|
||||||
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
|
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
|
||||||
// na koniec trochę zależności
|
// na koniec trochę zależności
|
||||||
if (!bLoadTraction) // wczytywanie drutów i słupów
|
if (!bLoadTraction) // wczytywanie drutów i słupów
|
||||||
|
|||||||
@@ -176,6 +176,7 @@ struct global_settings {
|
|||||||
std::string screenshot_dir;
|
std::string screenshot_dir;
|
||||||
bool loading_log = true;
|
bool loading_log = true;
|
||||||
bool dds_upper_origin = false;
|
bool dds_upper_origin = false;
|
||||||
|
bool captureonstart = true;
|
||||||
|
|
||||||
// methods
|
// methods
|
||||||
void LoadIniFile( std::string asFileName );
|
void LoadIniFile( std::string asFileName );
|
||||||
|
|||||||
Reference in New Issue
Block a user