add tooltips on mapactor stuff

This commit is contained in:
Chris Forbes
2010-05-09 20:52:48 +12:00
parent b801c7a601
commit 12b46bd562

View File

@@ -18,7 +18,7 @@ namespace OpenRA.Editor
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly; AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
LocateGameRoot(); LocateGameRoot();
LoadMap("cnc", "scm02ea"); LoadMap("ra", "mjolnir");
} }
void LoadMap(string mod, string mapname) void LoadMap(string mod, string mapname)
@@ -83,7 +83,8 @@ namespace OpenRA.Editor
{ {
try try
{ {
var bitmap = RenderActor(Rules.Info[a], tsinfo.First, palette); var info = Rules.Info[a];
var bitmap = RenderActor(info, tsinfo.First, palette);
var ibox = new PictureBox var ibox = new PictureBox
{ {
Image = bitmap, Image = bitmap,
@@ -93,6 +94,11 @@ namespace OpenRA.Editor
}; };
actorPalette.Controls.Add(ibox); actorPalette.Controls.Add(ibox);
tt.SetToolTip(ibox,
"{0}:{1}".F(
info.Name,
info.Category));
} }
catch { } catch { }
} }