mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2025-05-05 05:02:02 +02:00
icons in cards
This commit is contained in:
parent
63f093189b
commit
bf052dec3b
16 changed files with 1066 additions and 8 deletions
|
@ -89,7 +89,19 @@ func _mouse_exited():
|
|||
|
||||
func set_command(new_command):
|
||||
command = new_command
|
||||
$Label.text = command
|
||||
var commands = new_command.split("[", true, 1)
|
||||
var args = ''
|
||||
if commands.size() > 1:
|
||||
args = commands[1].replace("]", "")
|
||||
args = args.replace(", ", "/")
|
||||
args = args.replace("ref", " [img=20]images/ref.svg[/img] ")
|
||||
args = args.replace("commit", " [img=20]images/commit.svg[/img] ")
|
||||
args = args.replace("string", " [img=20]images/string.svg[/img] ")
|
||||
args = args.replace("head", " [img=20]images/head.svg[/img] ")
|
||||
args = args.replace("file", " [img=20]images/file.svg[/img] ")
|
||||
args = args.replace("remote", " [img=20]images/remote.svg[/img] ")
|
||||
$Label.bbcode_text = commands[0] + args
|
||||
#$Label.text = command
|
||||
|
||||
func set_description(new_description):
|
||||
description = new_description
|
||||
|
|
|
@ -64,15 +64,14 @@ position = Vector2( 0, -145.336 )
|
|||
position = Vector2( -6.10352e-05, -0.641296 )
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
margin_left = -89.0
|
||||
[node name="Label" type="RichTextLabel" parent="."]
|
||||
margin_left = -91.0
|
||||
margin_top = -279.0
|
||||
margin_right = 85.0
|
||||
margin_right = 95.0
|
||||
margin_bottom = -189.0
|
||||
custom_fonts/font = ExtResource( 1 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
text = "Name"
|
||||
autowrap = true
|
||||
mouse_filter = 2
|
||||
custom_colors/default_color = Color( 0, 0, 0, 1 )
|
||||
bbcode_enabled = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue