Skip to content

RAGENativeUI 1.7

Compare
Choose a tag to compare
@alexguirre alexguirre released this 12 Aug 22:14
· 155 commits to master since this release
Changelog (click to expand)

Features

  • UIMenu
    • Added UIMenu.IsAnyMenuVisible which allows to detect if any UIMenu is currently open, including menus from different plugins.
    • Added UIMenu.InstructionalButtons property which returns the InstructionalButtons instance of the UIMenu.
    • Added UIMenu.InstructionalButtonsEnabled property.
    • Added UIMenu.DescriptionOverride property.
    • Added UIMenu.OnMenuOpen event.
    • Added UIMenu.Width property.
    • Added public setter to UIMenu.WidthOffset property.
    • Added UIMenu.AdjustedWidth property.
    • Added UIMenu.Offset property.
    • Added UIMenu.RemoveBanner() method for having banner-less menus, alternative to setting the banner to an invisible ResRectangle.
    • Make more UIMenu methods virtual: UIMenu.DrawBanner(Rage.Graphics), UIMenu.Draw(), UIMenu.GoUp(), UIMenu.GoDown(), UIMenu.GoLeft(), UIMenu.GoRight(), UIMenu.SelectItem(), UIMenu.GoBack(), UIMenu.ProcessMouse(), UIMenu.ProcessControl().
    • Added UIMenu.OpenChildMenu(UIMenuItem) method.
    • Added UIMenu.Close(bool) method.
    • Added UIMenu.SetKeyAcceleration(Common.MenuControls, AccelerationStep[]) method.
    • Added UIMenu.MaxItemsOnScreen property.
    • Added UIMenu.FirstItemOnScreen/LastItemOnScreen properties.
    • Added UIMenu.TitleText property.
    • Added UIMenu.TitleStyle property.
    • Added UIMenu.SubtitleText property.
    • Added UIMenu.SubtitleStyle property.
    • Added UIMenu.SubtitleBackgroundColor property.
    • Added UIMenu.CounterStyle property.
    • Added UIMenu.DescriptionStyle property.
    • Added UIMenu.DescriptionSeparatorColor property.
    • Added UIMenu.UpDownArrowsBackgroundColor property.
    • Added UIMenu.UpDownArrowsHighlightColor property.
    • Added UIMenu.UpDownArrowsForegroundColor property.
    • Added UIMenu.AddItems(IEnumerable<UIMenuItem>)/AddItems(params UIMenuItem[]) allowing to add multiple items at once.
    • Added UIMenuItem.DisabledForeColor property.
    • Added UIMenuItem.CurrentForeColor property.
    • Added UIMenuItem.Activate(UIMenu) method to allow activating an item from user code.
    • Added UIMenuItem.Draw(float, float, float, float) method.
    • Added UIMenuItem.OnInput(UIMenu, Common.MenuControls) method that handles input events from the parent menu when selected.
    • Added UIMenuItem.OnMouseInput(UIMenu, RectangleF, PointF, MouseInput) method that handles mouse input events from the parent menu when selected.
    • Added UIMenuItem.TextStyle property.
    • Added public setter to UIMenuItem.RightLabel property.
    • Added UIMenuItem.RightLabelStyle property.
    • Added public setter to UIMenuItem.LeftBadge property.
    • Added public setter to UIMenuItem.RightBadge property.
    • Added UIMenuItem.BadgeInfo class that allows to create custom badges.
    • Added UIMenuItem.LeftBadgeInfo property.
    • Added UIMenuItem.RightBadgeInfo property.
    • Added new UIMenuItem.BadgeStyles: CardSuitClubs, CardSuitDiamonds, CardSuitHearts, CardSuitSpades, Art, Blank (for indenting item contents without drawing a badge) and Custom (for user created BadgeInfos).
    • Added UIMenuScrollerItem base class with UIMenuListScrollerItem<T> and UIMenuNumericScrollerItem<T> derived classes. Replacement for UIMenuListItem.
    • Added UIMenuScrollerSliderBar class that allows to display a UIMenuScrollerItem with a slider bar instead of left/right arrows.
    • Added UIMenuCheckboxItem.Toggle(UIMenu) method to allow toggling a checkbox from user code.
    • Added UIMenuCheckboxItem.Style property and UIMenuCheckboxStyle enum allowing to display a cross instead of a tick in checkboxes.
    • Now the setter of UIMenuItem.RightBadge property can be used with UIMenuCheckboxItems and UIMenuListItems.
  • Timer Bars
    • Added TimerBarBase.LabelStyle property.
    • Added TimerBarBase.LabelOffset property.
    • Added TimerBarBase.Highlight property.
    • Added TimerBarBase.Accent property.
    • Added TextTimerBar.TextStyle property.
    • Added TextTimerBar.TextOffset property.
    • Added BarTimerBar.Markers property.
    • Added IconsTimerBar class. A timer bar that displays a list of icons.
    • Added CheckpointsTimerBar class. A timer bar that displays a list of checkpoints.
  • Pause Menu
    • Added TabView.IsAnyPauseMenuVisible which allows to detect if any pause menu TabView is currently open, including pause menus from different plugins.
    • Added TabView.InstructionalButtons property which returns the InstructionalButtons instance of the TabView.
    • Added TabView.PauseGame property.
    • Added TabInteractiveListItem.BackingMenu property which returns the UIMenu used internally by the tab item.
  • Instructional Buttons
    • Added InstructionalButtonGroup that allows displaying multiple buttons in a single slot.
    • Added IInstructionalButtonSlot interface. Implemented by InstructionalButton and InstructionalButtonGroup.
    • Added IInstructionalButtonSlot.BindedControl which binds a GameControl to a slot, allowing the user to click it which simulates pressing the control (InstructionalButtons.MouseButtonsEnabled needs to be set to true).
    • Added InstructionalButtonId struct which wraps the different kind of buttons: from a string (t_, T_ or w_ based on length), from a GameControl and from a raw button ID (b_).
    • Added InstructionalButtons.BackgroundColor property.
    • Added InstructionalButtons.MaxWidth property.
    • Added InstructionalButtons.MouseButtonsEnabled property.
    • Added support for displaying arbitrary key icons in help prompts.
  • Misc
    • Added HudColor enum.
    • Added HudColorExtensions class including GetName, GetColor and SetColor extension methods for HudColor.
    • Added TextStyle structure.
    • Added TextFont enum.
    • Added TextJustification enum.
    • Added an overload to BigMessageHandler.ShowMpMessageLarge that allows to specify the subtitle string.
    • Added BaseCollection<T>.Add(params T[])/AddRange(IEnumerable<T>) allowing to add multiple items at once (e.g. with MenuPool, TimerBarPool or InstructionalButtonsCollection).

Fixes

  • UIMenu
    • Improved performance.
    • Fixed UIMenu display issues in large resolution setups.
    • Fixed crashes when UIMenu has no items.
    • Fixed slight flicker when changing menus (i.e. opening a child menu or going back to the parent menu).
  • Timer Bars
    • Fixed timer bars from different TimerBarPools overlapping, including timer bars from different plugins.
    • Fixed timer bars overlapping the game native timer bars.
  • Pause Menu
    • Fixed background post-fx remaining active when unloading a plugin with a TabView open.
    • Fixed TabSubmenuItem and its selected child TabItem receiving input at the same time.
    • Fixed TabInteractiveListItem not properly supporting all UIMenuItems.
    • Fixed drawing position of TabView.Photo.
  • Misc
    • Fixed BigMessageHandler.ShowMpMessageLarge showing a hardcoded string as the subtitle.
    • Fixed BigMessageHandler.ShowColoredShard using textColor and bgColor parameters incorrectly, textColor was used as the background color and bgColor as the text color.
    • Fixed game recording stopping when opening a menu.

Breaking changes

  • UIMenu
    • Marked UIMenu.Title property as obsolete in favor of UIMenu.TitleText.
    • Marked UIMenu.Subtitle property as obsolete in favor of UIMenu.SubtitleText.
    • Removed UIMenuItem._text and UIMenuItem._labelText protected fields in favor of UIMenuItem.TextStyle and UIMenuItem.RightLabelTextStyle.
    • Removed UIMenuItem._rectangle, UIMenuItem._selectedSprite, UIMenuItem._badgeLeft and UIMenuItem._badgeRight protected fields.
    • Marked UIMenu.HoldTimeBeforeScroll as obsolete in favor of UIMenu.SetKeyAcceleration().
    • Marked UIMenu.IsControlBeingPressed method as obsolete.
    • Marked UIMenu.HasControlJustBeenPressed method as obsolete.
    • Marked UIMenu.HasControlJustBeenReleased method as obsolete.
    • Removed UIMenu.SetKey(Common.MenuControls, Keys) overload.
    • Removed MenuPool.SetKey(Common.MenuControls, Keys) overload.
    • Removed UIMenu.ProcessKey.
    • Removed MenuPool.ProcessKey.
    • Changed UIMenu.ProcessControl(Keys) signature to UIMenu.ProcessControl().
    • Marked UIMenuListItem.HoldTimeBeforeScroll as obsolete in favor of using UIMenu.SetKeyAcceleration() on the parent menu when selecting the item.
    • Marked UIMenu.SetMenuWidthOffset(int) method as obsolete in favor of the UIMenu.WidthOffset setter.
    • Marked UIMenu.IsMouseInBounds(Point, Size) method as obsolete.
    • Marked UIMenu.IsMouseInListItemArrows(UIMenuListItem, Point, Point) method as obsolete.
    • Marked UIMenu.GoUpOverflow() method as obsolete in favor of UIMenu.GoUp().
    • Marked UIMenu.GoDownOverflow() method as obsolete in favor of UIMenu.GoDown().
    • Marked UIMenuItem.SetVerticalPosition(int) method as obsolete.
    • Marked UIMenuItem.Draw() method as obsolete.
    • Marked UIMenuItem.Offset property as obsolete.
    • Marked UIMenuItem.SetLeftBadge(BadgeStyle) method as obsolete in favor of UIMenuItem.LeftBadge public setter.
    • Marked UIMenuItem.SetRightBadge(BadgeStyle) method as obsolete in favor of UIMenuItem.RightBadge public setter.
    • Marked UIMenuItem.SetRightLabel(string) method as obsolete in favor of UIMenuItem.RightLabel public setter.
  • Instructional Buttons
    • InstructionalButtonsCollection now derives from BaseCollection<IInstructionalButtonSlot> instead of BaseCollection<InstructionalButton>
    • Removed InstructionalButton.ButtonText/ButtonControl properties in favor of InstructionalButton.Button.
  • Misc
    • Updated to .NET Framework v4.7.2 and C# 8.0.
    • Marked StringMeasurer class as obsolete.
    • Removed RAGENativeUI.Elements.HudColor enum in favor of RAGENativeUI.HudColor.