Add placeholder image for locked images, disable locked images in UI
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,35 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bgvdcx107mbqg"
|
||||||
|
path.bptc="res://.godot/imported/LockedImage.png-320430e0641c9513ebcd2bd1ecdc8829.bptc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://src/gallery/LockedImage.png"
|
||||||
|
dest_files=["res://.godot/imported/LockedImage.png-320430e0641c9513ebcd2bd1ecdc8829.bptc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=true
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
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/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=0
|
||||||
@@ -147,13 +147,15 @@ public partial class GalleryMenu : Control
|
|||||||
|
|
||||||
if (!GalleryImages[image])
|
if (!GalleryImages[image])
|
||||||
{
|
{
|
||||||
|
ItemLabels[imageIndex].Disabled = true;
|
||||||
imageIndex++;
|
imageIndex++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var r = ResourceLoader.Load(_textures + "/" + image);
|
var r = ResourceLoader.Load<CompressedTexture2D>(_textures + "/" + image);
|
||||||
ItemLabels[imageIndex].Text = image.TrimSuffix(".png").TrimSuffix(".jpg");
|
ItemLabels[imageIndex].Text = image.TrimSuffix(".png").TrimSuffix(".jpg");
|
||||||
ItemThumbnails[imageIndex++].Texture = (CompressedTexture2D)r;
|
ItemLabels[imageIndex].Disabled = false;
|
||||||
|
ItemThumbnails[imageIndex++].Texture = r;
|
||||||
}
|
}
|
||||||
|
|
||||||
NextButton.Disabled = _pageIndex == Filepaths.Count - 1;
|
NextButton.Disabled = _pageIndex == Filepaths.Count - 1;
|
||||||
@@ -187,10 +189,13 @@ public partial class GalleryMenu : Control
|
|||||||
|
|
||||||
public void ClearImages()
|
public void ClearImages()
|
||||||
{
|
{
|
||||||
|
var lockedImage = ResourceLoader.Load<CompressedTexture2D>(@"res://src/gallery/LockedImage.png");
|
||||||
foreach (var image in ItemThumbnails)
|
foreach (var image in ItemThumbnails)
|
||||||
image.Texture = new PlaceholderTexture2D();
|
{
|
||||||
|
image.Texture = lockedImage;
|
||||||
|
}
|
||||||
foreach (var label in ItemLabels)
|
foreach (var label in ItemLabels)
|
||||||
label.Text = "???";
|
label.Text = " ??? ";
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Input(InputEvent @event)
|
public override void _Input(InputEvent @event)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cl0fi7kgimquk" path="res://src/ui/gallery/GalleryMenu.cs" id="1_lvvvw"]
|
[ext_resource type="Script" uid="uid://cl0fi7kgimquk" path="res://src/ui/gallery/GalleryMenu.cs" id="1_lvvvw"]
|
||||||
[ext_resource type="Texture2D" uid="uid://s3mtv6c2emph" path="res://src/ui/gallery/Gallery.png" id="2_lvvvw"]
|
[ext_resource type="Texture2D" uid="uid://s3mtv6c2emph" path="res://src/ui/gallery/Gallery.png" id="2_lvvvw"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bgvdcx107mbqg" path="res://src/gallery/LockedImage.png" id="3_1v60v"]
|
||||||
[ext_resource type="FontFile" uid="uid://tfskthaq7tmi" path="res://src/ui/fonts/georgia.ttf" id="3_5ba6g"]
|
[ext_resource type="FontFile" uid="uid://tfskthaq7tmi" path="res://src/ui/fonts/georgia.ttf" id="3_5ba6g"]
|
||||||
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_1v60v"]
|
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_1v60v"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b7nxeq5qft3xa" path="res://src/ui/gallery/Line 1.png" id="4_s04nx"]
|
[ext_resource type="Texture2D" uid="uid://b7nxeq5qft3xa" path="res://src/ui/gallery/Line 1.png" id="4_s04nx"]
|
||||||
@@ -9,8 +10,6 @@
|
|||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5wknn"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5wknn"]
|
||||||
|
|
||||||
[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_5wknn"]
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5ba6g"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5ba6g"]
|
||||||
bg_color = Color(0, 0, 0, 0.933333)
|
bg_color = Color(0, 0, 0, 0.933333)
|
||||||
|
|
||||||
@@ -89,7 +88,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -129,7 +128,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -169,7 +168,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -209,7 +208,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -249,7 +248,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -293,7 +292,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -333,7 +332,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -373,7 +372,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -413,7 +412,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
@@ -453,7 +452,7 @@ layout_mode = 2
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(270, 190)
|
custom_minimum_size = Vector2(270, 190)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = SubResource("PlaceholderTexture2D_5wknn")
|
texture = ExtResource("3_1v60v")
|
||||||
expand_mode = 2
|
expand_mode = 2
|
||||||
stretch_mode = 5
|
stretch_mode = 5
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user