Skip to content

@alexguirre alexguirre released this Aug 1, 2021

Available on NuGet.

Changelog (click to expand)

Features

  • Added support for skippable UIMenuItems (#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.
  • 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 like CurrentSelection++/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 throws ArgumentOutOfRangeException.
  • 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 and Rage.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

  • Fixed Localization.DoesTextExist/GetText not working correctly in b2372 (#130).
  • Fixed timer bars overlapping the instructional buttons in b2372 (#129).
  • Fixed incorrect item colors in TabInteractiveListItem when an item is selected but its tab is not focused (#127).
2 people reacted
Assets 3
Jul 30, 2021
Bump version to 1.8.1

@alexguirre alexguirre released this Jun 27, 2021

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 as DRAW_SPRITE (#101):
    • To access an embedded texture, use embed:model_name as the texture dictionary. For example, texture dictionary embed:prop_bbq_2 and texture name p_v_bbq_2.
    • The model needs to be loaded first to be able to access the texture.
    • embed:model_name can be used with RAGENativeUI.Elements.Sprite but the model needs to be loaded by the user. The class assumes that it is always loaded, so Sprite.IsTextureDictionaryLoaded always returns true and Sprite.LoadTextureDictionary() does nothing.
  • 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 between 0 and 1 (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 the UIMenuItem.Panels of the selected item.
  • Added option to disable background postfx in TabView with the TabView.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 when TabInteractiveListItem is unfocused.
  • Fixed TabMissionSelectItem not drawing MissionLogos 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 causing TabView.IsAnyPauseMenuVisible to always return true in some cases (#125).
2 people reacted
Assets 3