Surface.CreateAvatarImage
Skip to content
mnscript
MNGuiAvatarImage Surface.CreateAvatarImage(MNGuiPanel) 

Description ​

Creates an avatar image on the specified UI element.

Arguments ​

MNGuiPanel - The parent UI element to create the new image under.

Returns ​

MNGuiAvatarImage - The new MNGuiAvatarImage.

Example ​

msc
using Surface;
using System;

MNGuiFrame frame = Surface.CreateApplicationFrame();
MNGuiPanel pnl = frame.GetPanel();

// Creates an avatar and fills the screen.
MNGuiAvatarImage avatar = Surface.CreateAvatarImage(pnl);
avatar.DockFill();
avatar.SetPlayer("76561198089568050");

// Update to add the new UI to the screen.
Surface.Update();

// Keep the program alive so the UI stays.
while(true){
    System.Sleep(1);
}