ark1320 Posted November 25, 2014 Report Posted November 25, 2014 Is there a way to force the string in ipc.ask("string"), and the keyboard response, to be displayed in white instead of red letters against the green background? The non-scrolling FS messages to be white checkbox in the Miscellaneous tab of FSUIPC does not seem to effect the ipc.ask function. Thx, Al
Pete Dowson Posted November 25, 2014 Report Posted November 25, 2014 Is there a way to force the string in ipc.ask("string"), and the keyboard response, to be displayed in white instead of red letters against the green background? The non-scrolling FS messages to be white checkbox in the Miscellaneous tab of FSUIPC does not seem to effect the ipc.ask function. Thx, Al Sorry, I don't know how to incfluece the colours or fonts in those dialogues. It just uses a facility I happened to find in FS. There may be ways of doing it, but not ones I know. Pete
ark1320 Posted November 25, 2014 Author Report Posted November 25, 2014 OK Pete, thanks for the reply. Al
ark1320 Posted May 29, 2015 Author Report Posted May 29, 2015 Sorry, I don't know how to incfluece the colours or fonts in those dialogues. It just uses a facility I happened to find in FS. There may be ways of doing it, but not ones I know. Pete Pete, I am back to trying to find a way to change the ipc.ask( ) red text color. Could you briefly describe the facility you found in FS that ipc.ask( ) uses? That will point me in a direction to start looking, and if I find something useful I'll report back. Thx, Al
Pete Dowson Posted May 29, 2015 Report Posted May 29, 2015 I am back to trying to find a way to change the ipc.ask( ) red text color. Could you briefly describe the facility you found in FS that ipc.ask( ) uses? That will point me in a direction to start looking, and if I find something useful I'll report back. The Ask facility just uses the default call which gives red. The only other choice would be white. I could add an option for white -- is that what you want? But first have you tried using the Miscellaneous tab option for "all non-scrolling messages to be white"? That should change the default, if I remember correctly. If you want to hack into FS code, be my guest. It's just a flag value in one of the parameters in the call used into the Window.dll procedure at exported ordinal 24 (in FSX), the one named "?show_message" in P3D 2.5. The parameters are: ShowMessage(pointer_to_string_to_display, display_options, display_time, 0) where the only useful "display_options" I found are: 4 white, 5 red, 6 scroll. This dates back many years. I've never had the urge to delve further. Pete
ark1320 Posted May 29, 2015 Author Report Posted May 29, 2015 The Ask facility just uses the default call which gives red. The only other choice would be white. I could add an option for white -- is that what you want? But first have you tried using the Miscellaneous tab option for "all non-scrolling messages to be white"? That should change the default, if I remember correctly. Pete Yes, an option for white text with ipc.ask() is exactly what I need -- that would be wonderful! I do make extensive use of the Miscellaneous tab option for "all non-scrolling messages to be white" with the ipc.writeSTR() function, but for some reason it does not seem to carry over to the ipc.ask() function. I use ipc.ask() to display a multiline menu, and have tried reformating it to a single line hoping that might make a difference since all my applications of the ipc.writeSTR() functioin are confined to a single line, but unfortunately even then the text with ipc.ask() remained red. The multiline red menu on the green background is difficult to read, white on green would certainly be a big improvement. I have found many posts on the web having to do with FSXers looking to change some aspect or other of FSX red text to white, so I think if you could include an option for white text with ipc.ask() in some future update of FSUIPC, many others would find that very useful as well. Thank you, Al
Pete Dowson Posted May 29, 2015 Report Posted May 29, 2015 Yes, an option for white text with ipc.ask() is exactly what I need -- that would be wonderful! I think if you could include an option for white text with ipc.ask() in some future update of FSUIPC, many others would find that very useful as well. I'll put it on my list. Pete
ark1320 Posted May 29, 2015 Author Report Posted May 29, 2015 Pete, Thanks very much for the outstanding support! Al
Pete Dowson Posted June 1, 2015 Report Posted June 1, 2015 Thanks very much for the outstanding support! I've added the colour sleection option to the ipc.ask(0 function. It is in FSUIPC4939r.zip. I haven't had time to test it, so please download it and test it for me. It wasn't a complex change. The change is: n = ipc.ask(“string”) or (FSUIPC4 only) n = ipc.ask(“string”, colour) [Not WideClient] This prompts the user via a message window on the FS screen, displaying the “string” as a message. This can be single or multiple-lined (use ‘\n’ for a new line). The user answers with a string value, which is the result of the call. It is then up to the Lua program as to how to interpret this. The window and the reply operate just like the Window used to prompt users for mouse macro names. The optional 'colour' parameter in the FSUIPC4 version can be the value RED or WHITE. RED is the default. (These are actually pre-defined globals with values 0 and 1 respectively). Let me know how you get on please. Pete
ark1320 Posted June 2, 2015 Author Report Posted June 2, 2015 I've added the colour sleection option to the ipc.ask(0 function. It is in FSUIPC4939r.zip. I haven't had time to test it, so please download it and test it for me. It wasn't a complex change. Let me know how you get on please. Pete Hi Pete, I use the ipc.ask() function to display a 5 line menu and ask the user to input a choice (a number from 1 to 5). I tried the following tests after installing the new FSUIPC4.dll into the Modules folder: num_select=ipc.ask("menu string") -- default color option, the menu and user response was red as expected. num_select=ipc.ask("menu string",0) -- 0 color option, and again the menu and user response was red as expected. num_select=ipc.ask("menu string",1) -- 1 color option, the menu was white as expected, but as soon as the user entered a response (a number), the menu itself and the response all turned red. This was unexpected. I would prefer it to all stay white, but can make do with this if the stay all white option is difficult to make happen. Thanks very much for modifying the ipc.ask() function so quickly! Al
Pete Dowson Posted June 2, 2015 Report Posted June 2, 2015 num_select=ipc.ask("menu string",1) -- 1 color option, the menu was white as expected, but as soon as the user entered a response (a number), the menu itself and the response all turned red. This was unexpected. For me too. Does the menu stay visible after a response is given? Surely it disappears (I don't remember). Anyway, I'll have a look -- there must be another call to the display routine which I missed. Pete
Pete Dowson Posted June 2, 2015 Report Posted June 2, 2015 OK, I think I've fixed it. Please download FSUIPC4939s.zip. and try it for me. Thanks Pete
ark1320 Posted June 2, 2015 Author Report Posted June 2, 2015 Does the menu stay visible after a response is given? Surely it disappears (I don't remember). Yes, all remians visible until the Enter key is hit. OK, I think I've fixed it. Please download FSUIPC4939s.zip. and try it for me. Thanks Pete Yes, all fixed. I repeated all the tests above and now everything works as expected -- red stays red and white stays white. Thank you very much for your expertise and time on this. Al
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now