mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-20 21:07:17 +01:00
Now player_ui will automatically call set_player on the childs of gui_base. Removed the set_player calls from GUI.gd.
This commit is contained in:
parent
a1810628e9
commit
c292704eb2
@ -20,16 +20,3 @@ extends Control
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
export (String) var player_path : String = "../../.."
|
||||
export (Array, NodePath) var child_controls : Array
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
if player_path != null:
|
||||
var player = get_node(player_path)
|
||||
|
||||
for child_path in child_controls:
|
||||
var child = get_node(child_path)
|
||||
|
||||
child.set_player(player)
|
||||
|
||||
|
@ -44,6 +44,10 @@ func _ready():
|
||||
if c.has_method("set_player"):
|
||||
c.set_player(player)
|
||||
|
||||
for c in gui_base.get_children():
|
||||
if c.has_method("set_player"):
|
||||
c.set_player(player)
|
||||
|
||||
func initialize():
|
||||
gui_base = get_node(gui_base_path)
|
||||
buttons = get_node(buttons_path)
|
||||
|
@ -42,7 +42,6 @@ script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_lock_": true
|
||||
}
|
||||
child_controls = [ NodePath("Unitframes"), NodePath("Actionbars"), NodePath("Buttons"), NodePath("Castbar"), NodePath("AuraFrame"), NodePath("IngameMenu/KeybindWindow"), NodePath("IngameMenu/InterfaceOptions") ]
|
||||
|
||||
[node name="Buttons" type="HBoxContainer" parent="GUI"]
|
||||
anchor_top = 1.0
|
||||
|
Loading…
Reference in New Issue
Block a user