Jump to content
The simFlight Network Forums

How to close LUA display


Recommended Posts

What/how are you opening the Lua Display window?

 

I use the ipc.display function all the time to show me various items during flight. In doing so

I use the form:

 

  ipc.display("Rud Pos = "..Rud_Trim, 1)

 

This displays the current value of the rudder trim in one of my aircraft. The final parameter "1" indicates

that the window will display for only 1 second.

 

In some cases where I am displaying mutiple lines of data I leave the window open longer, 2 3 or 5 seconds.

The window then closes.

 

Another useful statement is:

 

  ipc.setdisplay(770, 50, 500, 100)  // X,Y, x, y    - Position X,Y and size x,y

 

This dictates the screen position and size of the Lua Display window.

 

As to forcing a close of the window, I THINK if you invoke another ipc.display command such

as I showed above, it would force a closure of the current window. So displaying some 'dummy'

parameter for 1 second should close the currnt window and display then 'dummy' parameter foor

1 second and then close.

 

  Paul

Link to comment
Share on other sites

Hi Paul,

Thank you for your suggestion

 

As to forcing a close of the window, I THINK if you invoke another ipc.display command such

as I showed above, it would force a closure of the current window. So displaying some 'dummy'

parameter for 1 second should close the currnt window and display then 'dummy' parameter foor

1 second and then close.

 

I already had this idea, but it doesn't close the windows. it only delete the text

Cheers

Claude

Link to comment
Share on other sites

I already had this idea, but it doesn't close the windows. it only delete the text

 

f there's no time expiry set, the Window closes when the Lua plug-in exits. To close it prematurely, use the ipc.display function with a null (zero length) message, i.e. "". 

 

Pete

Link to comment
Share on other sites

To close it prematurely, use the ipc.display function with a null (zero length) message

I have already tried but the window was undocked and in this case it doesn't close.

To work as you said  the window must be docked. If undocked it doesn't work.

 

Thanks... 

Claude

Link to comment
Share on other sites

I have already tried but the window was undocked and in this case it doesn't close.

To work as you said  the window must be docked. If undocked it doesn't work.

 

Ah, okay. I'll check that here. That's something to do with FS innards. I probably have to make more calls somewhere. Doesn't it even close if your plug-in exits (terminates) or is Killed?

 

I won't be able to look at this properly till towards the end of the week. Sorry. But OI've made a note of it. Remind me if you don't hear back by Sunday.

 

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.