public override void _Ready() { _margin = GetNode <MarginContainer>("MarginContainer"); _vBox = _margin.GetNode <VBoxContainer>("VBoxContainer"); _topHBox = _vBox.GetNode <HBoxContainer>("Top"); _nameMargin = _topHBox.GetNode <MarginContainer>("NameMargin"); _nameLabelMargin = _nameMargin.GetNode <MarginContainer>("NameLabelMargin"); _nameLabel = _nameLabelMargin.GetNode <Label>("Name"); _secondRowHBox = _vBox.GetNode <HBoxContainer>("SecondRow"); _itemMargin = _secondRowHBox.GetNode <MarginContainer>("ItemMargin"); _iconMargin = _itemMargin.GetNode <MarginContainer>("IconMargin"); _itemIcon = _iconMargin.GetNode <TextureRect>("ItemIcon"); _buttonMargin = _secondRowHBox.GetNode <MarginContainer>("ButtonMargin"); _equipButton = _buttonMargin.GetNode <TextureButton>("Equip"); _useButton = _buttonMargin.GetNode <TextureButton>("Use"); _damageValues = _vBox.GetNode <HBoxContainer>("DamageValues"); _quickVBox = _damageValues.GetNode <VBoxContainer>("Quick"); _quickDamageLabel = _quickVBox.GetNode <Label>("DamageValue"); _quickIconVBox = _quickVBox.GetNode <VBoxContainer>("IconVBoxContainer"); _quickTypeIcon = _quickIconVBox.GetNode <TextureRect>("TypeIcon"); _quickStatusIcon = _quickIconVBox.GetNode <TextureRect>("StatusIcon"); _quickStatusEffectChanceLabel = _quickIconVBox.GetNode <Label>("StatusEffectChance"); _heavyVBox = _damageValues.GetNode <VBoxContainer>("Heavy"); _heavyDamageLabel = _heavyVBox.GetNode <Label>("DamageValue"); _heavyIconVBox = _heavyVBox.GetNode <VBoxContainer>("IconVBoxContainer"); _heavyTypeIcon = _heavyIconVBox.GetNode <TextureRect>("TypeIcon"); _heavyStatusIcon = _heavyIconVBox.GetNode <TextureRect>("StatusIcon"); _heavyStatusEffectChanceLabel = _heavyIconVBox.GetNode <Label>("StatusEffectChance"); _counterVBox = _damageValues.GetNode <VBoxContainer>("Counter"); _counterDamageLabel = _counterVBox.GetNode <Label>("DamageValue"); _counterIconVBox = _counterVBox.GetNode <VBoxContainer>("IconVBoxContainer"); _counterTypeIcon = _counterIconVBox.GetNode <TextureRect>("TypeIcon"); _counterStatusIcon = _counterIconVBox.GetNode <TextureRect>("StatusIcon"); _counterStatusEffectChanceLabel = _counterIconVBox.GetNode <Label>("StatusEffectChance"); _healthGainedHBox = _vBox.GetNode <HBoxContainer>("HealthGainedHBox"); _healthGainedValueLabel = _healthGainedHBox.GetNode <Label>("HealthGainedValueLabel"); _confirmUsePopup = _margin.GetNode <MarginContainer>("ConfirmUsePopup"); _backButton = GetNode <TextureButton>("MarginContainer/VBoxContainer/Top/Back"); _yesButton = GetNode <TextureButton>( "MarginContainer/ConfirmUsePopup/TextMargin/VBoxContainer/HBoxContainer/Yes"); _noButton = GetNode <TextureButton>( "MarginContainer/ConfirmUsePopup/TextMargin/VBoxContainer/HBoxContainer/No"); _confirmUsePopup.Visible = false; }
public override void _Ready() { SlotButtonScene = GD.Load <PackedScene>("res://UI/Menu/HostMenu/SlotButton.tscn"); LabelPieceScene = GD.Load <PackedScene>("res://UI/Menu/Pieces/LabelPiece.tscn"); SelectedSaveLabel = GetNode <Label>("SelectedSave"); ResetSelectedSave(); RenameToolbar = GetNode <HBoxContainer>("RenameToolbar"); RenameEdit = RenameToolbar.GetNode <LineEdit>("NameLineEdit"); RenameToolbar.Hide(); CreateToolbar = GetNode <HBoxContainer>("CreateToolbar"); CreateEdit = CreateToolbar.GetNode <LineEdit>("NameLineEdit"); CreateToolbar.Hide(); DeleteToolbar = GetNode <HBoxContainer>("DeleteToolbar"); DeleteMessage = DeleteToolbar.GetNode <Label>("Label"); DeleteToolbar.Hide(); ToolbarScrollSeperator = GetNode <Label>("ToolbarScrollSeperator"); ToolbarScrollSeperator.Hide(); SlotsVBox = GetNode <VBoxContainer>("SlotsScroll/SlotsVBox"); ResetSlotsVBox(); }
public override void _Ready() { _tween = GetNode <Tween>("Tween"); _popupDisappearDelayTimer = GetNode <Timer>("PopupDisappearDelay"); _background = GetNode <TextureRect>("Background"); _textMargin = GetNode <MarginContainer>("TextMargin"); _textVBox = _textMargin.GetNode <VBoxContainer>("VBoxContainer"); _itemNameLabel = _textVBox.GetNode <Label>("Name"); _damageMargin = _textVBox.GetNode <MarginContainer>("DamageMargin"); _damageValuesHBox = _damageMargin.GetNode <HBoxContainer>("DamageValues"); _quickDamageLabel = _damageValuesHBox.GetNode <Label>("QuickDamage"); _heavyDamageLabel = _damageValuesHBox.GetNode <Label>("HeavyDamage"); _counterDamageLabel = _damageValuesHBox.GetNode <Label>("CounterDamage"); _healthGainedMargin = _textVBox.GetNode <MarginContainer>("HealthGainedMargin"); _healthGainedLabel = _healthGainedMargin.GetNode <Label>("HealthGained"); }
public override void _Ready() { if (instance == null) { instance = this; } else { instance.Dispose(); instance = this; } if (Vars.PersistentData.isMobile) { RectPosition = new Vector2(9, 0); } content = GetNode("MarginContainer").GetNode <VBoxContainer>("Content"); messageScrollerBox = content.GetNode <ScrollContainer>("Messages"); messageBox = messageScrollerBox.GetNode <VBoxContainer>("MessageContainer"); senderBox = content.GetNode <HBoxContainer>("Sender"); chatMessage = messageBox.GetNode <RichTextLabel>("ChatMessage"); button = senderBox.GetNode <Button>("Button"); _lineEdit = senderBox.GetNode <LineEdit>("LineEdit"); _lineEdit.Connect("focus_entered", this, "_onSenderBoxFocusEnter"); _lineEdit.Connect("focus_exited", this, "_onFocusLost"); _lineEdit.Connect("text_changed", this, "_onTextChanged"); _lineEdit.custom_behaviour = true; rnd = new RandomNumberGenerator(); chatMessage.Visible = false; senderBox.Modulate = new Color(0, 0, 0, 0); button.Connect("pressed", this, "SendPressed"); messageScrollerBox.GetVScrollbar().Modulate = new Color(0, 0, 0, 0); }
public override void _Ready() { base._Ready(); connect_button = content.GetNode <Button>("ConnectButton"); userbox = content.GetNode <HBoxContainer>("UsernameBox"); ipbox = content.GetNode <HBoxContainer>("IpBox"); username_field = userbox.GetNode <LineEdit>("LineEdit"); username_field.Text = Vars.PersistentData.username; ip_field = ipbox.GetNode <LineEdit>("LineEdit"); username_field.Connect("text_changed", this, "_onUsernameFieldTextChange"); ip_field.Connect("text_changed", this, "_onIpFieldTextChange"); connect_button.Connect("pressed", this, "_onConnectButtonPress"); Vars.PersistentData.ip = ip_field.Text; }
public void GenerateGameSettingsList() { var gameVBox = GameTab.GetNode <VBoxContainer>("ScrollContainer/VBox"); }