Add has_extension() method to String
This commit is contained in:
parent
ca452113d4
commit
a33ae0be0e
29 changed files with 46 additions and 48 deletions
|
|
@ -140,7 +140,7 @@ void ProjectManager::_notification(int p_what) {
|
|||
// Utility data.
|
||||
|
||||
Ref<Texture2D> ProjectManager::_file_dialog_get_icon(const String &p_path) {
|
||||
if (p_path.get_extension().to_lower() == "godot") {
|
||||
if (p_path.has_extension("godot")) {
|
||||
return singleton->icon_type_cache["GodotMonochrome"];
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ Ref<Texture2D> ProjectManager::_file_dialog_get_icon(const String &p_path) {
|
|||
}
|
||||
|
||||
Ref<Texture2D> ProjectManager::_file_dialog_get_thumbnail(const String &p_path) {
|
||||
if (p_path.get_extension().to_lower() == "godot") {
|
||||
if (p_path.has_extension("godot")) {
|
||||
return singleton->icon_type_cache["GodotFile"];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue