Compare commits
2 Commits
bd5b734d79
...
main
Author | SHA1 | Date | |
---|---|---|---|
1a5372f713 | |||
c125d1b70a |
@ -19,25 +19,9 @@ func _set_tip_text(card_info: Dictionary, _card_image: Image) -> void:
|
|||||||
text = "[b]" + card_info["name"] + "[/b]\t"
|
text = "[b]" + card_info["name"] + "[/b]\t"
|
||||||
text += _convert_text_to_symbol(card_info["cost"]) + "\n"
|
text += _convert_text_to_symbol(card_info["cost"]) + "\n"
|
||||||
text += "[i]" + card_info["type"] + "[/i]\n"
|
text += "[i]" + card_info["type"] + "[/i]\n"
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
text += _convert_text_to_symbol(card_info["desc"])
|
text += _convert_text_to_symbol(card_info["desc"])
|
||||||
|
|
||||||
=======
|
|
||||||
var oracle_text = card_info["desc"]
|
|
||||||
var last_idx = 0
|
|
||||||
|
|
||||||
for symbol in mana_symbols:
|
|
||||||
last_idx = 0
|
|
||||||
while oracle_text.find(symbol, last_idx) != -1:
|
|
||||||
oracle_text = oracle_text.replace(
|
|
||||||
symbol, '[img width="16" height="16"]' + mana_symbols[symbol] + "[/img]"
|
|
||||||
)
|
|
||||||
last_idx = oracle_text.find(symbol, last_idx) + symbol.length()
|
|
||||||
|
|
||||||
text += oracle_text
|
|
||||||
|
|
||||||
>>>>>>> 76a23aab5c62c7ff138d393c5f5fedd6cd6c7a46
|
|
||||||
|
|
||||||
func _clear_tip_text() -> void:
|
func _clear_tip_text() -> void:
|
||||||
text = ""
|
text = ""
|
||||||
@ -51,7 +35,5 @@ func _ready() -> void:
|
|||||||
mana_symbols = JSON.parse_string(file.get_as_text())
|
mana_symbols = JSON.parse_string(file.get_as_text())
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
set_use_bbcode(true)
|
|
||||||
|
|
||||||
EventBus.connect("card_on_hover", _set_tip_text)
|
EventBus.connect("card_on_hover", _set_tip_text)
|
||||||
EventBus.connect("card_on_unhover", _clear_tip_text)
|
EventBus.connect("card_on_unhover", _clear_tip_text)
|
||||||
|
@ -50,6 +50,8 @@ script = ExtResource("2_pqag1")
|
|||||||
[node name="RichTextLabel" type="RichTextLabel" parent="UI/BigBar/Items/MenuArea/VBoxContainer"]
|
[node name="RichTextLabel" type="RichTextLabel" parent="UI/BigBar/Items/MenuArea/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(0, 230)
|
custom_minimum_size = Vector2(0, 230)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
bbcode_enabled = true
|
||||||
|
fit_content = true
|
||||||
script = ExtResource("2_d43bn")
|
script = ExtResource("2_d43bn")
|
||||||
|
|
||||||
[node name="ChatArea" type="PanelContainer" parent="UI/BigBar/Items"]
|
[node name="ChatArea" type="PanelContainer" parent="UI/BigBar/Items"]
|
||||||
|
Reference in New Issue
Block a user