Message Separator widget - Page 2

Message Separator widget

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

Uh, resizing is in the todo already, he already said he did horizontal overflow the "easy way".

Edit: some bugfixing to do maybe? I enabled it in the middle of a game and it crashed LuaUI.
Last edited by ZellSF on 02 Feb 2007, 19:43, edited 1 time in total.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Yes, well, resizing is a bit harder to do, so it'll take a little longer. ;)

Messages don't wrap around, yes. I know it's less than ideal, but I'm afraid you'll just have to hold off on your soliloquies until I can come up with something better. ;)

Saving the box positions is next up, then (if there are no further problems) I'll probably start cracking the resize-nut.


version 1.5 (link outdated, see first post)

New features:

* dynamic font-size editing (ctrl+] to increase, ctrl+[ to decrease)
Last edited by Kloot on 17 Jul 2007, 13:18, edited 4 times in total.
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

error = 1, Call_DrawWorldItems, ...me/.spring/LuaUI/Widgets/MessageSeparator.lua:276: attempt to compare nil with number
error = 1, Call_AddConsoleLine, ...me/.spring/LuaUI/Widgets/MessageSeparator.lua:300: attempt to index global `NAME_PREFIX_STRINGS' (a nil value)
error = 1, Call_DrawScreenItems, ...me/.spring/LuaUI/Widgets/MessageSeparator.lua:366: attempt to perform arithmetic on global `PLAYER_MSG_BOX_Y_TOP' (a nil value)

Here LuaUI crashed and made sure that I couldn't see messages any longer (even after a /luaui disable)

I'm guessing it's a bug in your widget :(
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Hmm... the widget is written on the assumption that it's loaded at startup, but I'll add support for activating it mid-game.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

version 1.6 (link outdated, see first post)

Changelog:

* widget can now be activated mid-game without bringing down LuaUI
* text-boxes are now resizable if resizing is enabled (toggle with ctrl+e)

Box positions and sizes still aren't saved yet, but will be in version 1.7 with reasonable probability. :wink:
Last edited by Kloot on 17 Jul 2007, 13:18, edited 1 time in total.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Bad bug on startup that kills LuaUI permanently

Code: Select all

error = 1, gui.lua, LuaUI\Widgets\MessageSeparator.lua:411: attempt to perform arithmetic on global `FONT_SIZE' (a nil value)
Player [LCC]LordMatt joined as 0
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Fixed, thank you!
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

It seemed like it got confused sometimes whether to resize or to move, but aside from that it worked great.
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

ctrl+ / - doesn't work here.

(ctrl works in Spring though)
User avatar
CompWiz
Posts: 537
Joined: 16 Apr 2006, 04:20

Post by CompWiz »

Nice
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

version 1.7 (link outdated, see first post)

Changelog:

* all user-configurable data is now properly saved and loaded (at last)

Zell: you mean none of the widget's key commands work for you?
Last edited by Kloot on 17 Jul 2007, 13:18, edited 1 time in total.
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

No, only ctrl+ and ctrl-
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Works great!
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Zell: I really wouldn't know what's causing that, perhaps Trepan can tell you more.

version 1.8 (link outdated, see first post)

New features:

* messages can now be set to wrap around (toggle with ctrl+p)


Since the widget's just about feature-complete at this point, this will probably be the last major revision for a while. Major thanks to all who went to the trouble of testing it and having their games occasionally ruined, your help's been invaluable.
Last edited by Kloot on 17 Jul 2007, 13:19, edited 1 time in total.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

I could find no issues. Thanks for making this great widget!
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Well, suddenly the widget started spamming this error when I click down my start position:

Code: Select all

error = 1, Call_DrawScreenItems, LuaUI\Widgets\MessageSeparator.lua:648: attempt to index field `?' (a nil value)
Then it goes away when the game actually starts. It may only do this if you have an AI player and choose starts in game, which would be why I didn't notice it before.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

The version that's available now should not do that anymore, I've applied a few minor touchups since saturday.

PS. would anyone be interested in having a fully scrollable message history?
Etheric
Posts: 2
Joined: 24 Aug 2006, 20:07

Post by Etheric »

Kloot wrote: PS. would anyone be interested in having a fully scrollable message history?
That would be a great feature!
manored
Posts: 3179
Joined: 15 Nov 2006, 00:37

Re: Message Separator widget

Post by manored »

Kloot wrote:** updated to version 1.8 **

Heya,

Since a common source of annoyance for people seems to be that Spring's system messages are mixed with those typed by players, I thought I'd write a simple widget to separate them. :) What you get when you install it looks like this:

shot 1
shot 2

(ie. not much) There are some rough edges to smooth out, but it should otherwise be stable and hopefully not too sluggish.

Download here (right-click and save-as, park the file in LuaUI/Widgets).
Nice Job! :P

This will be immensily helpfull, mainly in those games that unsncy but suffer nothing except immense spam of unsncy messages that makes chat almost useless.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Etheric wrote:
Kloot wrote: PS. would anyone be interested in having a fully scrollable message history?
That would be a great feature!
+1
Post Reply

Return to “Lua Scripts”