Bug with function widget:ViewResize()

Bug with function widget:ViewResize()

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Bug with function widget:ViewResize()

Post by Caydr »

Got this script here... from what I understand, things like:

function widget:ViewResize()

are supposed to be run automatically at such a time as the screen is being resized.

It works great for actually dragging the screen size, however if you have the screen set to windowed, maximized, then you unmaximize it (so it's a regular window) it doesn't run.

To explain better... Start Spring in windowed mode. Hit maximize. Exit Spring. Start Spring again. It will start maximized this time (not full-screen, but maximized). Now, here's the bug: hit the "restore" button, where "maximize" normally is if you have a window. This will not cause function widget:ViewResize() to be run. Maximizing it again will not cause it to be run either.

Note that now, if you resize the screen by dragging an edge, it WILL run he script normally.

This problem only shows itself if Spring is STARTED maximized. In all other cases, everything seems to function as normal. Am I doing something wrong or is this an actual bug?


If it's relevant, I'm running Windows 7 rc. I don't have an XP computer handy at the moment but I'm confident the problem will be present there too.
Post Reply

Return to “Lua Scripts”