feat: basic settings menu
This commit is contained in:
		
					parent
					
						
							
								70785c3b35
							
						
					
				
			
			
				commit
				
					
						8e215a6962
					
				
			
		
					 38 changed files with 1308 additions and 51 deletions
				
			
		
							
								
								
									
										21
									
								
								src/UI/buttons/container_selection_button.gd
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								src/UI/buttons/container_selection_button.gd
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| class_name ContainerSelectionButton extends MarginContainer | ||||
| 
 | ||||
| @export var button: Button | ||||
| @export var container_box: ContainerBox | ||||
| 
 | ||||
| var button_index: int | ||||
| 
 | ||||
| # Called when the node enters the scene tree for the first time. | ||||
| func _ready() -> void: | ||||
| 	pass | ||||
| 
 | ||||
| 
 | ||||
| func _enter_tree() -> void: | ||||
| 	var text: String = "Collection %d" % container_box.container_id | ||||
| 	button_index = container_box.container_id | ||||
| 	button.text = text | ||||
| 	 | ||||
| ## Request to change to a panel with the ID - 1 of the button. [br] | ||||
| ## Buttons are 1-indexed, while [member UIManager.panel_array] is 0-index | ||||
| func _on_button_pressed() -> void: | ||||
| 	SignalBus.on_panel_requested.emit(button_index-1) | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue