merged and sorts shaders now too

This commit is contained in:
Tristan Rowley
2019-12-14 14:19:01 +00:00
parent e0726531f2
commit 6c3848cf6c

View File

@@ -203,7 +203,7 @@ class ShadersMenu(Menu):
root, dirs, files = next(os.walk(current_path))
indent = ' ' * 4 * (current_level)
for folder in dirs:
for folder in sorted(dirs):
is_open, char = self._check_folder_state(folder)
self.menu_list.append(dict(name='{}{}{}'.format(indent, folder, char), is_shader=False))
if (is_open):
@@ -211,6 +211,7 @@ class ShadersMenu(Menu):
next_level = current_level + 1
self._add_folder_to_shaders_list(next_path, next_level)
files.sort()
for f in files:
split_name = os.path.splitext(f)
if (split_name[1].lower() in ['.frag', '.shader', '.glsl', '.glslf', '.fsh']):