From 21b672f8f0a479cdd42411a8a625b669e4aca1ee Mon Sep 17 00:00:00 2001 From: incredibleLeitman Date: Mon, 13 Jan 2020 17:39:24 +0100 Subject: [PATCH] added crosshair and slightly improved font readability --- Characters/Player/UI/UI.tscn | 48 ++++++++++++++++++++---- Resources/Fonts/MainFont.tres | 8 ++++ Resources/Textures/crosshair.png | Bin 0 -> 438 bytes Resources/Textures/crosshair.png.import | 34 +++++++++++++++++ UI/MainMenu.tscn | 31 +++++++-------- 5 files changed, 96 insertions(+), 25 deletions(-) create mode 100644 Resources/Fonts/MainFont.tres create mode 100644 Resources/Textures/crosshair.png create mode 100644 Resources/Textures/crosshair.png.import diff --git a/Characters/Player/UI/UI.tscn b/Characters/Player/UI/UI.tscn index bc0e2af..2cea79b 100644 --- a/Characters/Player/UI/UI.tscn +++ b/Characters/Player/UI/UI.tscn @@ -1,7 +1,9 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://Characters/Player/UI/UI.gd" type="Script" id=1] -[ext_resource path="res://Resources/Textures/pillLevel_fill.png" type="Texture" id=2] +[ext_resource path="res://Resources/Fonts/MainFont.tres" type="DynamicFont" id=2] +[ext_resource path="res://Resources/Textures/pillLevel_fill.png" type="Texture" id=3] +[ext_resource path="res://Resources/Textures/crosshair.png" type="Texture" id=4] [node name="HUD" type="Control"] anchor_right = 1.0 @@ -12,11 +14,18 @@ script = ExtResource( 1 ) [node name="PressInteract" type="Label" parent="."] visible = false -margin_left = 453.005 -margin_top = 515.582 -margin_right = 569.005 -margin_bottom = 529.582 -text = "Press E to interact" +modulate = Color( 0, 0, 0, 1 ) +self_modulate = Color( 0, 0, 0, 1 ) +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -104.0 +margin_top = -58.8594 +margin_right = 104.0 +margin_bottom = -34.8594 +custom_fonts/font = ExtResource( 2 ) +text = "Press 'E' to interact" [node name="InventoryContainer" type="GridContainer" parent="."] margin_left = 868.0 @@ -36,4 +45,27 @@ margin_bottom = 64.7845 max_value = 7.0 step = 0.1 value = 6.0 -texture_progress = ExtResource( 2 ) +texture_progress = ExtResource( 3 ) + +[node name="CrossHair" type="Control" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -20.0 +margin_top = -20.0 +margin_right = 20.0 +margin_bottom = 20.0 + +[node name="Circle" type="TextureRect" parent="CrossHair"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -20.0 +margin_top = -20.0 +margin_right = 20.0 +margin_bottom = 20.0 +texture = ExtResource( 4 ) +expand = true +stretch_mode = 4 diff --git a/Resources/Fonts/MainFont.tres b/Resources/Fonts/MainFont.tres new file mode 100644 index 0000000..0afb3e0 --- /dev/null +++ b/Resources/Fonts/MainFont.tres @@ -0,0 +1,8 @@ +[gd_resource type="DynamicFont" load_steps=2 format=2] + +[ext_resource path="res://Resources/Fonts/Beon-Regular.otf" type="DynamicFontData" id=1] + +[resource] +size = 20 +use_filter = true +font_data = ExtResource( 1 ) diff --git a/Resources/Textures/crosshair.png b/Resources/Textures/crosshair.png new file mode 100644 index 0000000000000000000000000000000000000000..51eec67d47c469189f3c3714867495e7ec30723a GIT binary patch literal 438 zcmV;n0ZIOeP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5dZ)S5dnW>Uy%R+0ZU0lK~y+Tol~(+ zgg_L8h1gkum5Ew;7RJ9Yxk3wVPP-&qR{)N?@)m6p>NVGF>II}E9 zJydX#%X`e5c`WdF!{|qHsAc4 z`7`1;UahKXx>zjs1-i+)t|xuX1hw?w#b<0V26x?*`U5AvK^XH6HgP#K#SQ?D|A?@~ z2Bu>E2a^rvWm%4z=l;O=ZzIgvAjR*P