Color picker panel; sliders don't work yet

This commit is contained in:
Paul Chote
2010-07-16 21:54:35 +12:00
parent 8abc8e03cb
commit 44e1b8311f
5 changed files with 192 additions and 2 deletions

View File

@@ -123,8 +123,14 @@ namespace OpenRA.Widgets.Delegates
teamChat ^= true;
chatLabel.Text = (teamChat) ? "Team:" : "Chat:";
return true;
};
var colorChooser = lobby.GetWidget("COLOR_CHOOSER");
colorChooser.GetWidget<ButtonWidget>("BUTTON_OK").OnMouseUp = mi =>
{
colorChooser.IsVisible = () => false;
return true;
};
}
void UpdateCurrentMap()
@@ -169,7 +175,11 @@ namespace OpenRA.Widgets.Delegates
name.OnLoseFocus = () => name.OnEnterKey();
var color = template.GetWidget<ButtonWidget>("COLOR");
//color.OnMouseUp = CyclePalette;
color.OnMouseUp = mi =>
{
Chrome.rootWidget.GetWidget("SERVER_LOBBY").GetWidget("COLOR_CHOOSER").IsVisible = () => true;
return true;
};
var colorBlock = color.GetWidget<ColorBlockWidget>("COLORBLOCK");
colorBlock.GetColor = () => c.Color;