Available on NuGet.
Changelog (click to expand)
Features
- Added
Localizationclass (#100):- Includes various properties/methods related to localization.
- Allows to override or create new text labels with custom strings.
- Added support for accessing textures embedded in fragments (
.yft) or drawables (.ydr) in native functions such asDRAW_SPRITE(#101):- To access an embedded texture, use
embed:model_nameas the texture dictionary. For example, texture dictionaryembed:prop_bbq_2and texture namep_v_bbq_2. - The model needs to be loaded first to be able to access the texture.
embed:model_namecan be used withRAGENativeUI.Elements.Spritebut the model needs to be loaded by the user. The class assumes that it is always loaded, soSprite.IsTextureDictionaryLoadedalways returns true andSprite.LoadTextureDictionary()does nothing.
- To access an embedded texture, use
- Added
UIMenuPanelclasses (#113):- Interactive panels displayed below a
UIMenu, after the description. - Implementations added in this release:
UIMenuGridPanel: grid where the user can choose a 2D point between(0, 0)and(1, 1)(from GTA Online character creator).UIMenuSliderPanel: slider bar where the user can choose a value between0and1(from GTA Online character creator).UIMenuStatsPanel: displays multiple named values (from Los Santos Customs menu).
- Use
UIMenuItem.Panelsto set the panels shown when this item is selected. - Use
UIMenu.PanelsOverrideto set the panels shown always instead of theUIMenuItem.Panelsof the selected item.
- Interactive panels displayed below a
- Added option to disable background postfx in
TabViewwith theTabView.PlayBackgroundEffectproperty. - Published NuGet package.
Fixes
- Fixed crash when
UIMenuItem.Textis null (#96). - Fixed incorrect custom menu banner position when the game is windowed (#97).
- Fixed stretched menus in ultrawide resolutions (#98).
- Fixed incorrect foreground color of selected
UIMenuItemwhenTabInteractiveListItemis unfocused. - Fixed
TabMissionSelectItemnot drawingMissionLogos that use game textures (#108). - Fixed issue in some multiple display setups causing the camera to rotate when opening a menu (#109).
- Fixed crash in
TabSubmenuItemwithout items (#122). - Fixed incorrect behaviour of
TabView.VisiblecausingTabView.IsAnyPauseMenuVisibleto always return true in some cases (#125).
Assets
3
Changelog (click to expand)
Features
- UIMenu
- Added
UIMenu.IsAnyMenuVisiblewhich allows to detect if anyUIMenuis currently open, including menus from different plugins. - Added
UIMenu.InstructionalButtonsproperty which returns theInstructionalButtonsinstance of theUIMenu. - Added
UIMenu.InstructionalButtonsEnabledproperty. - Added
UIMenu.DescriptionOverrideproperty. - Added
UIMenu.OnMenuOpenevent. - Added
UIMenu.Widthproperty. - Added public setter to
UIMenu.WidthOffsetproperty. - Added
UIMenu.AdjustedWidthproperty. - Added
UIMenu.Offsetproperty. - Added
UIMenu.RemoveBanner()method for having banner-less menus, alternative to setting the banner to an invisibleResRectangle. - Make more
UIMenumethods 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.MaxItemsOnScreenproperty. - Added
UIMenu.FirstItemOnScreen/LastItemOnScreenproperties. - Added
UIMenu.TitleTextproperty. - Added
UIMenu.TitleStyleproperty. - Added
UIMenu.SubtitleTextproperty. - Added
UIMenu.SubtitleStyleproperty. - Added
UIMenu.SubtitleBackgroundColorproperty. - Added
UIMenu.CounterStyleproperty. - Added
UIMenu.DescriptionStyleproperty. - Added
UIMenu.DescriptionSeparatorColorproperty. - Added
UIMenu.UpDownArrowsBackgroundColorproperty. - Added
UIMenu.UpDownArrowsHighlightColorproperty. - Added
UIMenu.UpDownArrowsForegroundColorproperty. - Added
UIMenu.AddItems(IEnumerable<UIMenuItem>)/AddItems(params UIMenuItem[])allowing to add multiple items at once. - Added
UIMenuItem.DisabledForeColorproperty. - Added
UIMenuItem.CurrentForeColorproperty. - 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.TextStyleproperty. - Added public setter to
UIMenuItem.RightLabelproperty. - Added
UIMenuItem.RightLabelStyleproperty. - Added public setter to
UIMenuItem.LeftBadgeproperty. - Added public setter to
UIMenuItem.RightBadgeproperty. - Added
UIMenuItem.BadgeInfoclass that allows to create custom badges. - Added
UIMenuItem.LeftBadgeInfoproperty. - Added
UIMenuItem.RightBadgeInfoproperty. - Added new
UIMenuItem.BadgeStyles:CardSuitClubs,CardSuitDiamonds,CardSuitHearts,CardSuitSpades,Art,Blank(for indenting item contents without drawing a badge) andCustom(for user createdBadgeInfos). - Added
UIMenuScrollerItembase class withUIMenuListScrollerItem<T>andUIMenuNumericScrollerItem<T>derived classes. Replacement forUIMenuListItem. - Added
UIMenuScrollerSliderBarclass that allows to display aUIMenuScrollerItemwith a slider bar instead of left/right arrows. - Added
UIMenuCheckboxItem.Toggle(UIMenu)method to allow toggling a checkbox from user code. - Added
UIMenuCheckboxItem.Styleproperty andUIMenuCheckboxStyleenum allowing to display a cross instead of a tick in checkboxes. - Now the setter of
UIMenuItem.RightBadgeproperty can be used withUIMenuCheckboxItems andUIMenuListItems.
- Added
- Timer Bars
- Added
TimerBarBase.LabelStyleproperty. - Added
TimerBarBase.LabelOffsetproperty. - Added
TimerBarBase.Highlightproperty. - Added
TimerBarBase.Accentproperty. - Added
TextTimerBar.TextStyleproperty. - Added
TextTimerBar.TextOffsetproperty. - Added
BarTimerBar.Markersproperty. - Added
IconsTimerBarclass. A timer bar that displays a list of icons. - Added
CheckpointsTimerBarclass. A timer bar that displays a list of checkpoints.
- Added
- Pause Menu
- Added
TabView.IsAnyPauseMenuVisiblewhich allows to detect if any pause menuTabViewis currently open, including pause menus from different plugins. - Added
TabView.InstructionalButtonsproperty which returns theInstructionalButtonsinstance of theTabView. - Added
TabView.PauseGameproperty. - Added
TabInteractiveListItem.BackingMenuproperty which returns theUIMenuused internally by the tab item.
- Added
- Instructional Buttons
- Added
InstructionalButtonGroupthat allows displaying multiple buttons in a single slot. - Added
IInstructionalButtonSlotinterface. Implemented byInstructionalButtonandInstructionalButtonGroup. - Added
IInstructionalButtonSlot.BindedControlwhich binds aGameControlto a slot, allowing the user to click it which simulates pressing the control (InstructionalButtons.MouseButtonsEnabledneeds to be set totrue). - Added
InstructionalButtonIdstruct which wraps the different kind of buttons: from astring(t_,T_orw_based on length), from aGameControland from a raw button ID (b_). - Added
InstructionalButtons.BackgroundColorproperty. - Added
InstructionalButtons.MaxWidthproperty. - Added
InstructionalButtons.MouseButtonsEnabledproperty. - Added support for displaying arbitrary key icons in help prompts.
- Added
- Misc
- Added
HudColorenum. - Added
HudColorExtensionsclass includingGetName,GetColorandSetColorextension methods forHudColor. - Added
TextStylestructure. - Added
TextFontenum. - Added
TextJustificationenum. - Added an overload to
BigMessageHandler.ShowMpMessageLargethat allows to specify the subtitle string. - Added
BaseCollection<T>.Add(params T[])/AddRange(IEnumerable<T>)allowing to add multiple items at once (e.g. withMenuPool,TimerBarPoolorInstructionalButtonsCollection).
- Added
Fixes
- UIMenu
- Improved performance.
- Fixed
UIMenudisplay issues in large resolution setups. - Fixed crashes when
UIMenuhas 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.
- Fixed timer bars from different
- Pause Menu
- Fixed background post-fx remaining active when unloading a plugin with a
TabViewopen. - Fixed
TabSubmenuItemand its selected childTabItemreceiving input at the same time. - Fixed
TabInteractiveListItemnot properly supporting allUIMenuItems. - Fixed drawing position of
TabView.Photo.
- Fixed background post-fx remaining active when unloading a plugin with a
- Misc
- Fixed
BigMessageHandler.ShowMpMessageLargeshowing a hardcoded string as the subtitle. - Fixed
BigMessageHandler.ShowColoredShardusingtextColorandbgColorparameters incorrectly,textColorwas used as the background color andbgColoras the text color. - Fixed game recording stopping when opening a menu.
- Fixed
Breaking changes
- UIMenu
- Marked
UIMenu.Titleproperty as obsolete in favor ofUIMenu.TitleText. - Marked
UIMenu.Subtitleproperty as obsolete in favor ofUIMenu.SubtitleText. - Removed
UIMenuItem._textandUIMenuItem._labelTextprotected fields in favor ofUIMenuItem.TextStyleandUIMenuItem.RightLabelTextStyle. - Removed
UIMenuItem._rectangle,UIMenuItem._selectedSprite,UIMenuItem._badgeLeftandUIMenuItem._badgeRightprotected fields. - Marked
UIMenu.HoldTimeBeforeScrollas obsolete in favor ofUIMenu.SetKeyAcceleration(). - Marked
UIMenu.IsControlBeingPressedmethod as obsolete. - Marked
UIMenu.HasControlJustBeenPressedmethod as obsolete. - Marked
UIMenu.HasControlJustBeenReleasedmethod 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 toUIMenu.ProcessControl(). - Marked
UIMenuListItem.HoldTimeBeforeScrollas obsolete in favor of usingUIMenu.SetKeyAcceleration()on the parent menu when selecting the item. - Marked
UIMenu.SetMenuWidthOffset(int)method as obsolete in favor of theUIMenu.WidthOffsetsetter. - 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 ofUIMenu.GoUp(). - Marked
UIMenu.GoDownOverflow()method as obsolete in favor ofUIMenu.GoDown(). - Marked
UIMenuItem.SetVerticalPosition(int)method as obsolete. - Marked
UIMenuItem.Draw()method as obsolete. - Marked
UIMenuItem.Offsetproperty as obsolete. - Marked
UIMenuItem.SetLeftBadge(BadgeStyle)method as obsolete in favor ofUIMenuItem.LeftBadgepublic setter. - Marked
UIMenuItem.SetRightBadge(BadgeStyle)method as obsolete in favor ofUIMenuItem.RightBadgepublic setter. - Marked
UIMenuItem.SetRightLabel(string)method as obsolete in favor ofUIMenuItem.RightLabelpublic setter.
- Marked
- Instructional Buttons
InstructionalButtonsCollectionnow derives fromBaseCollection<IInstructionalButtonSlot>instead ofBaseCollection<InstructionalButton>- Removed
InstructionalButton.ButtonText/ButtonControlproperties in favor ofInstructionalButton.Button.
- Misc
- Updated to .NET Framework v4.7.2 and C# 8.0.
- Marked
StringMeasurerclass as obsolete. - Removed
RAGENativeUI.Elements.HudColorenum in favor ofRAGENativeUI.HudColor.
Assets
3
PreviousNext