Tweak flag size, kill Spawn button.

This commit is contained in:
alzeih
2010-06-13 19:03:02 +12:00
parent 1a20249f44
commit 5d66c6b7ba
5 changed files with 84 additions and 112 deletions

View File

@@ -79,17 +79,12 @@ namespace OpenRA.Widgets.Delegates
var faction = template.GetWidget<ButtonWidget>("FACTION");
faction.OnMouseUp = CycleRace;
faction.GetText = () => c.Country;
//TODO: make part of button?
var factionflag = template.GetWidget<ImageWidget>("FACTIONFLAG");
var factionname = faction.GetWidget<LabelWidget>("FACTIONNAME");
factionname.GetText = () => c.Country;
var factionflag = faction.GetWidget<ImageWidget>("FACTIONFLAG");
factionflag.GetImageName = () => c.Country;
factionflag.GetImageCollection = () => "flags";
var spawn = template.GetWidget<ButtonWidget>("SPAWN");
spawn.OnMouseUp = CycleSpawnPoint;
spawn.GetText = () => (c.SpawnPoint == 0) ? "-" : c.SpawnPoint.ToString();
var team = template.GetWidget<ButtonWidget>("TEAM");
team.OnMouseUp = CycleTeam;
team.GetText = () => (c.Team == 0) ? "-" : c.Team.ToString();
@@ -104,15 +99,12 @@ namespace OpenRA.Widgets.Delegates
color.GetColor = () => Game.world.PlayerColors()[c.PaletteIndex % Game.world.PlayerColors().Count].Color;
var faction = template.GetWidget<LabelWidget>("FACTION");
faction.GetText = () => c.Country;
var factionflag = template.GetWidget<ImageWidget>("FACTIONFLAG");
var factionname = faction.GetWidget<LabelWidget>("FACTIONNAME");
factionname.GetText = () => c.Country;
var factionflag = faction.GetWidget<ImageWidget>("FACTIONFLAG");
factionflag.GetImageName = () => c.Country;
factionflag.GetImageCollection = () => "flags";
var spawn = template.GetWidget<LabelWidget>("SPAWN");
spawn.GetText = () => (c.SpawnPoint == 0) ? "-" : c.SpawnPoint.ToString();
var team = template.GetWidget<LabelWidget>("TEAM");
team.GetText = () => (c.Team == 0) ? "-" : c.Team.ToString();

View File

@@ -197,8 +197,8 @@
<image name="disabled" x="68" y="56" width="34" height="28" />
</collection>
<collection name="flags" src="buttons.png">
<image name="GDI" x="0" y="56" width="30" height="25" />
<image name="Nod" x="0" y="56" width="30" height="25" />
<image name="Random" x="0" y="56" width="30" height="25" />
<image name="GDI" x="0" y="56" width="30" height="15" />
<image name="Nod" x="0" y="56" width="30" height="15" />
<image name="Random" x="0" y="56" width="30" height="15" />
</collection>
</chrome>

View File

@@ -339,34 +339,34 @@ Container:
Height:PARENT_BOTTOM-12
Button@FACTION:
Id:FACTION
Text:Faction
Width:60
Width:100
Height:25
X:180
Y:0
Children:
Image@FACTIONFLAG:
Id:FACTIONFLAG
Width:30
Height:15
X:1
Y:5
Label@FACTIONNAME:
Id:FACTIONNAME
Text:Faction
Width:60
Height:25
X:235
Y:0
Button@SPAWN:
Id:SPAWN
Text:Spawn
Width:70
Height:25
X:275
Y:0
X:35
Y:5
Button@TEAM:
Id:TEAM
Text:Team
Width:70
Height:25
X:355
X:295
Y:0
Checkbox@STATUS:
Id:STATUS
X:455
X:380
Y:1
Width:20
Height:20
@@ -393,37 +393,35 @@ Container:
Height:13
Label@FACTION:
Id:FACTION
Text:Faction
Width:60
Width:100
Height:25
X:180
Y:0
Align:Center
Children:
Image@FACTIONFLAG:
Id:FACTIONFLAG
Width:30
Height:15
X:1
Y:5
Label@FACTIONNAME:
Id:FACTIONNAME
Text:Faction
Width:60
Height:25
X:235
Y:0
Label@SPAWN:
Id:SPAWN
Text:Spawn
Width:70
Height:25
X:275
Y:0
Align:Center
X:35
Y:5
Label@TEAM:
Id:TEAM
Text:Team
Width:70
Height:25
X:355
X:295
Y:0
Align:Center
Checkbox@STATUS:
Id:STATUS
X:455
X:380
Y:1
Width:20
Height:20
@@ -454,25 +452,17 @@ Container:
Y:0
Text:Faction
Align:Center
Label@LABEL_LOBBY_SPAWN:
Id:LABEL_LOBBY_SPAWN
Width:70
Height:25
X:275
Y:0
Text:Spawn
Align:Center
Label@LABEL_LOBBY_TEAM:
Id:LABEL_LOBBY_TEAM
Width:70
Height:25
X:355
X:295
Y:0
Text:Team
Align:Center
Label@LABEL_LOBBY_STATUS:
Id:LABEL_LOBBY_STATUS
X:455
X:380
Y:0
Width:20
Height:20

View File

@@ -190,8 +190,8 @@
<image name="disabled" x="68" y="56" width="34" height="28" />
</collection>
<collection name="flags" src="buttons.png">
<image name="Allies" x="0" y="56" width="30" height="25" />
<image name="Soviet" x="0" y="56" width="30" height="25" />
<image name="Random" x="0" y="56" width="30" height="25" />
<image name="Allies" x="0" y="56" width="30" height="15" />
<image name="Soviet" x="0" y="56" width="30" height="15" />
<image name="Random" x="0" y="56" width="30" height="15" />
</collection>
</chrome>

View File

@@ -339,34 +339,34 @@ Container:
Height:PARENT_BOTTOM-12
Button@FACTION:
Id:FACTION
Text:Faction
Width:60
Width:100
Height:25
X:180
Y:0
Children:
Image@FACTIONFLAG:
Id:FACTIONFLAG
Width:30
Height:15
X:1
Y:5
Label@FACTIONNAME:
Id:FACTIONNAME
Text:Faction
Width:60
Height:25
X:235
Y:0
Button@SPAWN:
Id:SPAWN
Text:Spawn
Width:70
Height:25
X:275
Y:0
X:35
Y:5
Button@TEAM:
Id:TEAM
Text:Team
Width:70
Height:25
X:355
X:295
Y:0
Checkbox@STATUS:
Id:STATUS
X:455
X:380
Y:1
Width:20
Height:20
@@ -393,37 +393,35 @@ Container:
Height:13
Label@FACTION:
Id:FACTION
Text:Faction
Width:60
Width:100
Height:25
X:180
Y:0
Align:Center
Children:
Image@FACTIONFLAG:
Id:FACTIONFLAG
Width:30
Height:15
X:1
Y:5
Label@FACTIONNAME:
Id:FACTIONNAME
Text:Faction
Width:60
Height:25
X:235
Y:0
Label@SPAWN:
Id:SPAWN
Text:Spawn
Width:70
Height:25
X:275
Y:0
Align:Center
X:35
Y:5
Label@TEAM:
Id:TEAM
Text:Team
Width:70
Height:25
X:355
X:295
Y:0
Align:Center
Checkbox@STATUS:
Id:STATUS
X:455
X:380
Y:1
Width:20
Height:20
@@ -454,25 +452,17 @@ Container:
Y:0
Text:Faction
Align:Center
Label@LABEL_LOBBY_SPAWN:
Id:LABEL_LOBBY_SPAWN
Width:70
Height:25
X:275
Y:0
Text:Spawn
Align:Center
Label@LABEL_LOBBY_TEAM:
Id:LABEL_LOBBY_TEAM
Width:70
Height:25
X:355
X:295
Y:0
Text:Team
Align:Center
Label@LABEL_LOBBY_STATUS:
Id:LABEL_LOBBY_STATUS
X:455
X:380
Y:0
Width:20
Height:20