Image loader, datetime

This commit is contained in:
Kirill
2026-03-30 00:48:20 +03:00
parent baf6a15f41
commit 3b953b8713
144 changed files with 786 additions and 1668 deletions
-20
View File
@@ -1,20 +0,0 @@
extends VBoxContainer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
@export var Texture_button: TextureButton
@export var Description: Label
@export var Properties: Dictionary
#Shortcut|Name|Area|AreaName|Screen|ScreenName|Row|Col|ImagePath|LinkedScreen|ShowBound
func init_button(initial_dict: Dictionary):
Properties = initial_dict
func _on_button_up() -> void:
print("hello button")
#Texture_button.texture_normal = load("res://UI/1-Items/Helium.png")
-18
View File
@@ -1,18 +0,0 @@
[gd_scene format=3 uid="uid://d3xjfxwe3w16v"]
[ext_resource type="Script" uid="uid://bxxllddlgurus" path="res://UI/Buttons/item_button.gd" id="1_e6ro1"]
[node name="Button" type="VBoxContainer" unique_id=1538731567 node_paths=PackedStringArray("Texture_button", "Description")]
script = ExtResource("1_e6ro1")
Texture_button = NodePath("TextureButton")
Description = NodePath("Description")
[node name="TextureButton" type="TextureButton" parent="." unique_id=1377839155]
custom_minimum_size = Vector2(216, 216)
layout_mode = 2
[node name="Description" type="Label" parent="." unique_id=1488477178]
custom_minimum_size = Vector2(216, 40)
layout_mode = 2
[connection signal="button_up" from="TextureButton" to="." method="_on_button_up"]
Binary file not shown.
+39
View File
@@ -0,0 +1,39 @@
extends Control
class_name OwniverseEntity
signal entity_activated(entity)
const ENTITY_WIDTH = 216
const ENTITY_HEIGHT = 256
@onready var texture_button: TextureButton = $TextureButton
@onready var description: Label = $Description
@onready var selection: TextureRect = $Selection
@export var entity_name: String = ""
@export var entity_id: String = ""
@export var entity_page: int = -1
@export var sub_page: int = -1
func set_selection(flag: bool) -> void:
selection.visible = flag
func init_button(properties: Dictionary):
var image_path = "res://" + properties.image + properties.name + ".png"
texture_button.texture_normal = load(image_path)
position = Vector2i(int(properties.col) * ENTITY_WIDTH, int(properties.row) * ENTITY_HEIGHT)
entity_id = properties.id
entity_name = properties.name
entity_page = int(properties.page)
sub_page = int(properties.sub_page)
name = properties.id
set_selection(false)
#print(properties)
func _on_button_up() -> void:
set_selection(true)
entity_activated.emit(self)
#Texture_button.texture_normal = load("res://UI/0-Forces/Inflatin.png")
+32
View File
@@ -0,0 +1,32 @@
[gd_scene format=3 uid="uid://d3xjfxwe3w16v"]
[ext_resource type="Script" uid="uid://bxxllddlgurus" path="res://UI/ItemButton/item_button.gd" id="1_e6ro1"]
[ext_resource type="Texture2D" uid="uid://56w57w6iu3np" path="res://UI/ItemButton/Selected.png" id="2_eurq3"]
[node name="Button" type="Control" unique_id=667620208]
layout_mode = 3
anchors_preset = 0
offset_right = 216.0
offset_bottom = 260.0
script = ExtResource("1_e6ro1")
[node name="TextureButton" type="TextureButton" parent="." unique_id=1377839155]
custom_minimum_size = Vector2(216, 216)
layout_mode = 0
offset_right = 216.0
offset_bottom = 216.0
[node name="Description" type="Label" parent="." unique_id=1488477178]
custom_minimum_size = Vector2(216, 40)
layout_mode = 0
offset_top = 220.0
offset_right = 216.0
offset_bottom = 260.0
[node name="Selection" type="TextureRect" parent="." unique_id=674793134]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("2_eurq3")
[connection signal="button_up" from="TextureButton" to="." method="_on_button_up"]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More