Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/projects/project_item/project_item.gd
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@ func _fill_data(item: Projects.Item) -> void:
'run',
]).all():
action.disable(item.is_missing or item.has_invalid_editor)

for action in _actions.sub_list([
'run',
]).all():
if not item.has_main_scene:
action.disable(true)


func _view_command(item: Projects.Item) -> void:
Expand Down
2 changes: 1 addition & 1 deletion src/main/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

[node name="Main" type="Node"]
script = ExtResource("2_nqr5a")
gui_scene_path = "res://src/main/gui/gui_main.tscn"
gui_scene_path = "uid://omgg45dpxftx"
8 changes: 8 additions & 0 deletions src/services/projects.gd
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ class Item:
var editors_to_bind: Array:
get: return _get_editors_to_bind()

var has_main_scene: bool:
get: return _external_project_info.has_main_scene

var is_missing: bool:
get: return _external_project_info.is_missing

Expand Down Expand Up @@ -347,6 +350,9 @@ class ExternalProjectInfo extends RefCounted:
var is_missing: bool:
get: return _is_missing

var has_main_scene: bool:
get: return _has_main_scene

# TODO type
var tags: Array:
set(value):
Expand Down Expand Up @@ -378,6 +384,7 @@ class ExternalProjectInfo extends RefCounted:
var _name := "Loading..."
var _last_modified: int
var _is_missing := false
var _has_main_scene := false
var _tags := []
var _features := []
var _config_version := -1
Expand All @@ -401,6 +408,7 @@ class ExternalProjectInfo extends RefCounted:
_tags = cfg.get_value("application", "config/tags", [])
_features = cfg.get_value("application", "config/features", [])
_config_version = cfg.get_value("", "config_version", -1)
_has_main_scene = true if cfg.get_value("application", "run/main_scene", false) else false
_has_mono_section = cfg.has_section("mono")
if cfg.has_section_key("godots", "version_hint"):
_version_hint = cfg.get_value("godots", "version_hint")
Expand Down