Message Separator widget - Page 4

Message Separator widget

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

Moderator: Moderators

User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

ONOES, now the player message box doesn't work right at all. Nothing affects it.

Edit: Weird, now it works okay.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

For some reason I cant see the system message box. I think I resized it to somthing broken. Is there a way I can reset the data for this widget?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

The widget saves its data in LuaUI/Config/widget_data.lua, removing all lines that start with "systemMsgBox" from that file will force a reset.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

version 2.0 (link outdated, see first post)

Changelog:

* player message history is now scrollable (toggle with ctrl+m, then use ctrl+comma and ctrl+period to scroll up and down, respectively)

Beware that when exiting scrollable mode, ALL messages stored in the buffer up to that point will be erased, so I would recommend enabling it once at the start of a game and then leave the widget in that mode (this setting is meant to be more or less permanent anyway).
Last edited by Kloot on 17 Jul 2007, 13:20, edited 1 time in total.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Post by LordMatt »

Works good!
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

-- control + s: switch message-box rendering mode
-- control + p: switch text overflow handling mode
-- control + g: enable/disable message-box dragging
-- control + e: enable/disable message-box resizing
-- control + f: enable/disable message filtering
-- control + o: enable/disable message outlining
-- control + y: enable/disable font outlining
-- control + m: enable/disable scrollable message history
-- control + ,: scroll up message history
-- control + .: scroll down message history
-- control + [: decrease message-box text font-size
-- control + ]: increase message-box text font-size
Current hotkey review for this, found this in the LUA file, so might as well share it so you dont have to go through the entire topic for commands.
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

Ah, latest version of this is just awesome, pity LuaUI and hosting games don't go well right now.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Another bug, the outline feature won't work for me. Is there any special thing I have to do besides press ctrl-o?
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

ctrl-y?

If not, remove the widget data and try again?
chlue
Posts: 101
Joined: 28 Dec 2005, 20:48

Post by chlue »

-- control + s: switch message-box rendering mode
-- control + p: switch text overflow handling mode
-- control + g: enable/disable message-box dragging
-- control + e: enable/disable message-box resizing
-- control + f: enable/disable message filtering
-- control + o: enable/disable message outlining
-- control + y: enable/disable font outlining
-- control + m: enable/disable scrollable message history
-- control + ,: scroll up message history
-- control + .: scroll down message history
-- control + [: decrease message-box text font-size
-- control + ]: increase message-box text font-size
You assimilated half of the keyboard :-)

Would you consider adding a command to enable editmode, so that you cannot accidentally change the settings in the heat of a fight. It would be nice, if you use CTRL+F11, which is already used by the included widgets.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

perhaps a bar with icons that can show/hide when you hover over them? so we can change the options without using the keys?
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

I wish we could disable the shortcut keys with one other key/ command
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

They should probably be changed to use key bindings.
The Spring.GetKeySymbol() and Spring.GetKeyBindings()
calls are available. I may pass the key binding string tables
into key press and key release widget events in a future
version to simply using key bindings.

P.S. Might also go with an ordered binding registry approach.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Actually, my current plan is to eliminate the keyboard shortcuts altogether (save those for manipulating font size and scrolling) and replace them with a bar listening to ctrl+F11 of clickable icons, but an ETA for that I don't have. I'll add a 'master' shortcut to lock/unlock all the other keys until then.

edit: done (master shortcut is ctrl+backslash)
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

Also long messages are being cut-off.
ZellSF
Posts: 1187
Joined: 08 Jul 2006, 19:07

Post by ZellSF »

Read the list over hotkeys again.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

I am not sure if it is in the current version but when I give away my units this widget goes nuts.. you may want to look into it.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

I cannot reproduce any such behavior, could you describe the bug in more detail? (eg. if it happens with AI's as well or only with human opponents, what exactly 'go nuts' means in terms of concrete error messages :P, etc)
chlue
Posts: 101
Joined: 28 Dec 2005, 20:48

Post by chlue »

I am not sure if it is the fault of your widget or a problem with the lua implementation, but everytime when the game crashes, before it really begann. (Different map than the server, crash when ai initialise), i lost my config of your widget (the data that is stored in 'widget_data.lua'). I 'solved' this by making a kopie of this file and restore it, everytime this happens.

Additionall is changed the following lines in your widged (in my version line 612-631):
DELAY_BEFORE_CLEAR = 1200
MAX_ALPHA = 0.5
PLAYER_BOX_FILL_COLOR = {0.44, 0.44, 0.44, PLAYER_BOX_ALPHA}
SYSTEM_BOX_FILL_COLOR = {0.44, 0.44, 0.44, SYSTEM_BOX_ALPHA}
PLAYER_TEXT_OUTLINE_COLOR = {0.44, 0.44, 0.44, 1.0}

Maybee you could rearange this information to the top of the file or store them in widget_data, too.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

Sometimes all the lines suddenly disappear. Also long lines which are being wrapped get cutt off.
Post Reply

Return to “Lua Scripts”