Remove unused video player from ra
This commit is contained in:
@@ -320,7 +320,6 @@
|
||||
<Compile Include="Widgets\Delegates\PerfDebugDelegate.cs" />
|
||||
<Compile Include="Widgets\Delegates\ServerBrowserDelegate.cs" />
|
||||
<Compile Include="Widgets\Delegates\SettingsMenuDelegate.cs" />
|
||||
<Compile Include="Widgets\Delegates\VideoPlayerDelegate.cs" />
|
||||
<Compile Include="TargetableSubmarine.cs" />
|
||||
<Compile Include="Effects\RallyPoint.cs" />
|
||||
<Compile Include="AttackMedic.cs" />
|
||||
|
||||
@@ -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<VqaPlayerWidget>("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<ScrollPanelWidget>("VIDEO_LIST");
|
||||
var itemTemplate = vl.GetWidget<LabelWidget>("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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user