46 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
	
		
			1.7 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
| ---
 | |
| --- @author Dylan MALANDAIN
 | |
| --- @version 2.0.0
 | |
| --- @since 2020
 | |
| ---
 | |
| --- RageUI Is Advanced UI Libs in LUA for make beautiful interface like RockStar GAME.
 | |
| ---
 | |
| ---
 | |
| --- Commercial Info.
 | |
| --- Any use for commercial purposes is strictly prohibited and will be punished.
 | |
| ---
 | |
| --- @see RageUI
 | |
| ---
 | |
| 
 | |
| ---@type table
 | |
| local SettingsButton = {
 | |
|     Rectangle = { Y = 0, Width = 431, Height = 29 },
 | |
|     Text = { X = 8, Y = 0, Scale = 0.33 },
 | |
| }
 | |
| 
 | |
| function RageUI.Separator(Label)
 | |
|     local CurrentMenu = RageUI.CurrentMenu
 | |
|     if CurrentMenu ~= nil then
 | |
|         if CurrentMenu() then
 | |
|             local Option = RageUI.Options + 1
 | |
|             if CurrentMenu.Pagination.Minimum <= Option and CurrentMenu.Pagination.Maximum >= Option then
 | |
|                 if (Label ~= nil) then
 | |
|                     RenderText(Label, CurrentMenu.X + SettingsButton.Text.X + (CurrentMenu.WidthOffset * 2.5 ~= 0 and CurrentMenu.WidthOffset * 2.5 or 200), CurrentMenu.Y + SettingsButton.Text.Y + CurrentMenu.SubtitleHeight + RageUI.ItemOffset, 0, SettingsButton.Text.Scale, 245, 245, 245, 255, 1)
 | |
|                 end
 | |
|                 RageUI.ItemOffset = RageUI.ItemOffset + SettingsButton.Rectangle.Height
 | |
|                 if (CurrentMenu.Index == Option) then
 | |
|                     if (RageUI.LastControl) then
 | |
|                         CurrentMenu.Index = Option - 1
 | |
|                         if (CurrentMenu.Index < 1) then
 | |
|                             CurrentMenu.Index = RageUI.CurrentMenu.Options
 | |
|                         end
 | |
|                     else
 | |
|                         CurrentMenu.Index = Option + 1
 | |
|                     end
 | |
|                 end
 | |
|             end
 | |
|             RageUI.Options = RageUI.Options + 1
 | |
|         end
 | |
|     end
 | |
| end
 | |
| 
 | 
