pin
30-03-2007 18:18:20
Does anyone know C# code that shows how Overlays are supposed to be used? I have some C++ snippets but that'll take a time to figure out and translate to NET code.
pin
30-03-2007 18:18:20
Eldritch
30-03-2007 19:38:54
pin
30-03-2007 21:55:25
//Overlay
OverlayManager overlayManager = OverlayManager.Singleton;
// Create a panel
OverlayContainer panel = (OverlayContainer)overlayManager.CreateOverlayElement("Panel", "PanelName");
panel.MetricsMode = GuiMetricsMode.GMM_PIXELS;
panel.SetPosition(10,10);
panel.SetDimensions(100,100);
//panel.MaterialName = "MaterialName"; // Optional background material
// Create a text area
TextAreaOverlayElement textArea = (TextAreaOverlayElement)overlayManager.CreateOverlayElement("TextArea", "TextAreaName");
textArea.MetricsMode = GuiMetricsMode.GMM_PIXELS;
textArea.SetPosition(0,0);
textArea.SetDimensions(100,100);
textArea.Caption = "Hello World";
textArea.CharHeight = 16;
textArea.FontName = "TrebuchetMSBold";
textArea.ColourBottom = new ColourValue(0.3f,0.5f,0.3f);
textArea.ColourTop = new ColourValue(0.5f, 0.7f, 0.5f);
// Create an overlay, and add the panel
Overlay overlay = overlayManager.Create("OverlayName");
overlay.Add2D(panel);
// Add the text area to the panel
panel.AddChild(textArea);
// Show the overlay
overlay.Show();
Eldritch
30-03-2007 21:58:07
pin
30-03-2007 22:13:36
Eldritch
30-03-2007 22:14:48
pin
30-03-2007 22:18:00
Eldritch
30-03-2007 22:19:28
pin
30-03-2007 22:36:48
Eldritch
30-03-2007 22:39:13
pin
30-03-2007 22:46:35
Eldritch
30-03-2007 22:50:06
pin
30-03-2007 22:55:50
Eldritch
30-03-2007 22:59:57
Bekas
31-03-2007 10:51:06
thx, but the ones in the scripts folder don't work either (tried a few)
is there a way to display an image with an alpha channel using materials? I'm trying to display a cursor.
pin
31-03-2007 12:18:25