You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
UIMenuCheckboxItemuiCheckboxBigMessageManualDispose=newUIMenuCheckboxItem("Manual Dispose",false,"If enabled, you will have to manually dispose the big message");
ScaleformUI.Main.BigMessageInstance.ShowColoredShard("Coloured Shard","Showing the coloured shared",HudColor.HUD_COLOUR_WHITE,HudColor.HUD_COLOUR_FREEMODE,manualDispose:uiCheckboxBigMessageManualDispose.Checked);
ScaleformUI.Main.BigMessageInstance.ShowSimpleShard("Simple Shard","Showing the simple shard",manualDispose:uiCheckboxBigMessageManualDispose.Checked);
break;
case4:
ScaleformUI.Main.BigMessageInstance.ShowRankupMessage("Rank Up","Showing the rank up message",10,manualDispose:uiCheckboxBigMessageManualDispose.Checked);
UIMenuCheckboxItemketchupItem=newUIMenuCheckboxItem("~g~Scrolling animation enabled? ~b~in a very long label to ~o~test the text scrolling feature!",UIMenuCheckboxStyle.Tick,enabled,"Do you wish to enable the scrolling animation?");
UIMenuItemcookItem=newUIMenuItem("Cook! in a very long label to test the text scrolling feature!","Cook the dish with the appropiate ingredients and ketchup.");
UIMenuListItemscrollType=newUIMenuListItem("Choose how this menu will scroll!",newList<dynamic>(){"~r~CLASSIC","~g~PAGINATED","~b~ENDLESS"},(int)exampleMenu.ScrollingType);
exampleMenu.AddItem(scrollType);
scrollType.OnListChanged+=(item,index)=>
{
exampleMenu.ScrollingType=(ScrollingType)index;
};
UIMenuItemcolorItem=newUIMenuItem("UIMenuItem with Colors","~b~Look!!~r~I can be colored ~y~too!!~w~~n~Every item now supports custom colors!",SColor.HUD_Purple,SColor.HUD_Pink);
exampleMenu.AddItem(colorItem);
floatdynamicvalue=0f;
UIMenuDynamicListItemdynamicItem=newUIMenuDynamicListItem("Dynamic List Item","Try pressing ~INPUT_FRONTEND_LEFT~ or ~INPUT_FRONTEND_RIGHT~",dynamicvalue.ToString("F3"),async(sender,direction)=>
UIMenuItemshowSimplePopup=newUIMenuItem("Show PopupWarning example","You can customize it to your needs");
UIMenuItemshowPopupButtons=newUIMenuItem("Show PopupWarning with buttons","It waits until a button has been pressed!");
UIMenuListItemcustomInstr=newUIMenuListItem("SavingNotification",Enum.GetNames(typeof(LoadingSpinnerType)).Cast<dynamic>().ToList(),0,"InstructionalButtons now give you the ability to dynamically edit, add, remove, customize your buttons, you can even use them outside the menu ~y~without having to run multiple instances of the same scaleform~w~, aren't you happy??");
UIMenuItemcustomInstr2=newUIMenuItem("Add a random InstructionalButton!","InstructionalButtons now give you the ability to dynamically edit, add, remove, customize your buttons, you can even use them outside the menu ~y~without having to run multiple instances of the same scaleform~w~, aren't you happy??");
UIMenuListItemnoti1=newUIMenuListItem("Simple Notification",colors,colors.Count-1,"Can be colored too! Change color and / or select this item to show the notification.");
UIMenuListItemnoti2=newUIMenuListItem("Advanced Notification",char_sprites,0,"Change the char and see the notification example! (It can be colored too like the simple notification)");
UIMenuItemnoti3=newUIMenuItem("Help Notification","Insert your text and see the example.");
UIMenuItemnoti4=newUIMenuItem("Floating Help Notification","This is tricky, it's a 3D notification, you'll have to input a Vector3 to show it!");
UIMenuItemnoti5=newUIMenuItem("Stats Notification","This is the notification you see in GTA:O when you improve one of your skills.");
UIMenuItemnoti6=newUIMenuItem("VS Notification","This is the notification you see in GTA:O when you kill someone or get revenge.");
UIMenuItemnoti7=newUIMenuItem("3D Text","This is known a lot.. let's you draw a 3D text in a precise world coordinates.");
UIMenuItemnoti8=newUIMenuItem("Simple Text","This will let you draw a 2D text on screen, you'll have to input the 2D (X, Y) coordinates.");
UIMenuItemResetFiltering=newUIMenuItem("Reset item filters","Select this item to reset any filtering");
ResetFiltering.Activated+=(menu,item)=>
{
menu.ResetFilter();
};
exampleMenu.AddItem(itemFilter);
exampleMenu.AddItem(itemSorter);
exampleMenu.AddItem(ResetFiltering);
#endregion
#region Offset Changer
UIMenuItemoffsetItem=newUIMenuItem("Change Offset","Change the offset of the menu");
offsetItem.SetRightLabel(">>>");
exampleMenu.AddItem(offsetItem);
UIMenuoffsetMenu=newUIMenu("Offset Menu","Change the offset of the menu");
UIMenuListItemalign=newUIMenuListItem("Align Menu",newList<dynamic>(){"Left","Right"},(int)exampleMenu.MenuAlignment,"Aligns the menu Left or Right side while still be dependant to SafeZone and offsets");
align.OnListChanged+=(item,index)=>
{
item.Parent.MenuAlignment=(MenuAlignment)index;
exampleMenu.MenuAlignment=(MenuAlignment)index;
};
UIMenuDynamicListItemoffsetX=newUIMenuDynamicListItem("Offset X","Change the X offset of the menu",exampleMenu.Offset.X.ToString("F3"),async(sender,direction)=>
UIMenuDynamicListItemoffsetY=newUIMenuDynamicListItem("Offset Y","Change the Y offset of the menu",exampleMenu.Offset.Y.ToString("F3"),async(sender,direction)=>
// here you can handle all the events for the mainMenu and its submenus or items themselves.. there's not a real order and if you want you can place these events
// right under the place where their menus/items were declared, i place them here for a creation order.
ScaleformUI.Main.Warning.ShowWarning("This is the title","This is the subtitle","This is the prompt.. you have 6 seconds left","This is the error message, ScaleformUI Ver. 3.0");
awaitDelay(1000);
for(inti=5;i>-1;i--)
{
ScaleformUI.Main.Warning.UpdateWarning("This is the title","This is the subtitle",$"This is the prompt.. you have {i} seconds left","This is the error message, ScaleformUI Ver. 3.0");
newInstructionalButton(Control.FrontendDown,"Accept only with Keyboard",PadCheck.Keyboard),
newInstructionalButton(Control.FrontendY,"Cancel only with GamePad",PadCheck.Controller),
newInstructionalButton(Control.FrontendX,Control.Detonate,"This will change button if you're using gamepad or keyboard"),
newInstructionalButton(newList<Control>{Control.MoveUpOnly,Control.MoveLeftOnly,Control.MoveDownOnly,Control.MoveRightOnly},"Woow multiple buttons at once??"),
ScaleformUI.Main.Warning.ShowWarningWithButtons("This is the title","This is the subtitle","This is the prompt, press any button",buttons,"This is the error message, ScaleformUI Ver. 3.0");
notification=Notifications.ShowNotification("This is a simple notification without color and look how long it is wooow!",true,true);
else
{
switch(_index)
{
case0:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.Gold,true,true);
break;
case1:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.Red,true,true);
break;
case2:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.Rose,true,true);
break;
case3:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.GreenLight,true,true);
break;
case4:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.GreenDark,true,true);
break;
case5:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.Cyan,true,true);
break;
case6:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.Purple,true,true);
break;
case7:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.Yellow,true,true);
break;
case8:
notification=Notifications.ShowNotification("This is a simple colored notification and look how long it is wooow!",NotificationColor.Blue,true,true);
notification=Notifications.ShowAdvancedNotification("This is the title!!","This is the subtitle!","This is the main text!!",selectedChar,selectedChar,HudColor.NONE,SColor.AliceBlue,true,NotificationType.Default,true,true);