Jump to content
The simFlight Network Forums

Window / Drawing in FS2020?


quantum

Recommended Posts

Hi

I have looked around the forum but cannot find an answer, so am posting my questions here.

Q1. Is there any way of drawing a text window in FS2020 using FSUIPC? I know you can achieve it via a Lua script, but I want to create and update the window inside FS2020 using my VB.NET program. I mean a multi-line window ideally with different colour text.

Q2. Is it possible to trigger the drawing of objects in FS2020 world using FSUIPC? Just like SimConnect_AICreateSimulatedObject in the SimConnect API.

Thanks for the great plugin

Link to comment
Share on other sites

2 minutes ago, quantum said:

Q1. Is there any way of drawing a text window in FS2020 using FSUIPC? I know you can achieve it via a Lua script, but I want to create and update the window inside FS2020 using my VB.NET program. I mean a multi-line window ideally with different colour text.

FSUIPC uses the SimConnect_Text function for displaying text. There are currently many issues with this - from the MSFS SK:

Quote
Menu SimConnect_Text Minimal support (TEXT_TYPE_PRINT_color) Simple text works, (TEXT_TYPE_SCROLLING_color) scrolling gives simple text, (TEXT_TYPE_MENU) menu gives no error-no response. (_color) color is ignored

There are also problems with updating text in a simconnect text window (multiple windows are created) and the 'time to display'..
For these reasons, I have added the lua Wnd library which can be used instead. This displays the text in a separate (moveable and resizeable) window.

To display text without lua, you can use offset 0x32FA, but this uses the SimConnet_Text function and so suffers from the same issues as the lua text display functions.
If you are writing your own program, you could also use the SimConnect SDK directly rather than using one of the FSUIPC SDKs.

12 minutes ago, quantum said:

Q2. Is it possible to trigger the drawing of objects in FS2020 world using FSUIPC? Just like SimConnect_AICreateSimulatedObject in the SimConnect API.

No, this is not possible.

John

Link to comment
Share on other sites

Thanks for the fast help!

 

2 minutes ago, John Dowson said:

FSUIPC uses the SimConnect_Text function for displaying text. There are currently many issues with this - from the MSFS SK:

There are also problems with updating text in a simconnect text window (multiple windows are created) and the 'time to display'..

Sounds like there is a lot to fix inside FS2020?

 

2 minutes ago, John Dowson said:

For these reasons, I have added the lua Wnd library which can be used instead. This displays the text in a separate (moveable and resizeable) window.

By separate do you mean outside FS2020? i.e. a normal Window's window and not an in-sim window.

 

 

Shame about the lack of in-sim object drawing. FSUIPC is so much easier to use compared to SimConnect. I was hoping to draw a target for the pilot to aim for when landing.

 

Link to comment
Share on other sites

4 minutes ago, quantum said:

By separate do you mean outside FS2020? i.e. a normal Window's window and not an in-sim window.

Yes. But of course you can always place it over the sim window... I've attached two lua scripts that display the frame rate, one using the standard lua ipc.display function (that uses SimConnect_Text under the covers) and another that uses the Wnd library. Due to the issues with the SimConnect_Text function, the ipc.display version has various issues (although works fine in P3D).

John

FPS_Monitor.lua

FPS_MonitorW.lua

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.