mikael
27-07-2010 11:15:12
I am using these wrong or maybe a bug?
When using overlays, texts does not appear on the screen before I "touch" them,
example:
this works because I made a "hack code", "oe.Caption = oe.Caption;" but without them,
texts isnt visible.
Btw, I have made CreateOverlay program which takes some pieces of *.Designer.cs code
(file made and saved with VS C# 2008 (only tested)) to .overlay and .material file.
You can find it there: http://haima.dy.fi/ogre/cs
(will make it convert button and plane info too, not making a GUI-plugin but simple reader)
When using overlays, texts does not appear on the screen before I "touch" them,
example:
protected void UpdateStats()
{
try
{
RenderTarget.FrameStats stats = window.GetStatistics();
OverlayElement oe = OverlayManager.Singleton.GetOverlayElement("label1");
oe.Caption = "FPS: " + stats.LastFPS;
oe = OverlayManager.Singleton.GetOverlayElement("label2");
oe.Caption = oe.Caption;
oe = OverlayManager.Singleton.GetOverlayElement("label3");
oe.Caption = oe.Caption;
oe = OverlayManager.Singleton.GetOverlayElement("label4");
oe.Caption = oe.Caption;
}
catch
{
// ignore
}
}
this works because I made a "hack code", "oe.Caption = oe.Caption;" but without them,
texts isnt visible.
Btw, I have made CreateOverlay program which takes some pieces of *.Designer.cs code
(file made and saved with VS C# 2008 (only tested)) to .overlay and .material file.
You can find it there: http://haima.dy.fi/ogre/cs
(will make it convert button and plane info too, not making a GUI-plugin but simple reader)