this.guiScreenChanged = function(to, from) {
if (to == "GUI_SCREEN_EQUIP_SHIP") {
mission.addMessageText("Testing adding text to screen");
}
}
and then repeatedly visit the F3 equip screen, I see this:
Notice how the text I added slowly moves down the page.
So my question is, is it possible to add text to the top of the F3 equip screen so it stays in one place? I know I could do a test and only let the code run once, but if the text I wanted to add is dynamic, I might need to update it on each refresh of the page.
You're going to have to code to only add it once. What's happening, I would guess, is that it's being added every time and then the core code that suppresses the display of duplicate messages is blanking the previous lines; that's why it's appearing to "move" down the screen.
I done never saw anyone use that function on screens other than system data or manifest, though. (Why do you have to meddle with obscure parts of Oolite?) It works properly on those screens because they're compiled anew each time you view them, in case the target system or manifest has changed, I guess.
So I'm curious now, did you try it on the other screens too?
"There are large, white swans, and there are small, black swans," he explained, "But there are no medium-sized swans, and there are no grey swans. The non-existence of grey swans mitigates against belief in Mr Darwin's theory."
Why do you have to meddle with obscure parts of Oolite?
But I enjoy it so much! Plus I'm working on a hush-hush super-super secret project that will change the course of history, and alter the very fabric of the cosmos! Yes, mountains will fall, kingdoms will rise, all through the power of the OXP! Oh, can you feel it? CAN YOU FEEL IT?
Ooookay, time to adjust my meds....
Wildeblood wrote:
So I'm curious now, did you try it on the other screens too?
Not yet. I'll give it a try though and report back.