Skip to content

Commit ff7b245

Browse files
simone-lungarellaLincoln-Ab
authored andcommitted
feat: added visual hint when copied level code
1 parent 532761b commit ff7b245

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Secondary mechanics are:
7171
| TOTAL | ----- | ------ | ------ | ----- | 29 |
7272

7373

74-
- [ ] Add hint when copied level code;
74+
- [x] Add hint when copied level code;
7575
- [x] Disable save button when name or code is missing in import window;
7676
- [x] Update level interface when importing a level;
7777
- [x] Duplicate inspection panel for normal/custom levels;

assets/ui/paste_check_icon.png

2.04 KB
Loading
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://bre7mikpnncf"
6+
path="res://.godot/imported/paste_check_icon.png-88ccdc01eb1267b185eb2cc0ba130c89.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://assets/ui/paste_check_icon.png"
14+
dest_files=["res://.godot/imported/paste_check_icon.png-88ccdc01eb1267b185eb2cc0ba130c89.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

scripts/user_interface/custom_level_inspect.gd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const LEVEL_BUILDER = preload("res://packed_scene/scene_2d/LevelBuilder.tscn")
66
const BUILDER_UI = preload("res://packed_scene/user_interface/BuilderUI.tscn")
77
const LEVEL_MANAGER = preload("res://packed_scene/scene_2d/LevelManager.tscn")
88
const GAME_UI = preload("res://packed_scene/user_interface/GameUI.tscn")
9+
const PASTE_CHECK_ICON = preload("res://assets/ui/paste_check_icon.png")
910

1011
var _level_name: String
1112
var _level_code: String
@@ -96,6 +97,8 @@ func _on_background_gui_input(event: InputEvent) -> void:
9697

9798
func _on_copy_btn_pressed() -> void:
9899
DisplayServer.clipboard_set(_level_code)
100+
copy_btn.icon = PASTE_CHECK_ICON
101+
copy_btn.add_theme_color_override("icon_normal_color", Color.WEB_GREEN)
99102

100103

101104
func _on_delete_btn_pressed() -> void:

scripts/user_interface/level_import.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
extends Control
22

33
const BUTTON_ERROR = preload("res://assets/resources/themes/button_error.tres")
4+
45
var _inserted_code: String
56

67
@onready var code: Button = %Code

0 commit comments

Comments
 (0)