Message Separator widget
Moderator: Moderators
@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?
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?
Hello there message that displays perfectly here.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!!!!
And againI wrote:Read the list over hotkeys 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?)
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)?But more annoying sometimes all messages disapear, because the oldest message disappears
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.
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.
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:
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:
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..
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:
edit: PS: the first line was cut.. so there was a long line on the screen while I pressed Ctrl+P<[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)
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"] = {},
Well, have fun fixing.. I'm off snowboarding for a week now..
- BrainDamage
- Lobby Developer
- Posts: 1164
- Joined: 25 Sep 2006, 13:56
have you triedBlah64 wrote: I have to completely restart the battle to get it to work
Code: Select all
/luaui restart
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.
In related news, I'm currently overhauling the message-wrapping code, so ctrl+p should be a bit safer to use soon.
i´m quite sure this does not work really perfect, some messages are being displayed less then a second.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.
Looks more like it counts from the oldest visable message.
- TechnoTone
- Posts: 165
- Joined: 23 Aug 2005, 22:02