ed
This commit is contained in:
		
							parent
							
								
									600d79af31
								
							
						
					
					
						commit
						5d11084641
					
				
					 136 changed files with 12007 additions and 584 deletions
				
			
		
							
								
								
									
										33
									
								
								resources/[freizeit]/[gym]/ps-ui/client/status.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								resources/[freizeit]/[gym]/ps-ui/client/status.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| --- Shows the status bar with the given details. | ||||
| --- @param title string: Title to display on the status bar. | ||||
| --- @param description string: Description to display on the status bar. | ||||
| --- @param icon string: Icon to display on the status bar. | ||||
| --- @param values table: List of items to display in the status bar. Each item is typically a table with `key` and `value` fields. | ||||
| local function statusShow(title, description, icon, values) | ||||
|     DebugPrint("StatusBar called with " .. title .. " title, " .. description .. " description, " .. icon .. " icon, and " .. json.encode(values) .. " values") | ||||
|     SendNUI("ShowStatusBar", nil, { | ||||
|         title = title, | ||||
|         description = description, | ||||
|         icon = icon, | ||||
|         items = values, | ||||
|     }, false) | ||||
| end | ||||
| --- Hides the status bar. | ||||
| local function statusHide() | ||||
|     SendNUI("HideStatusBar", nil, {}, false) | ||||
| end | ||||
|  | ||||
| --- Updates the status bar with new information. | ||||
| --- @param title string: Title to display on the status bar. | ||||
| --- @param values table: List of items to display in the status bar. Each item is typically a table with `key` and `value` fields. | ||||
| local function statusUpdate(title, values) | ||||
|     SendNUI("updateStatusBar", nil, { | ||||
|         update = true, | ||||
|         title = title, | ||||
|         values = values, | ||||
|     }, false) | ||||
| end | ||||
|  | ||||
| exports("StatusShow", statusShow) | ||||
| exports("StatusHide", statusHide) | ||||
| exports("StatusUpdate", statusUpdate) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nordi98
						Nordi98