diff options
-rw-r--r-- | main/main.cpp | 6 | ||||
-rw-r--r-- | misc/dist/linux/godot.6 | 9 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 10 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 28 |
4 files changed, 43 insertions, 10 deletions
diff --git a/main/main.cpp b/main/main.cpp index 5beeb95a11..2fd9cfa734 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -265,7 +265,7 @@ void Main::print_help(const char *p_binary) { OS::get_singleton()->print(" -s, --script <script> Run a script.\n"); OS::get_singleton()->print(" --check-only Only parse for errors and quit (use with --script).\n"); #ifdef TOOLS_ENABLED - OS::get_singleton()->print(" --export <target> Export the project using the given export target. Export only main pack if path ends with .pck or .zip'.\n"); + OS::get_singleton()->print(" --export <target> Export the project using the given export target. Export only main pack if path ends with .pck or .zip.\n"); OS::get_singleton()->print(" --export-debug <target> Like --export, but use debug template.\n"); OS::get_singleton()->print(" --doctool <path> Dump the engine API reference to the given <path> in XML format, merging if existing files are found.\n"); OS::get_singleton()->print(" --no-docbase Disallow dumping the base types (used with --doctool).\n"); @@ -1257,14 +1257,14 @@ bool Main::start() { #endif } else if (args[i].length() && args[i][0] != '-' && game_path == "") { game_path = args[i]; + } else if (args[i] == "--check-only") { + check_only = true; } //parameters that have an argument to the right else if (i < (args.size() - 1)) { bool parsed_pair = true; if (args[i] == "-s" || args[i] == "--script") { script = args[i + 1]; - } else if (args[i] == "--check-only") { - check_only = true; } else if (args[i] == "--test") { test = args[i + 1]; #ifdef TOOLS_ENABLED diff --git a/misc/dist/linux/godot.6 b/misc/dist/linux/godot.6 index 64495d817e..50cb420e4e 100644 --- a/misc/dist/linux/godot.6 +++ b/misc/dist/linux/godot.6 @@ -1,4 +1,4 @@ -.TH GODOT "6" "February 2018" "godot 3.1" "Games" +.TH GODOT "6" "Februaryot 2018" "godot 3.1" "Games" .SH NAME godot \- multi\-platform 2D and 3D game engine with a feature\-rich editor .SH SYNOPSIS @@ -127,6 +127,9 @@ Print the frames per second to the stdout. \fB\-s\fR, \fB\-\-script\fR <script> Run a script. .TP +\fB\-\-check\-only\fR +Only parse for errors and quit (use with --script). +.TP \fB\-\-export\fR <target> Export the project using the given export target. Export only main pack if path ends with .pck or .zip. .TP @@ -146,7 +149,7 @@ Build the scripting solutions (e.g. for C# projects). Generate JSON dump of the Godot API for GDNative bindings. .TP \fB\-\-test\fR <test> -Run a unit test ('string', 'containers', 'math', 'render', 'multimesh', 'gui', 'io', 'shaderlang', 'physics', 'oa_hash_map'). +Run a unit test ('string', 'math', 'physics', 'physics_2d', 'render', 'oa_hash_map', 'gui', 'io', 'shaderlang', 'gd_tokenizer', 'gd_parser', 'gd_compiler', 'gd_bytecode', 'image', 'ordered_hash_map'). .SH FILES XDG_DATA_CONFIG/godot/ or ~/.config/godot/ .RS @@ -156,7 +159,7 @@ XDG_DATA_HOME/godot/ or ~/.local/share/godot/ .RS Contains the default configuration and user data folders for Godot\-made games (\fIuser://\fR path), as well as export templates. .RE -XDG_DATA_CACHE/godot or ~/.cache/godot/ +XDG_DATA_CACHE/godot/ or ~/.cache/godot/ .RS Cache folder for generated thumbnails and scene previews, as well as temporary location for downloads. .RE diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index b71a4dd133..4d73ee2d56 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -35,7 +35,9 @@ #include "os/os.h" #include "print_string.h" #include "translation.h" + #ifdef TOOLS_ENABLED +#include "editor/editor_scale.h" #include "editor/editor_settings.h" #endif @@ -716,7 +718,11 @@ void LineEdit::_notification(int p_what) { if (char_ofs == cursor_pos && draw_caret) { if (ime_text.length() == 0) { +#ifdef TOOLS_ENABLED + VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(x_ofs, y_ofs), Size2(Math::round(EDSCALE), caret_height)), cursor_color); +#else VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(x_ofs, y_ofs), Size2(1, caret_height)), cursor_color); +#endif } } @@ -755,7 +761,11 @@ void LineEdit::_notification(int p_what) { if (char_ofs == cursor_pos && draw_caret) { //may be at the end if (ime_text.length() == 0) { +#ifdef TOOLS_ENABLED + VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(x_ofs, y_ofs), Size2(Math::round(EDSCALE), caret_height)), cursor_color); +#else VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(Point2(x_ofs, y_ofs), Size2(1, caret_height)), cursor_color); +#endif } } diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 8926c1ec00..c9dcf058aa 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1148,10 +1148,18 @@ void TextEdit::_notification(int p_what) { if (ime_text.length() == 0) { if (draw_caret) { if (insert_mode) { - int caret_h = (block_caret) ? 4 : 1; +#ifdef TOOLS_ENABLED + int caret_h = (block_caret) ? 4 : 2 * EDSCALE; +#else + int caret_h = (block_caret) ? 4 : 2; +#endif VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(caret_w, caret_h)), cache.caret_color); } else { - caret_w = (block_caret) ? caret_w : 1; +#ifdef TOOLS_ENABLED + caret_w = (block_caret) ? caret_w : 2 * EDSCALE; +#else + caret_w = (block_caret) ? caret_w : 2; +#endif VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(caret_w, get_row_height())), cache.caret_color); } } @@ -1224,11 +1232,19 @@ void TextEdit::_notification(int p_what) { if (draw_caret) { if (insert_mode) { int char_w = cache.font->get_char_size(' ').width; - int caret_h = (block_caret) ? 4 : 1; +#ifdef TOOLS_ENABLED + int caret_h = (block_caret) ? 4 : 2 * EDSCALE; +#else + int caret_h = (block_caret) ? 4 : 2; +#endif VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(char_w, caret_h)), cache.caret_color); } else { int char_w = cache.font->get_char_size(' ').width; - int caret_w = (block_caret) ? char_w : 1; +#ifdef TOOLS_ENABLED + int caret_w = (block_caret) ? char_w : 2 * EDSCALE; +#else + int caret_w = (block_caret) ? char_w : 2; +#endif VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(cursor_pos, Size2i(caret_w, get_row_height())), cache.caret_color); } } @@ -4328,7 +4344,11 @@ void TextEdit::_update_caches() { cache.search_result_border_color = get_color("search_result_border_color"); cache.symbol_color = get_color("symbol_color"); cache.background_color = get_color("background_color"); +#ifdef TOOLS_ENABLED + cache.line_spacing = get_constant("line_spacing") * EDSCALE; +#else cache.line_spacing = get_constant("line_spacing"); +#endif cache.row_height = cache.font->get_height() + cache.line_spacing; cache.tab_icon = get_icon("tab"); cache.folded_icon = get_icon("GuiTreeArrowRight", "EditorIcons"); |