Re: Mudlet API requests
Posted: Wed Nov 18, 2009 11:04 am
No, not anymore. Added a call back and functions to set the main window border. Our demo packages need to get updated though.
Quoting from the manual:
handleWindowResizeEvent()
The standard implementation of this function does nothing. However, this function gets called whenever the main window is being manually resized. You can overwrite this function in your own scripts to handle window resize events yourself and e. g. adjust the screen position and size of your mini console windows, labels or other relevant GUI elements in your scripts that depend on the size of the main Window. To override this function you can simply put a function with the same name in one of your scripts thus overwriting the original empty implementation of this function.
function handleWindowResizeEvent()
-- determine the size of your screen
WindowWidth=0;
WindowHeight=0;
WindowWidth, WindowHeight = getMainWindowSize();
-- move mini console "sys" to the far right side of the screen whenever the screen gets resized
moveWindow("sys",WindowWidth-300,0)
end
Quoting from the manual:
handleWindowResizeEvent()
The standard implementation of this function does nothing. However, this function gets called whenever the main window is being manually resized. You can overwrite this function in your own scripts to handle window resize events yourself and e. g. adjust the screen position and size of your mini console windows, labels or other relevant GUI elements in your scripts that depend on the size of the main Window. To override this function you can simply put a function with the same name in one of your scripts thus overwriting the original empty implementation of this function.
function handleWindowResizeEvent()
-- determine the size of your screen
WindowWidth=0;
WindowHeight=0;
WindowWidth, WindowHeight = getMainWindowSize();
-- move mini console "sys" to the far right side of the screen whenever the screen gets resized
moveWindow("sys",WindowWidth-300,0)
end