botnet and sell icons
This commit is contained in:
parent
dae8a0d5b1
commit
e2f6584aaa
9 changed files with 121 additions and 2 deletions
BIN
assets/blankIcon.png
Normal file
BIN
assets/blankIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 447 B |
40
assets/blankIcon.png.import
Normal file
40
assets/blankIcon.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bbu7dofi4u038"
|
||||||
|
path="res://.godot/imported/blankIcon.png-8fc835676acf830316155cd070dc4a11.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/blankIcon.png"
|
||||||
|
dest_files=["res://.godot/imported/blankIcon.png-8fc835676acf830316155cd070dc4a11.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
assets/sellIcon.png
Normal file
BIN
assets/sellIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 445 B |
40
assets/sellIcon.png.import
Normal file
40
assets/sellIcon.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dokuqh6jq4eti"
|
||||||
|
path="res://.godot/imported/sellIcon.png-bbb1034de3ddd6ea52c144d6369cc78c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/sellIcon.png"
|
||||||
|
dest_files=["res://.godot/imported/sellIcon.png-bbb1034de3ddd6ea52c144d6369cc78c.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
|
@ -11,3 +11,4 @@ class_name ItemData
|
||||||
@export var can_buy : bool = false
|
@export var can_buy : bool = false
|
||||||
@export var description : String = ""
|
@export var description : String = ""
|
||||||
@export var rarity : String = ""
|
@export var rarity : String = ""
|
||||||
|
@export var sell_icon : bool = false
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ class_name ItemSlot
|
||||||
@export var icon : TextureRect
|
@export var icon : TextureRect
|
||||||
@export var item: ItemData
|
@export var item: ItemData
|
||||||
@export var label : Label
|
@export var label : Label
|
||||||
|
@export var botnet_icon : Control
|
||||||
|
@export var sell_icon : Control
|
||||||
var type : String
|
var type : String
|
||||||
var block_taking : bool = false
|
var block_taking : bool = false
|
||||||
const DEFAULT = preload("uid://hgjmkwj0dbqr")
|
const DEFAULT = preload("uid://hgjmkwj0dbqr")
|
||||||
|
|
@ -17,6 +19,8 @@ func update_ui():
|
||||||
if not item:
|
if not item:
|
||||||
icon.texture = null
|
icon.texture = null
|
||||||
label.text = ""
|
label.text = ""
|
||||||
|
sell_icon.visible = false
|
||||||
|
botnet_icon.visible = false
|
||||||
add_theme_stylebox_override("panel",DEFAULT)
|
add_theme_stylebox_override("panel",DEFAULT)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -28,6 +32,8 @@ func update_ui():
|
||||||
icon.texture = item.icon
|
icon.texture = item.icon
|
||||||
#tooltip_text = item.item_name
|
#tooltip_text = item.item_name
|
||||||
label.text = item.value
|
label.text = item.value
|
||||||
|
botnet_icon.visible = item.botnet_power > 0
|
||||||
|
sell_icon.visible = item.sell_icon
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,23 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://dgqs20xf7l8c"]
|
[gd_scene load_steps=7 format=3 uid="uid://dgqs20xf7l8c"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cpd04flfh5nlc" path="res://inv_system/item_slot.gd" id="1_m11ft"]
|
[ext_resource type="Script" uid="uid://cpd04flfh5nlc" path="res://inv_system/item_slot.gd" id="1_m11ft"]
|
||||||
[ext_resource type="StyleBox" uid="uid://hgjmkwj0dbqr" path="res://inv_system/item_panels/default.tres" id="1_mkcpq"]
|
[ext_resource type="StyleBox" uid="uid://hgjmkwj0dbqr" path="res://inv_system/item_panels/default.tres" id="1_mkcpq"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b7jp850fqpa0j" path="res://icon.svg" id="3_0tnt0"]
|
[ext_resource type="Texture2D" uid="uid://b7jp850fqpa0j" path="res://icon.svg" id="3_0tnt0"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bbu7dofi4u038" path="res://assets/blankIcon.png" id="4_0tnt0"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dokuqh6jq4eti" path="res://assets/sellIcon.png" id="5_eh2fu"]
|
||||||
|
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_ab1u2"]
|
[sub_resource type="LabelSettings" id="LabelSettings_ab1u2"]
|
||||||
outline_size = 5
|
outline_size = 5
|
||||||
outline_color = Color(0, 0, 0, 1)
|
outline_color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
[node name="ItemSlot" type="Panel" node_paths=PackedStringArray("icon", "label")]
|
[node name="ItemSlot" type="Panel" node_paths=PackedStringArray("icon", "label", "botnet_icon", "sell_icon")]
|
||||||
custom_minimum_size = Vector2(50, 50)
|
custom_minimum_size = Vector2(50, 50)
|
||||||
theme_override_styles/panel = ExtResource("1_mkcpq")
|
theme_override_styles/panel = ExtResource("1_mkcpq")
|
||||||
script = ExtResource("1_m11ft")
|
script = ExtResource("1_m11ft")
|
||||||
icon = NodePath("Icon")
|
icon = NodePath("Icon")
|
||||||
label = NodePath("Icon/Label")
|
label = NodePath("Icon/Label")
|
||||||
|
botnet_icon = NodePath("icons/botnet_power")
|
||||||
|
sell_icon = NodePath("icons/sell_only")
|
||||||
|
|
||||||
[node name="Icon" type="TextureRect" parent="."]
|
[node name="Icon" type="TextureRect" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
@ -46,5 +50,31 @@ text = "120 GB"
|
||||||
label_settings = SubResource("LabelSettings_ab1u2")
|
label_settings = SubResource("LabelSettings_ab1u2")
|
||||||
horizontal_alignment = 2
|
horizontal_alignment = 2
|
||||||
|
|
||||||
|
[node name="icons" type="HBoxContainer" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 1
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_left = -24.0
|
||||||
|
offset_bottom = 10.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
alignment = 2
|
||||||
|
|
||||||
|
[node name="botnet_power" type="TextureRect" parent="icons"]
|
||||||
|
texture_filter = 1
|
||||||
|
custom_minimum_size = Vector2(16, 16)
|
||||||
|
layout_mode = 2
|
||||||
|
texture = ExtResource("4_0tnt0")
|
||||||
|
expand_mode = 1
|
||||||
|
stretch_mode = 4
|
||||||
|
|
||||||
|
[node name="sell_only" type="TextureRect" parent="icons"]
|
||||||
|
texture_filter = 1
|
||||||
|
custom_minimum_size = Vector2(16, 16)
|
||||||
|
layout_mode = 2
|
||||||
|
texture = ExtResource("5_eh2fu")
|
||||||
|
expand_mode = 1
|
||||||
|
stretch_mode = 4
|
||||||
|
|
||||||
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
|
||||||
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_lhfs3")
|
||||||
bin_chance = 0
|
bin_chance = 0
|
||||||
buy_value = 600
|
buy_value = 600
|
||||||
rarity = "Epic"
|
rarity = "Epic"
|
||||||
|
sell_icon = true
|
||||||
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_pugmu")
|
||||||
bin_chance = 0
|
bin_chance = 0
|
||||||
buy_value = 400
|
buy_value = 400
|
||||||
rarity = "Rare"
|
rarity = "Rare"
|
||||||
|
sell_icon = true
|
||||||
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue