mirror of
https://github.com/riperiperi/FreeSO
synced 2026-08-13 20:26:13 -04:00
MPL per-file was used in older project files, but should apply to the whole project, so having it there was redundant.
32 lines
846 B
C#
32 lines
846 B
C#
using FSO.Client;
|
|
using FSO.Client.UI.Framework;
|
|
using Microsoft.Xna.Framework;
|
|
|
|
namespace FSO.IDE.Common
|
|
{
|
|
public class ObjThumbnailControl : FSOUIControl {
|
|
private UIThumbnailRenderer Renderer;
|
|
|
|
public void ShowObject(uint GUID)
|
|
{
|
|
if (FSOUI == null)
|
|
{
|
|
var mainCont = new UIExternalContainer(128, 128);
|
|
mainCont.ClearColor = Color.TransparentBlack;
|
|
Renderer = new UIThumbnailRenderer(GUID);
|
|
mainCont.Add(Renderer);
|
|
GameFacade.Screens.AddExternal(mainCont);
|
|
|
|
SetUI(mainCont);
|
|
}
|
|
else
|
|
{
|
|
//reuse existing
|
|
lock (FSOUI)
|
|
{
|
|
Renderer.SetGUID(GUID);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|