Disabled spell learning for the ui aswell.

This commit is contained in:
Relintai 2020-02-21 14:20:16 +01:00
parent c34a194c82
commit a729c93dac
3 changed files with 21 additions and 20 deletions

View File

@ -154,13 +154,14 @@ size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Button2" type="Button" parent="PagedContent/Controls/HBoxContainer"]
margin_right = 288.0
margin_right = 434.0
margin_bottom = 26.269
size_flags_horizontal = 3
size_flags_vertical = 3
text = "< Previous page"
[node name="SpellPoints" type="Label" parent="PagedContent/Controls/HBoxContainer"]
visible = false
margin_left = 292.0
margin_top = 5.0
margin_right = 580.0
@ -170,7 +171,7 @@ align = 1
valign = 1
[node name="Button" type="Button" parent="PagedContent/Controls/HBoxContainer"]
margin_left = 584.0
margin_left = 438.0
margin_right = 872.0
margin_bottom = 26.269
size_flags_horizontal = 3

View File

@ -107,8 +107,8 @@ func spell_button_pressed() -> void:
func update_spell_indicators():
if _spell_known:
get_node(known_label_path).show()
get_node(learn_button_path).hide()
# get_node(known_label_path).show()
# get_node(learn_button_path).hide()
modulate = known_color
else:
@ -116,15 +116,15 @@ func update_spell_indicators():
if _spell.training_required_spell:
if not _player.hasc_spell(_spell.training_required_spell):
get_node(known_label_path).hide()
get_node(learn_button_path).show()
# get_node(known_label_path).hide()
# get_node(learn_button_path).show()
modulate = unlearnable_color
return
get_node(known_label_path).hide()
get_node(learn_button_path).show()
# get_node(known_label_path).hide()
# get_node(learn_button_path).show()
modulate = not_known_color

View File

@ -101,7 +101,7 @@ margin_bottom = 26.0
[node name="Label" type="Label" parent="SpellEntryPopup/VBoxContainer/HBoxContainer"]
margin_top = 5.0
margin_right = 250.0
margin_right = 254.0
margin_bottom = 20.0
size_flags_horizontal = 3
@ -115,32 +115,32 @@ text = "X"
[node name="HSeparator2" type="HSeparator" parent="SpellEntryPopup/VBoxContainer"]
margin_top = 34.0
margin_right = 288.0
margin_bottom = 42.0
margin_bottom = 38.0
[node name="PanelContainer" type="PanelContainer" parent="SpellEntryPopup/VBoxContainer"]
visible = false
margin_top = 50.0
margin_right = 296.0
margin_bottom = 80.0
margin_top = 46.0
margin_right = 288.0
margin_bottom = 66.0
rect_min_size = Vector2( 0, 20 )
[node name="KnownLabel" type="Label" parent="SpellEntryPopup/VBoxContainer/PanelContainer"]
margin_left = 4.0
margin_top = 7.0
margin_right = 292.0
margin_bottom = 22.0
margin_top = 2.0
margin_right = 288.0
margin_bottom = 17.0
text = "Known"
align = 1
valign = 1
[node name="LearnButton" type="Button" parent="SpellEntryPopup/VBoxContainer"]
margin_top = 50.0
visible = false
margin_top = 46.0
margin_right = 288.0
margin_bottom = 76.269
margin_bottom = 72.269
text = "Learn"
[node name="RichTextLabel" type="RichTextLabel" parent="SpellEntryPopup/VBoxContainer"]
margin_top = 84.0
margin_top = 46.0
margin_right = 288.0
margin_bottom = 195.0
size_flags_horizontal = 3