MNGuiImage.SetUrl
Skip to content
mnscript
MNGuiImage.SetUrl(string) 

Description ​

Sets the image Url. This should be a direct image link, E.G: https://i.imgur.com/jTJVvpa.jpeg

Arguments ​

string - The new image Url.

Example ​

msc
using Surface;
using System;

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

// Creates an image and fills the screen.
MNGuiImage img = Surface.CreateImage(pnl);
img.DockFill();
img.SetUrl("https://i.imgur.com/jTJVvpa.jpeg");

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

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