Overhaul asset browser.

This commit is contained in:
Paul Chote
2013-12-01 11:00:36 +13:00
parent 30f150fc91
commit 1e7f436448
10 changed files with 93 additions and 569 deletions

View File

@@ -16,8 +16,9 @@ NEW:
Added a setting for team health bar colors. Added a setting for team health bar colors.
Asset Browser: Asset Browser:
Fixed crashes when trying to load invalid filenames or sprites with just 1 frame. Fixed crashes when trying to load invalid filenames or sprites with just 1 frame.
Added support for browsing the folders for R8 files. Added support for all sprite types.
Added palette chooser and colorpicker dropdown boxes. Added palette chooser and colorpicker dropdown boxes.
Overhauled layout.
Red Alert: Red Alert:
Added MAD Tank. Added MAD Tank.
Fixed a crash in Monster Tank Madness. Fixed a crash in Monster Tank Madness.
@@ -122,6 +123,7 @@ NEW:
OpenRA.Utility --png will now generate a set of frames for any sprite type [shp(td)/shp(ts)/shp(d2)/r8/tmp(td)/tmp(ra)]. OpenRA.Utility --png will now generate a set of frames for any sprite type [shp(td)/shp(ts)/shp(d2)/r8/tmp(td)/tmp(ra)].
OpenRA.Utility --shp now requires a list of frames to be combined into a shp. OpenRA.Utility --shp now requires a list of frames to be combined into a shp.
Removed Utility --tmp-png, --r8, --fromd2 commands (use --png instead). Removed Utility --tmp-png, --r8, --fromd2 commands (use --png instead).
Removed Asset Browser file extraction / conversion (use the Utility instead).
Unified sprite loading allows any sprite type to be used anywhere: shp can now be used for terrain, and tmp for units. Unified sprite loading allows any sprite type to be used anywhere: shp can now be used for terrain, and tmp for units.
20130915: 20130915:

View File

@@ -33,9 +33,9 @@
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>False</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
@@ -47,17 +47,17 @@
</CustomCommands> </CustomCommands>
</CustomCommands> </CustomCommands>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>True</Optimize>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="FuzzyLogicLibrary"> <Reference Include="FuzzyLogicLibrary">
@@ -70,14 +70,13 @@
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\thirdparty\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Mono.Nat"> <Reference Include="Mono.Nat">
<HintPath>..\thirdparty\Mono.Nat.dll</HintPath> <HintPath>..\thirdparty\Mono.Nat.dll</HintPath>
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="ICSharpCode.SharpZipLib">
<HintPath>..\thirdparty\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Activities\CaptureActor.cs" /> <Compile Include="Activities\CaptureActor.cs" />
@@ -444,7 +443,6 @@
<Compile Include="Widgets\HueSliderWidget.cs" /> <Compile Include="Widgets\HueSliderWidget.cs" />
<Compile Include="Render\WithTurret.cs" /> <Compile Include="Render\WithTurret.cs" />
<Compile Include="Widgets\Logic\AssetBrowserLogic.cs" /> <Compile Include="Widgets\Logic\AssetBrowserLogic.cs" />
<Compile Include="Widgets\Logic\ConvertGameFilesLogic.cs" />
<Compile Include="VoxelNormalsPalette.cs" /> <Compile Include="VoxelNormalsPalette.cs" />
<Compile Include="Render\RenderVoxels.cs" /> <Compile Include="Render\RenderVoxels.cs" />
<Compile Include="Render\WithVoxelTurret.cs" /> <Compile Include="Render\WithVoxelTurret.cs" />
@@ -481,7 +479,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\LuaInterface\LuaInterface.csproj"> <ProjectReference Include="..\LuaInterface\LuaInterface.csproj">
<Project>{e915a0a4-2641-4f7e-8a88-8f123fa88bf1}</Project> <Project>{E915A0A4-2641-4F7E-8A88-8F123FA88BF1}</Project>
<Name>LuaInterface</Name> <Name>LuaInterface</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj"> <ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
@@ -495,7 +493,7 @@
<Private>False</Private> <Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\OpenRA.Irc\OpenRA.Irc.csproj"> <ProjectReference Include="..\OpenRA.Irc\OpenRA.Irc.csproj">
<Project>{85b48234-8b31-4be6-af9c-665cc6866841}</Project> <Project>{85B48234-8B31-4BE6-AF9C-665CC6866841}</Project>
<Name>OpenRA.Irc</Name> <Name>OpenRA.Irc</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\OpenRA.Utility\OpenRA.Utility.csproj"> <ProjectReference Include="..\OpenRA.Utility\OpenRA.Utility.csproj">

View File

@@ -35,6 +35,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
PaletteFromFile currentPalette; PaletteFromFile currentPalette;
static readonly string[] AllowedExtensions = { ".shp", ".r8", ".tem", ".des", ".sno", ".int" };
[ObjectCreator.UseCtor] [ObjectCreator.UseCtor]
public AssetBrowserLogic(Widget widget, Action onExit, World world) public AssetBrowserLogic(Widget widget, Action onExit, World world)
{ {
@@ -60,6 +62,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var paletteDropDown = panel.Get<DropDownButtonWidget>("PALETTE_SELECTOR"); var paletteDropDown = panel.Get<DropDownButtonWidget>("PALETTE_SELECTOR");
paletteDropDown.OnMouseDown = _ => ShowPaletteDropdown(paletteDropDown, world); paletteDropDown.OnMouseDown = _ => ShowPaletteDropdown(paletteDropDown, world);
paletteDropDown.GetText = () => currentPalette.Name;
var colorPreview = panel.Get<ColorPreviewManagerWidget>("COLOR_MANAGER"); var colorPreview = panel.Get<ColorPreviewManagerWidget>("COLOR_MANAGER");
colorPreview.Color = Game.Settings.Player.Color; colorPreview.Color = Game.Settings.Player.Color;
@@ -80,7 +83,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
frameSlider.OnChange += x => { spriteWidget.Frame = (int)Math.Round(x); }; frameSlider.OnChange += x => { spriteWidget.Frame = (int)Math.Round(x); };
frameSlider.GetValue = () => spriteWidget.Frame; frameSlider.GetValue = () => spriteWidget.Frame;
panel.Get<LabelWidget>("FRAME_COUNT").GetText = () => "{0}/{1}".F(spriteWidget.Frame, spriteWidget.FrameCount); panel.Get<LabelWidget>("FRAME_COUNT").GetText = () => "{0} / {1}".F(spriteWidget.Frame + 1, spriteWidget.FrameCount + 1);
playButton = panel.Get<ButtonWidget>("BUTTON_PLAY"); playButton = panel.Get<ButtonWidget>("BUTTON_PLAY");
playButton.OnClick = () => playButton.OnClick = () =>
@@ -118,96 +121,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic
template = panel.Get<ScrollItemWidget>("ASSET_TEMPLATE"); template = panel.Get<ScrollItemWidget>("ASSET_TEMPLATE");
PopulateAssetList(); PopulateAssetList();
var modID = Game.modData.Manifest.Mod.Id;
// TODO: This should not invoke the OpenRA.Utility.exe, but use it's functions directly.
// TODO: Does not work with SHP(TS) yet?!
panel.Get<ButtonWidget>("EXPORT_BUTTON").OnClick = () =>
{
var ExtractGameFiles = new string[][]
{
new string[] { "--extract", modID, currentPalette.Filename, "--userdir" },
new string[] { "--extract", modID, "{0}.shp".F(spriteWidget.Image), "--userdir" },
};
var ExportToPng = new string[][]
{
new string[] { "--png", Platform.SupportDir + "{0}.shp".F(spriteWidget.Image), Platform.SupportDir + currentPalette.Filename },
};
var ImportFromPng = new string[][] { };
var args = new WidgetArgs()
{
{ "ExtractGameFiles", ExtractGameFiles },
{ "ExportToPng", ExportToPng },
{ "ImportFromPng", ImportFromPng }
};
Ui.OpenWindow("CONVERT_ASSETS_PANEL", args);
};
panel.Get<ButtonWidget>("EXTRACT_BUTTON").OnClick = () =>
{
var ExtractGameFilesList = new List<string[]>();
var ExportToPngList = new List<string[]>();
ExtractGameFilesList.Add(new string[] { "--extract", modID, currentPalette.Filename, "--userdir" });
foreach (var shp in availableShps)
{
ExtractGameFilesList.Add(new string[] { "--extract", modID, shp, "--userdir" });
ExportToPngList.Add(new string[] { "--png", Platform.SupportDir + shp, Platform.SupportDir + currentPalette.Filename });
Console.WriteLine(Platform.SupportDir + shp);
}
var ExtractGameFiles = ExtractGameFilesList.ToArray();
var ExportToPng = ExportToPngList.ToArray();
var ImportFromPng = new string[][] { };
var args = new WidgetArgs()
{
{ "ExtractGameFiles", ExtractGameFiles },
{ "ExportToPng", ExportToPng },
{ "ImportFromPng", ImportFromPng }
};
Ui.OpenWindow("CONVERT_ASSETS_PANEL", args);
};
panel.Get<ButtonWidget>("IMPORT_BUTTON").OnClick = () =>
{
var imageSizeInput = panel.Get<TextFieldWidget>("IMAGE_SIZE_INPUT");
var imageFilename = panel.Get<TextFieldWidget>("IMAGE_FILENAME_INPUT");
var ExtractGameFiles = new string[][] { };
var ExportToPng = new string[][] { };
var ImportFromPng = new string[][]
{
new string[] { "--shp", Platform.SupportDir + imageFilename.Text, imageSizeInput.Text },
};
var args = new WidgetArgs()
{
{ "ExtractGameFiles", ExtractGameFiles },
{ "ExportToPng", ExportToPng },
{ "ImportFromPng", ImportFromPng }
};
Ui.OpenWindow("CONVERT_ASSETS_PANEL", args);
};
panel.Get<ButtonWidget>("CLOSE_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); }; panel.Get<ButtonWidget>("CLOSE_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); };
} }
void AddAsset(ScrollPanelWidget list, string filepath, ScrollItemWidget template) void AddAsset(ScrollPanelWidget list, string filepath, ScrollItemWidget template)
{ {
var r8 = filepath.EndsWith(".r8", true, CultureInfo.InvariantCulture); var filename = Path.GetFileName(filepath);
var filename = Path.GetFileName(filepath);
var sprite = r8 ? filename : Path.GetFileNameWithoutExtension(filepath);
var item = ScrollItemWidget.Setup(template, var item = ScrollItemWidget.Setup(template,
() => spriteWidget.Image == sprite, () => spriteWidget.Image == filename,
() => {filenameInput.Text = filename; LoadAsset(filename); }); () => { filenameInput.Text = filename; LoadAsset(filename); });
item.Get<LabelWidget>("TITLE").GetText = () => filepath; item.Get<LabelWidget>("TITLE").GetText = () => filepath;
list.AddChild(item); list.AddChild(item);
@@ -221,11 +143,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
if (!FileSystem.Exists(filename)) if (!FileSystem.Exists(filename))
return false; return false;
var r8 = filename.EndsWith(".r8", true, CultureInfo.InvariantCulture);
var sprite = r8 ? filename : Path.GetFileNameWithoutExtension(filename);
spriteWidget.Frame = 0; spriteWidget.Frame = 0;
spriteWidget.Image = sprite; spriteWidget.Image = filename;
frameSlider.MaximumValue = (float)spriteWidget.FrameCount; frameSlider.MaximumValue = (float)spriteWidget.FrameCount;
frameSlider.Ticks = spriteWidget.FrameCount + 1; frameSlider.Ticks = spriteWidget.FrameCount + 1;
return true; return true;
@@ -265,7 +184,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var files = assetSource.AllFileNames(); var files = assetSource.AllFileNames();
foreach (var file in files) foreach (var file in files)
{ {
if (file.EndsWith(".shp", true, CultureInfo.InvariantCulture) || file.EndsWith(".r8", true, CultureInfo.InvariantCulture)) if (AllowedExtensions.Any(ext => file.EndsWith(ext, true, CultureInfo.InvariantCulture)))
{ {
AddAsset(assetList, file, template); AddAsset(assetList, file, template);
availableShps.Add(file); availableShps.Add(file);
@@ -278,8 +197,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Func<PaletteFromFile, ScrollItemWidget, ScrollItemWidget> setupItem = (palette, itemTemplate) => Func<PaletteFromFile, ScrollItemWidget, ScrollItemWidget> setupItem = (palette, itemTemplate) =>
{ {
var item = ScrollItemWidget.Setup(itemTemplate, var item = ScrollItemWidget.Setup(itemTemplate,
() => currentPalette.Name == palette.Name, () => currentPalette.Name == palette.Name,
() => { currentPalette = palette; spriteWidget.Palette = currentPalette.Name; }); () => { currentPalette = palette; spriteWidget.Palette = currentPalette.Name; });
item.Get<LabelWidget>("LABEL").GetText = () => palette.Name; item.Get<LabelWidget>("LABEL").GetText = () => palette.Name;
return item; return item;
}; };

View File

@@ -1,110 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 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;
using System.IO;
using System.Linq;
using System.Threading;
using OpenRA.Utility;
using OpenRA.Widgets;
namespace OpenRA.Mods.RA.Widgets.Logic
{
public class ConvertGameFilesLogic
{
Widget panel;
ProgressBarWidget progressBar;
LabelWidget statusLabel;
ButtonWidget retryButton, backButton;
Widget extractingContainer;
string[][] ExtractGameFiles, ExportToPng, ImportFromPng;
[ObjectCreator.UseCtor]
public ConvertGameFilesLogic(Widget widget, string[][] ExtractGameFiles, string[][] ExportToPng, string[][] ImportFromPng)
{
panel = widget.Get("CONVERT_ASSETS_PANEL");
progressBar = panel.Get<ProgressBarWidget>("PROGRESS_BAR");
statusLabel = panel.Get<LabelWidget>("STATUS_LABEL");
backButton = panel.Get<ButtonWidget>("BACK_BUTTON");
backButton.OnClick = Ui.CloseWindow;
retryButton = panel.Get<ButtonWidget>("RETRY_BUTTON");
retryButton.OnClick = Extract;
extractingContainer = panel.Get("EXTRACTING");
this.ExtractGameFiles = ExtractGameFiles;
this.ExportToPng = ExportToPng;
this.ImportFromPng = ImportFromPng;
Extract();
}
void Extract()
{
backButton.IsDisabled = () => true;
retryButton.IsDisabled = () => true;
extractingContainer.IsVisible = () => true;
var onError = (Action<string>)(s => Game.RunAfterTick(() =>
{
statusLabel.GetText = () => "Error: "+s;
backButton.IsDisabled = () => false;
retryButton.IsDisabled = () => false;
}));
var t = new Thread( _ =>
{
try
{
for (int i = 0; i < ExtractGameFiles.Length; i++)
{
progressBar.Percentage = i*100/ExtractGameFiles.Count();
statusLabel.GetText = () => "Extracting...";
Command.ExtractFiles(ExtractGameFiles[i]);
}
for (int i = 0; i < ExportToPng.Length; i++)
{
progressBar.Percentage = i*100/ExportToPng.Count();
statusLabel.GetText = () => "Exporting SHP to PNG...";
Command.ConvertShpToPng(ExportToPng[i]);
}
for (int i = 0; i < ImportFromPng.Length; i++)
{
progressBar.Percentage = i*100/ImportFromPng.Count();
statusLabel.GetText = () => "Converting PNG to SHP...";
Command.ConvertPngToShp(ImportFromPng[i]);
}
Game.RunAfterTick(() =>
{
progressBar.Percentage = 100;
statusLabel.GetText = () => "Done. Check {0}".F(Platform.SupportDir);
backButton.IsDisabled = () => false;
});
}
catch (FileNotFoundException f)
{
onError(f.FileName+" not found.");
}
catch (Exception e)
{
onError(e.Message);
}
}) { IsBackground = true };
t.Start();
}
}
}

View File

@@ -1,215 +0,0 @@
Background@ASSETBROWSER_BG:
Logic:AssetBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:700
Height:410
Children:
ColorPreviewManager@COLOR_MANAGER:
Label@ASSETBROWSER_TITLE:
X:0
Y:10
Width:PARENT_RIGHT
Height:25
Text:Game Asset Viewer & Converter
Align:Center
Font:Bold
DropDownButton@SOURCE_SELECTOR:
X:40
Y:45
Width:160
Height:25
Font:Bold
Text:Folders
ScrollPanel@ASSET_LIST:
X:40
Y:80
Width:160
Height:190
Children:
ScrollItem@ASSET_TEMPLATE:
Width:PARENT_RIGHT-27
Height:25
X:2
Y:0
Visible:false
Children:
Label@TITLE:
X:10
Width:PARENT_RIGHT-20
Height:25
TextField@FILENAME_INPUT:
X:40
Y:280
Width:140
Height:25
Text:mouse.r8
Button@LOAD_BUTTON:
X:40
Y:310
Width:140
Height:25
Text:Load
Font:Bold
Key:return
DropDownButton@PALETTE_SELECTOR:
X:230
Y:45
Width:150
Height:25
Font:Bold
Text:Palette
DropDownButton@COLOR:
X:380
Y:45
Width:80
Height:25
Children:
ColorBlock@COLORBLOCK:
X:5
Y:6
Width:PARENT_RIGHT-35
Height:PARENT_BOTTOM-12
Background@SPRITE_BG:
X:220
Y:80
Width:250
Height:250
Background:dialog4
Children:
ShpImage@SPRITE:
X:4
Y:4
Width:246
Height:246
Image:mouse.r8
Label@ACTIONS_TITLE:
X:PARENT_RIGHT - 150
Y:45
Width:PARENT_RIGHT
Height:25
Text:Actions
Font:Bold
Button@EXPORT_BUTTON:
X:PARENT_RIGHT - 200
Y:80
Width:160
Height:25
Text:Selected to PNG
Font:Bold
Button@EXTRACT_BUTTON:
X:PARENT_RIGHT - 200
Y:115
Width:160
Height:25
Text:Extract all to PNG
Font:Bold
TextField@IMAGE_FILENAME_INPUT:
X:PARENT_RIGHT - 200
Y:PARENT_BOTTOM - 235
Width:100
Height:25
Text:pixelart.png
TextField@IMAGE_SIZE_INPUT:
X:PARENT_RIGHT - 90
Y:PARENT_BOTTOM - 235
Width:50
Height:25
Text:width
Button@IMPORT_BUTTON:
X:PARENT_RIGHT - 200
Y:PARENT_BOTTOM - 200
Width:160
Height:25
Text:Import from PNG
Font:Bold
Button@CLOSE_BUTTON:
X:PARENT_RIGHT - 200
Y:PARENT_BOTTOM - 115
Width:160
Height:25
Text:Close
Font:Bold
Key:escape
Container@FRAME_SELECTOR:
X:45
Y:360
Children:
Button@BUTTON_PREV:
X:0
Y:0
Width:25
Height:25
Children:
Image@IMAGE_PREV:
X:0
Y:0
Width:25
Height:25
ImageCollection:music
ImageName:prev
Button@BUTTON_PLAY:
X:35
Y:0
Width:25
Height:25
Children:
Image@IMAGE_PLAY:
X:0
Y:0
Width:25
Height:25
ImageCollection:music
ImageName:play
Button@BUTTON_PAUSE:
Visible: no
X:35
Y:0
Width:25
Height:25
Children:
Image@IMAGE_PAUSE:
X:0
Y:0
Width:25
Height:25
ImageCollection:music
ImageName:pause
Button@BUTTON_STOP:
X:70
Y:0
Width:25
Height:25
Children:
Image@IMAGE_STOP:
X:0
Y:0
Width:25
Height:25
ImageCollection:music
ImageName:stop
Button@BUTTON_NEXT:
X:105
Y:0
Width:25
Height:25
Children:
Image@IMAGE_NEXT:
X:0
Y:0
Width:25
Height:25
ImageCollection:music
ImageName:next
Slider@FRAME_SLIDER:
X:160
Y:0
Width:410
Height:20
MinimumValue: 0
Label@FRAME_COUNT:
X:585
Y:0
Width:25
Height:25
Font:Bold

View File

@@ -76,8 +76,7 @@ ChromeLayout:
mods/ra/chrome/cheats.yaml mods/ra/chrome/cheats.yaml
mods/ra/chrome/musicplayer.yaml mods/ra/chrome/musicplayer.yaml
mods/d2k/chrome/tooltips.yaml mods/d2k/chrome/tooltips.yaml
mods/d2k/chrome/assetbrowser.yaml mods/ra/chrome/assetbrowser.yaml
mods/ra/chrome/convertassets.yaml
mods/ra/chrome/irc.yaml mods/ra/chrome/irc.yaml
Weapons: Weapons:

View File

@@ -3,29 +3,36 @@ Background@ASSETBROWSER_BG:
X:(WINDOW_RIGHT - WIDTH)/2 X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:700 Width:700
Height:410 Height:500
Children: Children:
ColorPreviewManager@COLOR_MANAGER: ColorPreviewManager@COLOR_MANAGER:
Label@ASSETBROWSER_TITLE: Label@ASSETBROWSER_TITLE:
X:0 Y:20
Y:10
Width:PARENT_RIGHT Width:PARENT_RIGHT
Height:25 Height:25
Text:Game Asset Viewer & Converter
Align:Center
Font:Bold Font:Bold
Align:Center
Text:Asset Browser
Label@SOURCE_SELECTOR_DESC:
X:20
Y:35
Width:160
Height:25
Font:TinyBold
Align:Center
Text:Select asset source
DropDownButton@SOURCE_SELECTOR: DropDownButton@SOURCE_SELECTOR:
X:40 X:20
Y:45 Y:60
Width:160 Width:160
Height:25 Height:25
Font:Bold Font:Bold
Text:Folders Text:Folders
ScrollPanel@ASSET_LIST: ScrollPanel@ASSET_LIST:
X:40 X:20
Y:80 Y:90
Width:160 Width:160
Height:190 Height:275
Children: Children:
ScrollItem@ASSET_TEMPLATE: ScrollItem@ASSET_TEMPLATE:
Width:PARENT_RIGHT-27 Width:PARENT_RIGHT-27
@@ -38,30 +45,45 @@ Background@ASSETBROWSER_BG:
X:10 X:10
Width:PARENT_RIGHT-20 Width:PARENT_RIGHT-20
Height:25 Height:25
Label@FILENAME_DESC:
X:20
Y:370
Width:160
Height:25
Font:TinyBold
Align:Center
Text:Search for file
TextField@FILENAME_INPUT: TextField@FILENAME_INPUT:
X:40 X:20
Y:280 Y:395
Width:140 Width:160
Height:25 Height:25
Text:mouse.shp Text:mouse.shp
Button@LOAD_BUTTON: Button@LOAD_BUTTON:
X:40 X:20
Y:310 Y:425
Width:140 Width:160
Height:25 Height:25
Text:Load Text:Load
Font:Bold Font:Bold
Key:return Key:return
DropDownButton@PALETTE_SELECTOR: Label@PALETTE_DESC:
X:230 X:PARENT_RIGHT-WIDTH-270
Y:45 Y:60
Width:150
Height:25
Font:Bold
Align:Right
Text:Palette:
DropDownButton@PALETTE_SELECTOR:
X:PARENT_RIGHT-WIDTH-110
Y:60
Width:150 Width:150
Height:25 Height:25
Font:Bold Font:Bold
Text:Palette
DropDownButton@COLOR: DropDownButton@COLOR:
X:380 X:PARENT_RIGHT-WIDTH-20
Y:45 Y:60
Width:80 Width:80
Height:25 Height:25
Children: Children:
@@ -71,69 +93,19 @@ Background@ASSETBROWSER_BG:
Width:PARENT_RIGHT-35 Width:PARENT_RIGHT-35
Height:PARENT_BOTTOM-12 Height:PARENT_BOTTOM-12
Background@SPRITE_BG: Background@SPRITE_BG:
X:220 X:190
Y:80 Y:90
Width:250 Width:490
Height:250 Height:330
Background:dialog4 Background:dialog3
Children: Children:
ShpImage@SPRITE: ShpImage@SPRITE:
X:4 Width:PARENT_RIGHT
Y:4 Height:PARENT_BOTTOM
Width:246
Height:246
Image:mouse Image:mouse
Label@ACTIONS_TITLE:
X:PARENT_RIGHT - 150
Y:45
Width:PARENT_RIGHT
Height:25
Text:Actions
Font:Bold
Button@EXPORT_BUTTON:
X:PARENT_RIGHT - 200
Y:80
Width:160
Height:25
Text:Selected to PNG
Font:Bold
Button@EXTRACT_BUTTON:
X:PARENT_RIGHT - 200
Y:115
Width:160
Height:25
Text:Extract all to PNG
Font:Bold
TextField@IMAGE_FILENAME_INPUT:
X:PARENT_RIGHT - 200
Y:PARENT_BOTTOM - 235
Width:100
Height:25
Text:pixelart.png
TextField@IMAGE_SIZE_INPUT:
X:PARENT_RIGHT - 90
Y:PARENT_BOTTOM - 235
Width:50
Height:25
Text:width
Button@IMPORT_BUTTON:
X:PARENT_RIGHT - 200
Y:PARENT_BOTTOM - 200
Width:160
Height:25
Text:Import from PNG
Font:Bold
Button@CLOSE_BUTTON:
X:PARENT_RIGHT - 200
Y:PARENT_BOTTOM - 115
Width:160
Height:25
Text:Close
Font:Bold
Key:escape
Container@FRAME_SELECTOR: Container@FRAME_SELECTOR:
X:45 X:190
Y:360 Y:425
Children: Children:
Button@BUTTON_PREV: Button@BUTTON_PREV:
X:0 X:0
@@ -202,14 +174,22 @@ Background@ASSETBROWSER_BG:
ImageCollection:music ImageCollection:music
ImageName:next ImageName:next
Slider@FRAME_SLIDER: Slider@FRAME_SLIDER:
X:160 X:140
Y:0 Y:3
Width:410 Width:300
Height:20 Height:20
MinimumValue: 0 MinimumValue: 0
Label@FRAME_COUNT: Label@FRAME_COUNT:
X:585 X:445
Y:0 Width:40
Width:25
Height:25 Height:25
Font:Bold Font:TinyBold
Align:Left
Button@CLOSE_BUTTON:
Key:escape
X:PARENT_RIGHT-180
Y:PARENT_BOTTOM-45
Width:160
Height:25
Font:Bold
Text:Close

View File

@@ -1,47 +0,0 @@
Background@CONVERT_ASSETS_PANEL:
Logic:ConvertGameFilesLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:500
Height:160
Children:
Label@TITLE:
X:0
Y:20
Width:PARENT_RIGHT
Height:25
Text:Extracting and Converting Gamefiles
Align:Center
Font:Bold
Container@EXTRACTING:
Width:PARENT_RIGHT
Height:PARENT_BOTTOM
Visible: false
Children:
ProgressBar@PROGRESS_BAR:
X:50
Y:55
Width:PARENT_RIGHT - 100
Height:25
Label@STATUS_LABEL:
X:50
Y:80
Width:PARENT_RIGHT - 100
Height:25
Align:Left
Button@RETRY_BUTTON:
X:PARENT_RIGHT - 280
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Retry
Font:Bold
Key:return
Button@BACK_BUTTON:
X:PARENT_RIGHT - 140
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Back
Font:Bold
Key:escape

View File

@@ -92,7 +92,6 @@ ChromeLayout:
mods/ra/chrome/musicplayer.yaml mods/ra/chrome/musicplayer.yaml
mods/ra/chrome/tooltips.yaml mods/ra/chrome/tooltips.yaml
mods/ra/chrome/assetbrowser.yaml mods/ra/chrome/assetbrowser.yaml
mods/ra/chrome/convertassets.yaml
mods/ra/chrome/irc.yaml mods/ra/chrome/irc.yaml
Weapons: Weapons:

View File

@@ -120,7 +120,6 @@ ChromeLayout:
mods/ra/chrome/musicplayer.yaml mods/ra/chrome/musicplayer.yaml
mods/ra/chrome/tooltips.yaml mods/ra/chrome/tooltips.yaml
mods/ra/chrome/assetbrowser.yaml mods/ra/chrome/assetbrowser.yaml
mods/ra/chrome/convertassets.yaml
mods/ra/chrome/irc.yaml mods/ra/chrome/irc.yaml
Weapons: Weapons: