Exemple #1
0
 public MessageBox(Context context, string messageString, string titleString, Urho.Resources.XmlFile layoutFile, Urho.Resources.XmlFile styleFile) : base(UrhoObjectFlag.Empty)
 {
     Runtime.Validate(typeof(MessageBox));
     handle = MessageBox_MessageBox((object)context == null ? IntPtr.Zero : context.Handle, messageString, titleString, (object)layoutFile == null ? IntPtr.Zero : layoutFile.Handle, (object)styleFile == null ? IntPtr.Zero : styleFile.Handle);
     Runtime.RegisterObject(this);
     OnMessageBoxCreated();
 }
Exemple #2
0
 /// <summary>
 /// Append data from an XML file. Return true if successful.
 /// </summary>
 public bool Append(Urho.Resources.XmlFile file)
 {
     Runtime.ValidateRefCounted(this);
     return(RenderPath_Append(handle, (object)file == null ? IntPtr.Zero : file.Handle));
 }
Exemple #3
0
 /// <summary>
 /// Set UI elements' style from an XML file.
 /// </summary>
 private void SetDefaultStyle(Urho.Resources.XmlFile style)
 {
     Runtime.ValidateRefCounted(this);
     UrhoConsole_SetDefaultStyle(handle, (object)style == null ? IntPtr.Zero : style.Handle);
 }
Exemple #4
0
 /// <summary>
 /// Add screen joystick.
 /// Return the joystick instance ID when successful or negative on error.
 /// If layout file is not given, use the default screen joystick layout.
 /// If style file is not given, use the default style file from root UI element.
 /// This method should only be called in main thread.
 /// </summary>
 public int AddScreenJoystick(Urho.Resources.XmlFile layoutFile = null, Urho.Resources.XmlFile styleFile = null)
 {
     Runtime.ValidateRefCounted(this);
     return(Input_AddScreenJoystick(handle, (object)layoutFile == null ? IntPtr.Zero : layoutFile.Handle, (object)styleFile == null ? IntPtr.Zero : styleFile.Handle));
 }
Exemple #5
0
 /// <summary>
 /// Set additional parameters from an XML file.
 /// </summary>
 public void SetParameters(Urho.Resources.XmlFile xml)
 {
     Runtime.ValidateRefCounted(this);
     Texture_SetParameters(handle, (object)xml == null ? IntPtr.Zero : xml.Handle);
 }
Exemple #6
0
 /// <summary>
 /// Set rendering path from an XML file.
 /// </summary>
 public void SetRenderPath(Urho.Resources.XmlFile file)
 {
     Runtime.ValidateRefCounted(this);
     Viewport_SetRenderPath2(handle, (object)file == null ? IntPtr.Zero : file.Handle);
 }
Exemple #7
0
 /// <summary>
 /// Load a UI layout from an XML file. Optionally specify another XML file for element style. Return the root element.
 /// </summary>
 public UIElement LoadLayout(Urho.Resources.XmlFile file, Urho.Resources.XmlFile styleFile)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <UIElement> (UI_LoadLayout0(handle, (object)file == null ? IntPtr.Zero : file.Handle, (object)styleFile == null ? IntPtr.Zero : styleFile.Handle)));
 }
Exemple #8
0
 /// <summary>
 /// Patch the XMLFile with another XMLFile. Based on RFC 5261.
 /// </summary>
 public void Patch(Urho.Resources.XmlFile patchFile)
 {
     Runtime.ValidateRefCounted(this);
     XmlFile_Patch(handle, (object)patchFile == null ? IntPtr.Zero : patchFile.Handle);
 }
Exemple #9
0
 /// <summary>
 /// Load from XML data with style. Return true if successful.
 /// </summary>
 public override bool LoadXml(Urho.Resources.XmlElement source, Urho.Resources.XmlFile styleFile, bool setInstanceDefault)
 {
     Runtime.ValidateRefCounted(this);
     return(Menu_LoadXML(handle, ref source, (object)styleFile == null ? IntPtr.Zero : styleFile.Handle, setInstanceDefault));
 }
Exemple #10
0
 /// <summary>
 /// Load from XML data with style. Return true if successful.
 /// </summary>
 public override bool LoadXml(XmlElement source, Urho.Resources.XmlFile styleFile)
 {
     Runtime.ValidateRefCounted(this);
     return(Menu_LoadXML(handle, (object)source == null ? IntPtr.Zero : source.Handle, (object)styleFile == null ? IntPtr.Zero : styleFile.Handle));
 }
Exemple #11
0
 /// <summary>
 /// Load a UI layout from an XML file. Optionally specify another XML file for element style. Return the root element.
 /// </summary>
 public UIElement LoadLayout(MemoryBuffer source, Urho.Resources.XmlFile styleFile = null)
 {
     Runtime.ValidateRefCounted(this);
     return(Runtime.LookupRefCounted <UIElement> (UI_LoadLayout_MemoryBuffer(handle, (object)source == null ? IntPtr.Zero : source.Handle, (object)styleFile == null ? IntPtr.Zero : styleFile.Handle)));
 }