RAGE.Ui.HtmlWindow.Active: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
m (Add link to package protocol)
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
{{CSharpContainer|
{{CSharpContainer|
<syntaxhighlight lang="C#">
<syntaxhighlight lang="C#">
HtmlWindow ShopCEF = new HtmlWindow("package://cef/shop/index.html");
HtmlWindow CEF = new HtmlWindow("http://package/index.html");


private void openUI() {
private void openUI() {
     ShopCEF.Active = true;
     CEF.Active = true;
     Rage.Ui.Cursor.Visible = true;
     Rage.Ui.Cursor.Visible = true;
    RAGE.Game.Entity.FreezeEntityPosition(Player.LocalPlayer.Handle, true);
}
}


private void closeUI() {
private void closeUI() {
     ShopCEF.Active = false;
     CEF.Active = false;
     Rage.Ui.Cursor.Visible = false;
     Rage.Ui.Cursor.Visible = false;
    RAGE.Game.Entity.FreezeEntityPosition(Player.LocalPlayer.Handle, false);
}
}
</syntaxhighlight>
</syntaxhighlight>
}}
}}
See [[Package Protocol]] for more info on the <code>package://</code> url.

Latest revision as of 02:10, 4 January 2025

Syntax

bool HtmlWindow.Active { get; set; }


C# Syntax

HtmlWindow CEF = new HtmlWindow("http://package/index.html");

private void openUI() {
    CEF.Active = true;
    Rage.Ui.Cursor.Visible = true;
}

private void closeUI() {
    CEF.Active = false;
    Rage.Ui.Cursor.Visible = false;
}


See Package Protocol for more info on the package:// url.