1) There is SetCameraOffset(). Is there GetCameraOffset()?
2) Can i access to Spring window properties? I need to store & restore its left corner position. Or should it be done in the engine?
3) How can i get screen (dektop) resolution? Don't mess with the game resolution cause i can run the game in windowed mode. I see many widgets which uses constant 0.75 to make a proportional scale in Y-axis. This is false in 1280x1024 resolution.
Questions about lua scripting in Spring
Moderator: Moderators
Re: Questions about lua scripting in Spring
1: Nope
2: Have a look at the Get*Geometry callouts (read-only)
3: See #2
2: Have a look at the Get*Geometry callouts (read-only)
3: See #2
Re: Questions about lua scripting in Spring
Thanx. Concerning the first item I found these functions nearby Get*Geometry definition:
Have to find out how do they correlate with SetCameraOffset() arguments.
Pity i can't change the window position from inside Lua. Going to report to Mantis. I hate fixing the window position every game launch.
Code: Select all
static int GetCameraState(lua_State* L);
static int GetCameraPosition(lua_State* L);
static int GetCameraDirection(lua_State* L);
static int GetCameraVectors(lua_State* L);
Pity i can't change the window position from inside Lua. Going to report to Mantis. I hate fixing the window position every game launch.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Questions about lua scripting in Spring
This is the doing of the lobby client and operating system.slogic wrote:Pity i can't change the window position from inside Lua. Going to report to Mantis. I hate fixing the window position every game launch.
Re: Questions about lua scripting in Spring
window position is now saved across runs by the engine.