Cnc scrollpanel with support for rollover etc.

This commit is contained in:
Paul Chote
2011-05-07 21:43:32 +12:00
parent d349c5341e
commit 188a16fc08
6 changed files with 84 additions and 16 deletions

View File

@@ -23,7 +23,7 @@ namespace OpenRA.Mods.Cnc.Widgets
public class CncLobbyLogic : IWidgetDelegate
{
Widget LocalPlayerTemplate, RemotePlayerTemplate, EmptySlotTemplate, EmptySlotTemplateHost;
ScrollPanelWidget chatPanel;
CncScrollPanelWidget chatPanel;
Widget chatTemplate;
ScrollPanelWidget Players;
@@ -185,7 +185,7 @@ namespace OpenRA.Mods.Cnc.Widgets
return true;
};
chatPanel = lobby.GetWidget<ScrollPanelWidget>("CHAT_DISPLAY");
chatPanel = lobby.GetWidget<CncScrollPanelWidget>("CHAT_DISPLAY");
chatTemplate = chatPanel.GetWidget("CHAT_TEMPLATE");
}
@@ -218,6 +218,7 @@ namespace OpenRA.Mods.Cnc.Widgets
template.Bounds.Height += (t.Bounds.Height - oldHeight);
chatPanel.AddChild(template);
chatPanel.ScrollToBottom();
}
void UpdatePlayerColor(float hf, float sf, float lf, float r)