Page 5 of 6

Posted: 20 Feb 2007, 19:56
by Kloot
@chlue

On startup, the widget handler calls a function in the script that returns a table of configuration data to save, but the table doesn't actually get filled until shutdown (at which point the function is called a second time). This means that if Spring crashes in any way, the second function call doesn't take place and your settings get overwritten by the contents of an empty table (ie. nothing).

As for the settings you listed: those variables are not user-configurable (in the sense that they aren't tied to key commands), so saving them isn't very useful. Besides, if someone wants to change them, editing the source is easy enough (as you did).


@Noize

Example messages?

Posted: 20 Feb 2007, 22:29
by NOiZE
Example:


Hello i r a core fanboi, arm pussy's will not win this war, because core is the greatest, because they are the pwners, and arm is the suckyniss. so core will win hurray!!!!


:-)

Posted: 21 Feb 2007, 04:40
by LordMatt
Of course a message like that is getting dropped or cut off. It's needless mindless (soulless?) pro-core propaganda. I propose that people who post this kind of drivel get all their messages dropped. :P

Posted: 21 Feb 2007, 13:15
by ZellSF
NOiZE wrote:Example:


Hello i r a core fanboi, arm pussy's will not win this war, because core is the greatest, because they are the pwners, and arm is the suckyniss. so core will win hurray!!!!


:-)
Hello there message that displays perfectly here.
I wrote:Read the list over hotkeys again.
And again


(if it really is a bug that only you run into for some weird reason, maybe say if it's horizontal or vertical wrapping?)

Posted: 21 Feb 2007, 18:29
by NOiZE
well it does not cut off every time


it does wrap nicely




But more annoying sometimes all messages disapear, because the oldest message disappears

am i making sense?

Posted: 21 Feb 2007, 19:24
by LordMatt
I noticed that also.

Posted: 21 Feb 2007, 19:44
by Kloot
But more annoying sometimes all messages disapear, because the oldest message disappears
Please be more clear about this, what do you mean by "oldest message disappears"? The automatic visual wiping that happens after typing some lines and then waiting a few seconds? Or something else (and if so, how do I reproduce it)?

Posted: 21 Feb 2007, 22:00
by LordMatt
Basically the problem is all messages disappear at the same time, whereas in the default message box they disappeared separately (after each one timed out). So, type a bunch of lines of text so your box fills up, then it all will disappear at once, rather than based on the time after each line was typed.

Posted: 22 Feb 2007, 18:44
by Kloot
Well, the boxes are cleared a fixed amount of frames after the arrival of the most *recent* message, so by the time they all disappear (which happens if no new ones came in for 15 seconds) you should have had plenty of opportunity to read them... and if you didn't, either increase the timeout (DELAY_BEFORE_CLEAR) period or turn on scrolling.

Posted: 24 Feb 2007, 03:26
by MelTraX
hey kloot,

I just pressed Ctrl+P midgame and it kinda crashed my Lua.. Whenever the message log was shown, my widgets disappeared (aka error). Since your widget threw errors, I couldn't see any messages after that event.. Quote from the logs:
<[LCC]LordMatt[1st]> well, maybe this needs to be an undocumented easter egg for now ;)
{MessageSeparator} transparent rendering disabled
{MessageSeparator} transparent rendering enabled
{MessageSeparator} font-outlining disabled
<[LCC]LordMatt[1st]> but if u wanted to write it up
{MessageSeparator} font-outlining enabled
<[LCC]LordMatt[1st]> I would be happy to include it
{MessageSeparator} message wrapping enabled
error = 1, Call_DrawScreenItems, LuaUI\Widgets\gui_MessageSeparator.lua:859: attempt to index field `?' (a nil value)
error = 1, Call_DrawScreenItems, LuaUI\Widgets\gui_MessageSeparator.lua:859: attempt to index field `?' (a nil value)
edit: PS: the first line was cut.. so there was a long line on the screen while I pressed Ctrl+P

Hmm.. Second try and it even crashed when it was enabled before a long message.. But Matt couldn't replicate the error.. Here are my settings:

Code: Select all

	["Message Separator"] = {},
Hmm.. I thought, I changed some stuff.. But this is what widget_data.lua says..

Well, have fun fixing.. I'm off snowboarding for a week now..

Posted: 24 Feb 2007, 06:03
by Blah64
my main problem, is that nearly every other game, it doesn't work. I'll have no box, but when i disable it the normal box comes back. I have to completely restart the battle to get it to work

Posted: 24 Feb 2007, 06:37
by LordMatt
I also had what happened to Blah64 happen to me.

Posted: 24 Feb 2007, 12:43
by BrainDamage
Blah64 wrote: I have to completely restart the battle to get it to work
have you tried

Code: Select all

/luaui restart
from the game chat?

Posted: 24 Feb 2007, 18:25
by Kloot
As I said, if Spring crashes for whatever reason rather than being closed properly, you'll end up with an empty settings table because the function that tells the widget handler what to write to widget_data.lua is only called once in those cases, whereas it's normally called twice (once on startup and once on shutdown) but doesn't return the actual data until call #2. The upshot of that is that your settings are reset, which is annoying but not really avoidable TBH. It cannot (under any circumstances) cause the boxes to disappear however, so I ask anyone who has that issue to post their config-data and contents of infolog.txt here for analysis.

In related news, I'm currently overhauling the message-wrapping code, so ctrl+p should be a bit safer to use soon. ;)

Posted: 25 Feb 2007, 15:47
by NOiZE
Kloot wrote:Well, the boxes are cleared a fixed amount of frames after the arrival of the most *recent* message, so by the time they all disappear (which happens if no new ones came in for 15 seconds) you should have had plenty of opportunity to read them... and if you didn't, either increase the timeout (DELAY_BEFORE_CLEAR) period or turn on scrolling.
i´m quite sure this does not work really perfect, some messages are being displayed less then a second.

Looks more like it counts from the oldest visable message.

Posted: 14 Mar 2007, 13:14
by TechnoTone
/me applauds Kloot. Excellent widget!

It would be great if you could find a different way of changing the settings though. All those keyboard shortcuts is the only thing that lets this widget down in my opinion.

Perhaps a single keyboard/mouse shortcut/combi could toggle a "config" panel instead?

Posted: 17 Jul 2007, 11:58
by Licho
Can someone please fix this for spring 75?

Posted: 17 Jul 2007, 13:14
by Kloot
updated for 0.75 (see first post for link)

Posted: 17 Jul 2007, 16:00
by KDR_11k
Can you do something about this taking up half your screen with solid grey boxes? Tweakmode can't move them!

Posted: 17 Jul 2007, 23:13
by Kloot
No, but you can. ;) See the top of the script for a complete list of keyboard commands, control + g and control + e will let you drag and resize the boxes yourself.