diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 8e60a55100..153ded9014 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -320,7 +320,6 @@ - diff --git a/OpenRA.Mods.RA/Widgets/Delegates/VideoPlayerDelegate.cs b/OpenRA.Mods.RA/Widgets/Delegates/VideoPlayerDelegate.cs deleted file mode 100644 index 71be34ccd8..0000000000 --- a/OpenRA.Mods.RA/Widgets/Delegates/VideoPlayerDelegate.cs +++ /dev/null @@ -1,87 +0,0 @@ -#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 - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System.Drawing; -using OpenRA.FileFormats; -using OpenRA.Widgets; - -namespace OpenRA.Mods.RA.Widgets.Delegates -{ - public class VideoPlayerDelegate : IWidgetDelegate - { - string Selected; - - public VideoPlayerDelegate() - { - var bg = Widget.RootWidget.GetWidget("VIDEOPLAYER_MENU"); - var player = bg.GetWidget("VIDEOPLAYER"); - - var pp = bg.GetWidget("BUTTON_PLAYPAUSE"); - pp.OnMouseUp = mi => - { - if (player.Paused) - player.Play(); - else - player.Pause(); - - return true; - }; - - pp.GetWidget("PLAY").IsVisible = () => player.Paused; - pp.GetWidget("PAUSE").IsVisible = () => !player.Paused; - - bg.GetWidget("BUTTON_STOP").OnMouseUp = mi => - { - player.Stop(); - return true; - }; - - bg.GetWidget("BUTTON_CLOSE").OnMouseUp = mi => { - player.Stop(); - Widget.CloseWindow(); - return true; - }; - - // Menu Buttons - Widget.RootWidget.GetWidget("MAINMENU_BUTTON_VIDEOPLAYER").OnMouseUp = mi => { - Widget.OpenWindow("VIDEOPLAYER_MENU"); - return true; - }; - - var vl = bg.GetWidget("VIDEO_LIST"); - var itemTemplate = vl.GetWidget("VIDEO_TEMPLATE"); - - foreach (var kv in Rules.Movies) - { - var video = kv.Key; - var title = kv.Value; - if (!FileSystem.Exists(video)) - continue; - - if (Selected == null) - player.Load(Selected = video); - - var template = itemTemplate.Clone() as LabelWidget; - template.Id = "VIDEO_{0}".F(video); - template.GetText = () => " " + title; - template.GetBackground = () => ((video == Selected) ? "dialog2" : null); - template.OnMouseDown = mi => - { - if (mi.Button != MouseButton.Left) return false; - Selected = video; - player.Load(video); - return true; - }; - template.IsVisible = () => true; - vl.AddChild(template); - } - } - } -} diff --git a/mods/ra/chrome/mainmenu.yaml b/mods/ra/chrome/mainmenu.yaml index bdeaa5f796..bd34b96b0e 100644 --- a/mods/ra/chrome/mainmenu.yaml +++ b/mods/ra/chrome/mainmenu.yaml @@ -64,15 +64,6 @@ Background@MAINMENU_BG: Height:25 Text:Quit Font:Bold - Button@MAINMENU_BUTTON_VIDEOPLAYER: - Id:MAINMENU_BUTTON_VIDEOPLAYER - Visible:false - X:45 - Y:260 - Width:200 - Height:25 - Text:Video Player - Font:Bold Background@QUICKMODSWITCHER: Id:QUICKMODSWITCHER Background: dialog4 diff --git a/mods/ra/chrome/videoplayer.yaml b/mods/ra/chrome/videoplayer.yaml deleted file mode 100644 index 164e1ff14e..0000000000 --- a/mods/ra/chrome/videoplayer.yaml +++ /dev/null @@ -1,75 +0,0 @@ -Background@VIDEOPLAYER_MENU: - Id:VIDEOPLAYER_MENU - Delegate:VideoPlayerDelegate - X:(WINDOW_RIGHT - WIDTH)/2 - Y:(WINDOW_BOTTOM- HEIGHT)/2 - Width: 700 - Height: 680 - Children: - Label@VIDEOPLAYER_TITLE: - X:0 - Y:20 - Align:Center - Width:PARENT_RIGHT - Height:20 - Text:Video Player - Font:Bold - VqaPlayer: - Id:VIDEOPLAYER - X:30 - Y:50 - Width:640 - Height:400 - ScrollPanel@VIDEO_LIST: - Id:VIDEO_LIST - X:20 - Y:460 - Width:480 - Height:200 - Children: - Label@VIDEO_TEMPLATE: - Id:VIDEO_TEMPLATE - Width:PARENT_RIGHT-28 - Height:25 - X:2 - Y:0 - Visible:false - Button@BUTTON_PLAYPAUSE: - Id:BUTTON_PLAYPAUSE - X:600 - WIDTH - 10 - Y:460 - Width:25 - Height:25 - Children: - Image@PLAY: - Id:PLAY - Width:25 - Height:25 - ImageCollection:music - ImageName:play - Image@PAUSE: - Id:PAUSE - Width:25 - Height:25 - ImageCollection:music - ImageName:pause - Button@BUTTON_STOP: - Id:BUTTON_STOP - X:610 - Y:460 - Width:25 - Height:25 - Children: - Image: - Width:25 - Height:25 - ImageCollection:music - ImageName:stop - Button@BUTTON_CLOSE: - Id:BUTTON_CLOSE - X:PARENT_RIGHT - 180 - Y:PARENT_BOTTOM - 45 - Width:160 - Height:25 - Text:Close - Font:Bold \ No newline at end of file diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index b1ca17d99d..1e81618e31 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -57,7 +57,6 @@ ChromeLayout: mods/ra/chrome/gameinit.yaml mods/ra/chrome/ingame.yaml mods/ra/chrome/mainmenu.yaml - mods/ra/chrome/videoplayer.yaml mods/ra/chrome/settings.yaml mods/ra/chrome/gamelobby.yaml mods/ra/chrome/serverbrowser.yaml