File explorer document icon

This commit is contained in:
bleeptrack 2020-10-27 18:21:57 +01:00
parent 208ddd02c2
commit ea2c731cd3
10 changed files with 148 additions and 85 deletions

77
nodes/document.svg Normal file
View file

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="27.764198mm"
height="34.402554mm"
viewBox="0 0 27.764197 34.402553"
version="1.1"
id="svg8"
inkscape:version="1.0.1 (1.0.1+r73)"
sodipodi:docname="document.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.6"
inkscape:cx="112.40021"
inkscape:cy="81.902992"
inkscape:document-units="mm"
inkscape:current-layer="g836"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="3840"
inkscape:window-height="2111"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
inkscape:snap-bbox-midpoints="true"
inkscape:bbox-nodes="true"
inkscape:snap-bbox-edge-midpoints="true" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-5.5949087,-121.55315)">
<g
id="g836"
transform="matrix(1.1299927,0,0,1.1299927,-8.019261,-20.06068)"
style="stroke-width:0.884961">
<path
style="fill:#e6e6e6;stroke:none;stroke-width:1.54646;stroke-miterlimit:10"
d="m 27.687619,125.4926 v 8.76189 h 8.760685 z"
id="path867"
sodipodi:nodetypes="cccc" />
<path
style="fill:#f2f2f2;stroke:none;stroke-width:5;stroke-miterlimit:10"
d="m -130.84766,-71.34375 c -4.77953,0 -8.62695,3.847415 -8.62695,8.626953 V 50.054688 c 0,4.779538 3.84742,8.626953 8.62695,8.626953 h 87.681644 c 4.779539,0 8.626954,-3.847415 8.626954,-8.626953 v -76.6875 H -79.25 V -71.34375 Z"
transform="matrix(0.23414606,0,0,0.23414606,44.705446,142.02764)"
id="rect833"
sodipodi:nodetypes="sssssscccs" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

34
nodes/document.svg.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/document.svg-b9fdc82a659cb4c40c5c95e09b615070.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://nodes/document.svg"
dest_files=[ "res://.import/document.svg-b9fdc82a659cb4c40c5c95e09b615070.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View file

@ -1,64 +0,0 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1]
[ext_resource path="res://scenes/repository.tscn" type="PackedScene" id=3]
[ext_resource path="res://scenes/cardgame.gd" type="Script" id=4]
[ext_resource path="res://scenes/terminal.tscn" type="PackedScene" id=5]
[ext_resource path="res://fonts/big.tres" type="DynamicFont" id=6]
[node name="Cardgame" type="Node2D"]
script = ExtResource( 4 )
[node name="ColorRect" type="ColorRect" parent="."]
margin_right = 1922.0
margin_bottom = 1083.0
mouse_filter = 2
color = Color( 0.0823529, 0.0823529, 0.0823529, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="RepositoryRemote" parent="." instance=ExtResource( 3 )]
margin_right = 748.0
margin_bottom = 746.0
label = "remote"
simplified_view = true
[node name="Repository" parent="." instance=ExtResource( 3 )]
margin_left = 762.0
margin_right = 1481.0
margin_bottom = 744.0
label = "yours"
simplified_view = true
[node name="Terminal" parent="." instance=ExtResource( 5 )]
margin_left = 1488.0
margin_top = 5.0
margin_right = 1914.0
margin_bottom = 745.0
[node name="Button" type="Button" parent="."]
margin_left = 1719.41
margin_top = 814.594
margin_right = 1892.41
margin_bottom = 856.594
custom_fonts/font = ExtResource( 1 )
text = "Draw new cards"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Energy" type="Label" parent="."]
modulate = Color( 0.431373, 0.792157, 0.423529, 1 )
margin_left = 35.3364
margin_top = 796.429
margin_right = 75.3364
margin_bottom = 845.429
rect_scale = Vector2( 2, 2 )
custom_fonts/font = ExtResource( 6 )
text = "3"
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="command_done" from="Terminal" to="." method="_update_repo"]
[connection signal="pressed" from="Button" to="." method="redraw_all_cards"]

View file

@ -2,7 +2,7 @@
[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1]
[ext_resource path="res://fonts/big.tres" type="DynamicFont" id=2]
[ext_resource path="res://scenes/cardgame.gd" type="Script" id=3]
[ext_resource path="res://scenes/cards.gd" type="Script" id=3]
[node name="Cards" type="Control"]
anchor_right = 1.0
@ -14,6 +14,7 @@ __meta__ = {
}
[node name="Button" type="Button" parent="."]
visible = false
anchor_left = 1.0
anchor_right = 1.0
margin_left = -172.0

View file

@ -89,6 +89,7 @@ __meta__ = {
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
wrap_enabled = true
__meta__ = {
"_edit_use_anchors_": false
}

View file

@ -1,15 +1,15 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/file_browser_item.gd" type="Script" id=1]
[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=2]
[ext_resource path="res://nodes/document.svg" type="Texture" id=3]
[node name="Control" type="Control"]
anchor_right = 0.052
anchor_bottom = 0.093
margin_right = 100.16
margin_bottom = -0.439995
rect_min_size = Vector2( 150, 100 )
anchor_right = 0.104
anchor_bottom = 0.126
margin_right = 0.319992
margin_bottom = -0.0800018
rect_min_size = Vector2( 175, 150 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
@ -25,29 +25,41 @@ __meta__ = {
[node name="Control" type="Control" parent="VBoxContainer"]
margin_right = 200.0
margin_bottom = 71.0
margin_bottom = 94.0
mouse_filter = 2
size_flags_vertical = 3
[node name="ColorRect" type="ColorRect" parent="VBoxContainer/Control"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -25.0
margin_top = -25.0
margin_right = 25.0
margin_bottom = 25.0
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
mouse_filter = 2
color = Color( 0.203922, 0.721569, 0.501961, 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TextureRect" type="TextureRect" parent="VBoxContainer/Control"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 8.0
margin_top = 8.0
margin_right = -8.0
margin_bottom = -8.0
texture = ExtResource( 3 )
expand = true
stretch_mode = 6
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="VBoxContainer"]
margin_top = 75.0
margin_top = 98.0
margin_right = 200.0
margin_bottom = 100.0
margin_bottom = 150.0
size_flags_vertical = 7
size_flags_stretch_ratio = 0.55
custom_fonts/font = ExtResource( 2 )
text = "filename"
align = 1
autowrap = true

View file

@ -91,7 +91,7 @@ anchor_bottom = 0.0
margin_left = -23.0
margin_top = 31.0
margin_right = 574.0
margin_bottom = 188.0
margin_bottom = 231.0
mouse_filter = 1
mode = 1
[connection signal="mouse_entered" from="Rect" to="." method="_on_hover"]

View file

@ -326,5 +326,7 @@ func close_all_file_browsers():
for o in objects.values():
if o.type == "commit":
o.file_browser.close()
o.file_browser.visible = false

View file

@ -3,13 +3,13 @@
[ext_resource path="res://fonts/default.tres" type="DynamicFont" id=1]
[ext_resource path="res://scenes/text_editor.gd" type="Script" id=2]
[node name="TextEditor" type="TextEdit"]
anchor_right = 1.0
anchor_bottom = 1.0
custom_colors/background_color = Color( 0, 0, 0, 1 )
text = "Text here"
syntax_highlighting = true
wrap_enabled = true
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false