fix trailing whitespace everywhere

This commit is contained in:
Chris Forbes
2011-09-25 14:37:12 +13:00
parent 0eb98ef3b5
commit 55036cd58c
596 changed files with 3194 additions and 3194 deletions

View File

@@ -1,7 +1,7 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
@@ -22,43 +22,43 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
string CurrentSong = null;
Widget bg;
public void Play(string song)
{
CurrentSong = song;
if (CurrentSong == null) return;
Sound.PlayMusicThen(Rules.Music[CurrentSong],
() => Play( Game.Settings.Sound.Repeat ? CurrentSong : GetNextSong() ));
}
public MusicPlayerLogic()
{
bg = Widget.RootWidget.GetWidget("MUSIC_MENU");
CurrentSong = GetNextSong();
bg.GetWidget( "BUTTON_PAUSE" ).IsVisible = () => Sound.MusicPlaying;
bg.GetWidget( "BUTTON_PLAY" ).IsVisible = () => !Sound.MusicPlaying;
bg.GetWidget<ButtonWidget>("BUTTON_CLOSE").OnClick =
() => { Game.Settings.Save(); Widget.CloseWindow(); };
bg.GetWidget("BUTTON_INSTALL").IsVisible = () => false;
bg.GetWidget<ButtonWidget>("BUTTON_PLAY").OnClick = () => Play( CurrentSong );
bg.GetWidget<ButtonWidget>("BUTTON_PAUSE").OnClick = Sound.PauseMusic;
bg.GetWidget<ButtonWidget>("BUTTON_STOP").OnClick = Sound.StopMusic;
bg.GetWidget<ButtonWidget>("BUTTON_NEXT").OnClick = () => Play( GetNextSong() );
bg.GetWidget<ButtonWidget>("BUTTON_PREV").OnClick = () => Play( GetPrevSong() );
var shuffleCheckbox = bg.GetWidget<CheckboxWidget>("SHUFFLE");
shuffleCheckbox.IsChecked = () => Game.Settings.Sound.Shuffle;
shuffleCheckbox.OnClick = () => Game.Settings.Sound.Shuffle ^= true;
var repeatCheckbox = bg.GetWidget<CheckboxWidget>("REPEAT");
repeatCheckbox.IsChecked = () => Game.Settings.Sound.Repeat;
repeatCheckbox.OnClick = () => Game.Settings.Sound.Repeat ^= true;
bg.GetWidget<LabelWidget>("TIME").GetText = () =>
{
if (CurrentSong == null)
@@ -67,17 +67,17 @@ namespace OpenRA.Mods.RA.Widgets.Logic
WidgetUtils.FormatTimeSeconds( (int)Sound.MusicSeekPosition ),
WidgetUtils.FormatTimeSeconds( Rules.Music[CurrentSong].Length ));
};
var ml = bg.GetWidget<ScrollPanelWidget>("MUSIC_LIST");
var itemTemplate = ml.GetWidget<ScrollItemWidget>("MUSIC_TEMPLATE");
if (!Rules.InstalledMusic.Any())
{
itemTemplate.IsVisible = () => true;
itemTemplate.GetWidget<LabelWidget>("TITLE").GetText = () => "No Music Installed";
itemTemplate.GetWidget<LabelWidget>("TITLE").Align = LabelWidget.TextAlign.Center;
}
foreach (var kv in Rules.InstalledMusic)
{
var song = kv.Key;