diff options
-rw-r--r-- | doc/classes/ItemList.xml | 18 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 6 | ||||
-rw-r--r-- | modules/mono/SCsub | 25 | ||||
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 9 | ||||
-rw-r--r-- | modules/mono/editor/godotsharp_builds.cpp | 2 | ||||
-rwxr-xr-x | modules/mono/glue/cs_files/VERSION.txt | 1 | ||||
-rw-r--r-- | scene/gui/item_list.cpp | 3 |
7 files changed, 45 insertions, 19 deletions
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 48ca0ddc01..4723cf8ee4 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -77,6 +77,14 @@ <description> </description> </method> + <method name="get_item_custom_fg_color" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> <method name="get_item_icon" qualifiers="const"> <return type="Texture"> </return> @@ -227,6 +235,16 @@ <description> </description> </method> + <method name="set_item_custom_fg_color"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="custom_fg_color" type="Color"> + </argument> + <description> + </description> + </method> <method name="set_item_disabled"> <return type="void"> </return> diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 73d93f7b46..a1a0b9e2c6 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -392,12 +392,6 @@ void RasterizerGLES2::end_frame(bool p_swap_buffers) { OS::get_singleton()->swap_buffers(); else glFinish(); - - if (p_swap_buffers) { - glColorMask(true, true, true, true); - glClearColor(0, 0, 0, 1); - glClear(GL_COLOR_BUFFER_BIT); - } } void RasterizerGLES2::finalize() { diff --git a/modules/mono/SCsub b/modules/mono/SCsub index a2df83925c..f3cf4c9c5d 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -18,14 +18,20 @@ def make_cs_files_header(src, dst): header.write('#include "ustring.h"\n') inserted_files = '' import os - for file in os.listdir(src): - if file.endswith('.cs'): - with open(os.path.join(src, file), 'rb') as f: + latest_mtime = 0 + for root, _, files in os.walk(src): + files = [f for f in files if f.endswith('.cs')] + for file in files: + filepath = os.path.join(root, file) + filepath_src_rel = os.path.relpath(filepath, src) + mtime = os.path.getmtime(filepath) + latest_mtime = mtime if mtime > latest_mtime else latest_mtime + with open(filepath, 'rb') as f: buf = f.read() decomp_size = len(buf) import zlib buf = zlib.compress(buf) - name = os.path.splitext(file)[0] + name = os.path.splitext(os.path.normpath(filepath_src_rel))[0].strip(os.sep).replace(os.sep, '_').replace('.', '_dotto_') header.write('\nstatic const int _cs_' + name + '_compressed_size = ' + str(len(buf)) + ';\n') header.write('static const int _cs_' + name + '_uncompressed_size = ' + str(decomp_size) + ';\n') header.write('static const unsigned char _cs_' + name + '_compressed[] = { ') @@ -33,18 +39,13 @@ def make_cs_files_header(src, dst): if i > 0: header.write(', ') header.write(byte_to_str(buf[buf_idx])) - inserted_files += '\tr_files.insert("' + file + '", ' \ + inserted_files += '\tr_files.insert("' + filepath_src_rel + '", ' \ 'CompressedFile(_cs_' + name + '_compressed_size, ' \ '_cs_' + name + '_uncompressed_size, ' \ '_cs_' + name + '_compressed));\n' header.write(' };\n') - version_file = os.path.join(src, 'VERSION.txt') - with open(version_file, 'r') as content_file: - try: - glue_version = int(content_file.read()) # make sure the format is valid - header.write('\n#define CS_GLUE_VERSION UINT32_C(' + str(glue_version) + ')\n') - except ValueError: - raise ValueError('Invalid C# glue version in: ' + version_file) + glue_version = int(latest_mtime) # The latest modified time will do for now + header.write('\n#define CS_GLUE_VERSION UINT32_C(' + str(glue_version) + ')\n') header.write('\nstruct CompressedFile\n' '{\n' '\tint compressed_size;\n' '\tint uncompressed_size;\n' '\tconst unsigned char* data;\n' '\n\tCompressedFile(int p_comp_size, int p_uncomp_size, const unsigned char* p_data)\n' diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 76907451e7..b97bb5e95f 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -512,6 +512,15 @@ Error BindingsGenerator::generate_cs_core_project(const String &p_output_dir, bo data.resize(file_data.uncompressed_size); Compression::decompress(data.ptrw(), file_data.uncompressed_size, file_data.data, file_data.compressed_size, Compression::MODE_DEFLATE); + String output_dir = output_file.get_base_dir(); + + if (!DirAccess::exists(output_dir)) { + DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + ERR_FAIL_COND_V(!da, ERR_CANT_CREATE); + Error err = da->make_dir_recursive(ProjectSettings::get_singleton()->globalize_path(output_dir)); + ERR_FAIL_COND_V(err != OK, ERR_CANT_CREATE); + } + FileAccessRef file = FileAccess::open(output_file, FileAccess::WRITE); ERR_FAIL_COND_V(!file, ERR_FILE_CANT_WRITE); file->store_buffer(data.ptr(), data.size()); diff --git a/modules/mono/editor/godotsharp_builds.cpp b/modules/mono/editor/godotsharp_builds.cpp index b3b259e851..0fb8734410 100644 --- a/modules/mono/editor/godotsharp_builds.cpp +++ b/modules/mono/editor/godotsharp_builds.cpp @@ -210,6 +210,8 @@ bool GodotSharpBuilds::build_api_sln(const String &p_name, const String &p_api_s if (!FileAccess::exists(api_assembly_file)) { MonoBuildInfo api_build_info(api_sln_file, p_config); + // TODO Replace this global NoWarn with '#pragma warning' directives on generated files, + // once we start to actively document manually maintained C# classes api_build_info.custom_props.push_back("NoWarn=1591"); // Ignore missing documentation warnings if (!GodotSharpBuilds::get_singleton()->build(api_build_info)) { diff --git a/modules/mono/glue/cs_files/VERSION.txt b/modules/mono/glue/cs_files/VERSION.txt deleted file mode 100755 index ec635144f6..0000000000 --- a/modules/mono/glue/cs_files/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 5c79741682..d61bd97c2a 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -1423,6 +1423,9 @@ void ItemList::_bind_methods() { ClassDB::bind_method(D_METHOD("set_item_custom_bg_color", "idx", "custom_bg_color"), &ItemList::set_item_custom_bg_color); ClassDB::bind_method(D_METHOD("get_item_custom_bg_color", "idx"), &ItemList::get_item_custom_bg_color); + ClassDB::bind_method(D_METHOD("set_item_custom_fg_color", "idx", "custom_fg_color"), &ItemList::set_item_custom_fg_color); + ClassDB::bind_method(D_METHOD("get_item_custom_fg_color", "idx"), &ItemList::get_item_custom_fg_color); + ClassDB::bind_method(D_METHOD("set_item_tooltip_enabled", "idx", "enable"), &ItemList::set_item_tooltip_enabled); ClassDB::bind_method(D_METHOD("is_item_tooltip_enabled", "idx"), &ItemList::is_item_tooltip_enabled); |