Releases: alexguirre/RAGENativeUI
Releases · alexguirre/RAGENativeUI
RAGENativeUI 1.9.3
RAGENativeUI 1.9.2
RAGENativeUI 1.9.1
RAGENativeUI 1.9
Available on NuGet.
Changelog
- Various pause menu enhancements (#141, #144, thanks to @pnwparksfan):
- Improvements to
TabMissionSelectItem
:- Added optional dynamic scaling of mission info area based on screen size and text length in item labels.
- Added dynamic resizing of mission logo texture to support various aspect ratios.
- Refactored
Draw()
function to render correctly as a submenu item. - Updated examples to demonstrate these new capabilities.
- Fixed texture rendering when using
Rage.Graphics
to render outside texture files (texture alignment was previously incorrect).
- Improvements to
TabSubmenuItem
:- Dynamic scrolling when more items are available than fit on the screen.
- Fixed bug that occurs when an interactive menu or mission select menu is focused in a submenu, and the user navigates away using LB/RB.
- Support scrolling through multiple sub-items with acceleration from a single press.
- Improvements to
- Fixed
Sprite.DrawTexture
drawing at incorrect screen positions on multi-monitor setups.
RAGENativeUI 1.8.2
Available on NuGet.
Changelog
- Added support for game version b2545.
- Fixed incorrect mouse input handling in
UIMenuSliderPanel
s. - Improved support for extending
UIMenuPanel
s:- Added
UIMenuPanel.DrawContents()
abstract method andUIMenuPanel.Height
abstract property. - Implemented
UIMenuPanel.Draw()
method, previously abstract. Now a panel only needs to implementDrawContents()
andHeight
, the background is handled byUIMenuPanel
. - Added
UIMenuStatsPanel.IStat
interface.
- Added
RAGENativeUI 1.8.1
Available on NuGet.
Changelog (click to expand)
Features
- Added support for skippable
UIMenuItem
s (#85):- Use
UIMenuItem.Skipped = true;
to make the item skippable. - When a skipped item is selected, the selection will jump to the next non-skipped item. If all items are skipped,
UIMenu.CurrentSelection
will be set to -1.
- Use
- Added support for 'no selection' state in
UIMenu
with items:- When there is no selection, the navigation bar will not be drawn.
UIMenu.CurrentSelection = -1;
indicates this state.- BREAKING CHANGE:
UIMenu.CurrentSelection
no longer wraps around, so code likeCurrentSelection++
/CurrentSelection--
will not wrap around and select the first/last item when it reaches>= MenuItems.Count
/< 0
. Now the value must be -1 or in the range [0, MenuItems.Count), otherwise it throwsArgumentOutOfRangeException
.
- Added
BlipExtensions.GetIconToken
extension method (#133):- Used to get token string needed to display the blip sprite inlined in formatted scaleform text.
- Can be used with
Rage.Blip
andRage.BlipSprite
:Game.DisplayHelp($"Go to ~{myBlip.GetIconToken()}~.");
Game.DisplayHelp($"Go to ~{BlipSprite.Waypoint.GetIconToken()}~.");
- Combine with
HudColor
to change the blip color:Game.DisplayHelp($"Go to ~{HudColor.Red.GetName()}~~{myBlip.GetIconToken()}~~s~.");
Fixes
RAGENativeUI 1.8
Available on NuGet.
Changelog (click to expand)
Features
- Added
Localization
class (#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_name
as the texture dictionary. For example, texture dictionaryembed:prop_bbq_2
and texture namep_v_bbq_2
. - The model needs to be loaded first to be able to access the texture.
embed:model_name
can be used withRAGENativeUI.Elements.Sprite
but the model needs to be loaded by the user. The class assumes that it is always loaded, soSprite.IsTextureDictionaryLoaded
always returns true andSprite.LoadTextureDictionary()
does nothing.
- To access an embedded texture, use
- Added
UIMenuPanel
classes (#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 between0
and1
(from GTA Online character creator).UIMenuStatsPanel
: displays multiple named values (from Los Santos Customs menu).
- Use
UIMenuItem.Panels
to set the panels shown when this item is selected. - Use
UIMenu.PanelsOverride
to set the panels shown always instead of theUIMenuItem.Panels
of the selected item.
- Interactive panels displayed below a
- Added option to disable background postfx in
TabView
with theTabView.PlayBackgroundEffect
property. - Published NuGet package.
Fixes
- Fixed crash when
UIMenuItem.Text
is 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
UIMenuItem
whenTabInteractiveListItem
is unfocused. - Fixed
TabMissionSelectItem
not drawingMissionLogo
s 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
TabSubmenuItem
without items (#122). - Fixed incorrect behaviour of
TabView.Visible
causingTabView.IsAnyPauseMenuVisible
to always return true in some cases (#125).
RAGENativeUI 1.7
Changelog (click to expand)
Features
- UIMenu
- Added
UIMenu.IsAnyMenuVisible
which allows to detect if anyUIMenu
is currently open, including menus from different plugins. - Added
UIMenu.InstructionalButtons
property which returns theInstructionalButtons
instance of theUIMenu
. - 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 invisibleResRectangle
. - 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.BadgeStyle
s:CardSuitClubs
,CardSuitDiamonds
,CardSuitHearts
,CardSuitSpades
,Art
,Blank
(for indenting item contents without drawing a badge) andCustom
(for user createdBadgeInfo
s). - Added
UIMenuScrollerItem
base class withUIMenuListScrollerItem<T>
andUIMenuNumericScrollerItem<T>
derived classes. Replacement forUIMenuListItem
. - Added
UIMenuScrollerSliderBar
class that allows to display aUIMenuScrollerItem
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 andUIMenuCheckboxStyle
enum allowing to display a cross instead of a tick in checkboxes. - Now the setter of
UIMenuItem.RightBadge
property can be used withUIMenuCheckboxItem
s andUIMenuListItem
s.
- Added
- 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.
- Added
- Pause Menu
- Added
TabView.IsAnyPauseMenuVisible
which allows to detect if any pause menuTabView
is currently open, including pause menus from different plugins. - Added
TabView.InstructionalButtons
property which returns theInstructionalButtons
instance of theTabView
. - Added
TabView.PauseGame
property. - Added
TabInteractiveListItem.BackingMenu
property which returns theUIMenu
used internally by the tab item.
- Added
- Instructional Buttons
- Added
InstructionalButtonGroup
that allows displaying multiple buttons in a single slot. - Added
IInstructionalButtonSlot
interface. Implemented byInstructionalButton
andInstructionalButtonGroup
. - Added
IInstructionalButtonSlot.BindedControl
which binds aGameControl
to a slot, allowing the user to click it which simulates pressing the control (InstructionalButtons.MouseButtonsEnabled
needs to be set totrue
). - Added
InstructionalButtonId
struct which wraps the different kind of buttons: from astring
(t_
,T_
orw_
based on length), from aGameControl
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.
- Added
- Misc
- Added
HudColor
enum. - Added
HudColorExtensions
class includingGetName
,GetColor
andSetColor
extension methods forHudColor
. - 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. withMenuPool
,TimerBarPool
orInstructionalButtonsCollection
).
- Added
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
TimerBarPool
s 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
TabView
open. - Fixed
TabSubmenuItem
and its selected childTabItem
receiving input at the same time. - Fixed
TabInteractiveListItem
not properly supporting allUIMenuItem
s. - Fixed drawing position of
TabView.Photo
.
- Fixed background post-fx remaining active when unloading a plugin with a
- Misc
- Fixed
BigMessageHandler.ShowMpMessageLarge
showing a hardcoded string as the subtitle. - Fixed
BigMessageHandler.ShowColoredShard
usingtextColor
andbgColor
parameters incorrectly,textColor
was used as the background color andbgColor
as the text color. - Fixed game recording stopping when opening a menu.
- Fixed
Breaking changes
- UIMenu
- Marked
UIMenu.Title
property as obsolete in favor ofUIMenu.TitleText
. - Marked
UIMenu.Subtitle
property as obsolete in favor ofUIMenu.SubtitleText
. - Removed
UIMenuItem._text
andUIMenuItem._labelText
protected fields in favor ofUIMenuItem.TextStyle
andUIMenuItem.RightLabelTextStyle
. - Removed
UIMenuItem._rectangle
,UIMenuItem._selectedSprite
,UIMenuItem._badgeLeft
andUIMenuItem._badgeRight
protected fields. - Marked
UIMenu.HoldTimeBeforeScroll
as obsolete in favor ofUIMenu.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 toUIMenu.ProcessControl()
. - Marked
UIMenuListItem.HoldTimeBeforeScroll
as 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.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 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.Offset
property as obsolete. - Marked
UIMenuItem.SetLeftBadge(BadgeStyle)
method as obsolete in favor ofUIMenuItem.LeftBadge
public setter. - Marked
UIMenuItem.SetRightBadge(BadgeStyle)
method as obsolete in favor ofUIMenuItem.RightBadge
public setter. - Marked `UIMenuItem.SetRight...
- Marked
RAGENativeUI 1.6.3
Changelog
- Fixed crashes when using the BigMessageHandler class.
RAGENativeUI 1.6.2
Changelog
- Fixed performance issues in game patch v1290.