mirror of
https://github.com/godotengine/godot.git
synced 2025-10-15 02:49:24 +00:00
Compare commits
18 Commits
3.0.5-stab
...
2.1-stable
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c5e2c83dcd | ||
![]() |
9cc700a0ab | ||
![]() |
569966f3bb | ||
![]() |
58556f5f95 | ||
![]() |
229b172977 | ||
![]() |
c56ea7cf91 | ||
![]() |
1913e4a040 | ||
![]() |
2b35ba4815 | ||
![]() |
d853eb2fb7 | ||
![]() |
36eeedb357 | ||
![]() |
5f18c5cb46 | ||
![]() |
f25e9a08e1 | ||
![]() |
4f8f9a4dbf | ||
![]() |
dd97502788 | ||
![]() |
d55304c56f | ||
![]() |
03a4b8cbc8 | ||
![]() |
2f0df52fe7 | ||
![]() |
fd6f62fd9a |
@@ -1936,6 +1936,13 @@ Error _Directory::make_dir(String p_dir){
|
||||
Error _Directory::make_dir_recursive(String p_dir){
|
||||
|
||||
ERR_FAIL_COND_V(!d,ERR_UNCONFIGURED);
|
||||
if (!p_dir.is_rel_path()) {
|
||||
DirAccess *d = DirAccess::create_for_path(p_dir);
|
||||
Error err = d->make_dir_recursive(p_dir);
|
||||
memdelete(d);
|
||||
return err;
|
||||
|
||||
}
|
||||
return d->make_dir_recursive(p_dir);
|
||||
}
|
||||
|
||||
|
@@ -65,7 +65,7 @@ void FuncRef::_bind_methods() {
|
||||
mi.arguments.push_back( PropertyInfo( Variant::NIL, "arg"+itos(i)));
|
||||
defargs.push_back(Variant());
|
||||
}
|
||||
ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"call_func:Variant",&FuncRef::call_func,mi,defargs);
|
||||
ObjectTypeDB::bind_native_method(METHOD_FLAGS_DEFAULT,"call_func",&FuncRef::call_func,mi,defargs);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -22339,6 +22339,7 @@
|
||||
<argument index="1" name="title" type="String" default=""Alert!"">
|
||||
</argument>
|
||||
<description>
|
||||
Displays a modal dialog box utilizing the host OS.
|
||||
</description>
|
||||
</method>
|
||||
<method name="can_draw" qualifiers="const">
|
||||
@@ -22352,6 +22353,7 @@
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns if the current host platform is using multiple threads.
|
||||
</description>
|
||||
</method>
|
||||
<method name="delay_msec" qualifiers="const">
|
||||
@@ -22372,12 +22374,17 @@
|
||||
<argument index="0" name="file" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Dumps the memory allocation ringlist to a file (only works in debug).
|
||||
Entry format per line: "Address - Size - Description"
|
||||
</description>
|
||||
</method>
|
||||
<method name="dump_resources_to_file">
|
||||
<argument index="0" name="file" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Dumps all used resources to file (only works in debug).
|
||||
Entry format per line: "Resource Type : Resource Location"
|
||||
At the end of the file is a statistic of all used Resource Types.
|
||||
</description>
|
||||
</method>
|
||||
<method name="execute">
|
||||
@@ -22401,12 +22408,14 @@
|
||||
<argument index="0" name="string" type="String">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the scancode of the given string (e.g. "Escape")
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_borderless_window" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns true if the current window is borderless.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_clipboard" qualifiers="const">
|
||||
@@ -22434,6 +22443,7 @@
|
||||
<return type="String">
|
||||
</return>
|
||||
<description>
|
||||
Returns the value of the commandline argument "-level".
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_data_dir" qualifiers="const">
|
||||
@@ -22482,6 +22492,14 @@
|
||||
<return type="Dictionary">
|
||||
</return>
|
||||
<description>
|
||||
Returns the current engine version information in a Dictionary.
|
||||
|
||||
"major" - Holds the major version number as a String
|
||||
"minor" - Holds the minor version number as a String
|
||||
"patch" - Holds the patch version number as a String
|
||||
"status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
|
||||
"revision" - Holds the revision (e.g. "custom-build") as a String
|
||||
"string" - major + minor + patch + status + revision in a single String
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_environment" qualifiers="const">
|
||||
@@ -22534,6 +22552,8 @@
|
||||
<return type="String">
|
||||
</return>
|
||||
<description>
|
||||
Returns the current latin keyboard variant as a String.
|
||||
Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO" or "ERROR"
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_locale" qualifiers="const">
|
||||
@@ -22554,6 +22574,7 @@
|
||||
<return type="String">
|
||||
</return>
|
||||
<description>
|
||||
Returns the model name of the current device.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_name" qualifiers="const">
|
||||
@@ -22583,6 +22604,7 @@
|
||||
<argument index="0" name="code" type="int">
|
||||
</argument>
|
||||
<description>
|
||||
Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape").
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_screen_count" qualifiers="const">
|
||||
@@ -30627,6 +30649,7 @@
|
||||
<return type="Vector3">
|
||||
</return>
|
||||
<description>
|
||||
Returns collision point. This point is in [b]global[/b] coordinate system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_layer_mask" qualifiers="const">
|
||||
@@ -30669,6 +30692,7 @@
|
||||
<argument index="0" name="local_point" type="Vector3">
|
||||
</argument>
|
||||
<description>
|
||||
Sets to which point ray should be casted. This point is in [b]local[/b] coordinate system.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_enabled">
|
||||
|
@@ -588,7 +588,7 @@ static const char *s_ControllerMappings [] =
|
||||
"030000004f04000023b3000000010000,Thrustmaster Dual Trigger 3-in-1,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a5,",
|
||||
"030000005e0400001907000000010000,X360 Wireless Controller,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
|
||||
"030000005e0400008902000021010000,Microsoft X-Box pad v2 (US),x:b3,a:b0,b:b1,y:b4,back:b6,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b5,lefttrigger:a2,rightshoulder:b2,righttrigger:a5,leftstick:b8,rightstick:b9,leftx:a0,lefty:a1,rightx:a3,righty:a4,",
|
||||
"030000005e0400008e02000001000000,Microsoft X-Box 360 pad,leftx:a0,lefty:a1,dpdown:h0.1,rightstick:b10,rightshoulder:b5,rightx:a3,start:b7,righty:a4,dpleft:h0.2,lefttrigger:a2,x:b2,dpup:h0.4,back:b6,leftshoulder:b4,y:b3,a:b0,dpright:h0.8,righttrigger:a5,b:b1,",
|
||||
"030000005e0400008e02000001000000,Microsoft X-Box 360 pad,leftstick:b9,leftx:a0,lefty:a1,dpdown:h0.1,rightstick:b10,rightshoulder:b5,rightx:a3,start:b7,righty:a4,dpleft:h0.2,lefttrigger:a2,x:b2,dpup:h0.4,back:b6,leftshoulder:b4,y:b3,a:b0,dpright:h0.8,righttrigger:a5,b:b1,",
|
||||
"030000005e0400008e02000004010000,Microsoft X-Box 360 pad,a:b0,b:b1,x:b2,y:b3,back:b6,start:b7,guide:b8,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,",
|
||||
"030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
|
||||
"030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
|
||||
|
@@ -372,8 +372,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
|
||||
|
||||
if (obj_A->get_script_instance() && obj_A->get_script_instance()->get_language()==GDScriptLanguage::get_singleton()) {
|
||||
|
||||
GDInstance *ins = static_cast<GDInstance*>(obj_A->get_script_instance());
|
||||
GDScript *cmp = ins->script.ptr();
|
||||
GDScript *cmp = static_cast<GDScript*>(obj_A->get_script_instance()->get_script().ptr());
|
||||
//bool found=false;
|
||||
while(cmp) {
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="godot_project_name_string">godot-project-name-zh</string>
|
||||
</resources>
|
||||
</resources>
|
4
platform/android/java/res/values-zh-rHK/strings.xml
Normal file
4
platform/android/java/res/values-zh-rHK/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="godot_project_name_string">godot-project-name-zh_HK</string>
|
||||
</resources>
|
4
platform/android/java/res/values-zh-rTW/strings.xml
Normal file
4
platform/android/java/res/values-zh-rTW/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="godot_project_name_string">godot-project-name-zh_TW</string>
|
||||
</resources>
|
@@ -1494,9 +1494,19 @@ Size2 OS_OSX::get_window_size() const {
|
||||
|
||||
};
|
||||
|
||||
const int menuHeight = [[NSStatusBar systemStatusBar] thickness];
|
||||
|
||||
void OS_OSX::set_window_size(const Size2 p_size) {
|
||||
|
||||
Size2 size=p_size;
|
||||
|
||||
// NSRect used by setFrame includes the title bar, so add it to our size.y
|
||||
CGFloat menuBarHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight];
|
||||
if (menuBarHeight != 0.f) {
|
||||
size.y+= menuBarHeight;
|
||||
} else {
|
||||
size.y+= menuHeight;
|
||||
}
|
||||
NSRect frame = [window_object frame];
|
||||
[window_object setFrame:NSMakeRect(frame.origin.x, frame.origin.y, size.x, size.y) display:YES];
|
||||
};
|
||||
|
@@ -40,6 +40,9 @@ void VisibilityNotifier2D::_enter_viewport(Viewport* p_viewport) {
|
||||
ERR_FAIL_COND(viewports.has(p_viewport));
|
||||
viewports.insert(p_viewport);
|
||||
|
||||
if (is_inside_tree() && get_tree()->is_editor_hint())
|
||||
return;
|
||||
|
||||
if (viewports.size()==1) {
|
||||
emit_signal(SceneStringNames::get_singleton()->enter_screen);
|
||||
|
||||
@@ -54,6 +57,9 @@ void VisibilityNotifier2D::_exit_viewport(Viewport* p_viewport){
|
||||
ERR_FAIL_COND(!viewports.has(p_viewport));
|
||||
viewports.erase(p_viewport);
|
||||
|
||||
if (is_inside_tree() && get_tree()->is_editor_hint())
|
||||
return;
|
||||
|
||||
emit_signal(SceneStringNames::get_singleton()->exit_viewport,p_viewport);
|
||||
if (viewports.size()==0) {
|
||||
emit_signal(SceneStringNames::get_singleton()->exit_screen);
|
||||
|
@@ -19,11 +19,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1-dev</string>
|
||||
<string>2.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>godot</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.1-dev</string>
|
||||
<string>2.1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>© 2007-2016 Juan Linietsky, Ariel Manzur</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
@@ -503,8 +503,8 @@ void TextureRegionEditor::_scroll_changed(float)
|
||||
|
||||
void TextureRegionEditor::_set_snap_mode(int p_mode)
|
||||
{
|
||||
snap_mode_button->get_popup()->set_item_checked(snap_mode,false);
|
||||
snap_mode = p_mode;
|
||||
snap_mode_button->get_popup()->set_item_checked(snap_mode,false);
|
||||
snap_mode_button->set_text(snap_mode_button->get_popup()->get_item_text(p_mode));
|
||||
snap_mode_button->get_popup()->set_item_checked(snap_mode,true);
|
||||
|
||||
|
@@ -364,12 +364,6 @@ public:
|
||||
mode=p_mode;
|
||||
}
|
||||
|
||||
void import_from_file(const String& p_file) {
|
||||
mode=MODE_IMPORT;
|
||||
_file_selected(p_file);
|
||||
ok_pressed();
|
||||
}
|
||||
|
||||
void show_dialog() {
|
||||
|
||||
|
||||
@@ -519,11 +513,11 @@ void ProjectManager::_panel_draw(Node *p_hb) {
|
||||
void ProjectManager::_update_project_buttons()
|
||||
{
|
||||
for(int i=0;i<scroll_childs->get_child_count();i++) {
|
||||
|
||||
|
||||
CanvasItem *item = scroll_childs->get_child(i)->cast_to<CanvasItem>();
|
||||
item->update();
|
||||
}
|
||||
|
||||
|
||||
bool has_runnable_scene = false;
|
||||
for (Map<String,String>::Element *E=selected_list.front(); E; E=E->next()) {
|
||||
const String &selected_main = E->get();
|
||||
@@ -534,7 +528,7 @@ void ProjectManager::_update_project_buttons()
|
||||
|
||||
erase_btn->set_disabled(selected_list.size()<1);
|
||||
open_btn->set_disabled(selected_list.size()<1);
|
||||
run_btn->set_disabled(!has_runnable_scene);
|
||||
run_btn->set_disabled(!has_runnable_scene);
|
||||
}
|
||||
|
||||
void ProjectManager::_panel_input(const InputEvent& p_ev,Node *p_hb) {
|
||||
@@ -605,6 +599,10 @@ void ProjectManager::_unhandled_input(const InputEvent& p_ev) {
|
||||
|
||||
switch (k.scancode) {
|
||||
|
||||
case KEY_RETURN: {
|
||||
|
||||
_open_project();
|
||||
} break;
|
||||
case KEY_HOME: {
|
||||
|
||||
for (int i=0; i<scroll_childs->get_child_count(); i++) {
|
||||
@@ -614,6 +612,7 @@ void ProjectManager::_unhandled_input(const InputEvent& p_ev) {
|
||||
selected_list.clear();
|
||||
selected_list.insert(hb->get_meta("name"), hb->get_meta("main_scene"));
|
||||
scroll->set_v_scroll(0);
|
||||
_update_project_buttons();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -628,6 +627,7 @@ void ProjectManager::_unhandled_input(const InputEvent& p_ev) {
|
||||
selected_list.clear();
|
||||
selected_list.insert(hb->get_meta("name"), hb->get_meta("main_scene"));
|
||||
scroll->set_v_scroll(scroll_childs->get_size().y);
|
||||
_update_project_buttons();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -658,6 +658,8 @@ void ProjectManager::_unhandled_input(const InputEvent& p_ev) {
|
||||
if (offset_diff > 0)
|
||||
scroll->set_v_scroll(scroll->get_v_scroll() - offset_diff);
|
||||
|
||||
_update_project_buttons();
|
||||
|
||||
break;
|
||||
|
||||
} else if (current==selected_list.back()->key()) {
|
||||
@@ -694,6 +696,8 @@ void ProjectManager::_unhandled_input(const InputEvent& p_ev) {
|
||||
if (offset_diff > 0)
|
||||
scroll->set_v_scroll(scroll->get_v_scroll() + offset_diff);
|
||||
|
||||
_update_project_buttons();
|
||||
|
||||
break;
|
||||
|
||||
} else if (current==selected_list.back()->key()) {
|
||||
@@ -714,12 +718,6 @@ void ProjectManager::_unhandled_input(const InputEvent& p_ev) {
|
||||
|
||||
if (scancode_handled) {
|
||||
accept_event();
|
||||
|
||||
for(int i=0;i<scroll_childs->get_child_count();i++) {
|
||||
CanvasItem *item = scroll_childs->get_child(i)->cast_to<CanvasItem>();
|
||||
if (item)
|
||||
item->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -897,14 +895,14 @@ void ProjectManager::_load_recent_projects() {
|
||||
|
||||
scroll_childs->add_child(hb);
|
||||
}
|
||||
|
||||
|
||||
for (Map<String,String>::Element *E = selected_list_copy.front();E;E = E->next()) {
|
||||
String key = E->key();
|
||||
selected_list.erase(key);
|
||||
}
|
||||
|
||||
|
||||
scroll->set_v_scroll(0);
|
||||
|
||||
|
||||
_update_project_buttons();
|
||||
|
||||
EditorSettings::get_singleton()->save();
|
||||
@@ -943,7 +941,7 @@ void ProjectManager::_open_project() {
|
||||
}
|
||||
|
||||
if (selected_list.size()>1) {
|
||||
multi_open_ask->set_text(TTR("Are you sure to open more than one projects?"));
|
||||
multi_open_ask->set_text(TTR("Are you sure to open more than one project?"));
|
||||
multi_open_ask->popup_centered_minsize();
|
||||
} else {
|
||||
_open_project_confirm();
|
||||
@@ -983,7 +981,7 @@ void ProjectManager::_run_project() {
|
||||
}
|
||||
|
||||
if (selected_list.size()>1) {
|
||||
multi_run_ask->set_text(TTR("Are you sure to run more than one projects?"));
|
||||
multi_run_ask->set_text(TTR("Are you sure to run more than one project?"));
|
||||
multi_run_ask->popup_centered_minsize();
|
||||
} else {
|
||||
_run_project_confirm();
|
||||
@@ -1367,9 +1365,9 @@ ProjectManager::ProjectManager() {
|
||||
multi_run_ask = memnew( ConfirmationDialog );
|
||||
multi_run_ask->get_ok()->set_text(TTR("Run"));
|
||||
multi_run_ask->get_ok()->connect("pressed", this, "_run_project_confirm");
|
||||
|
||||
|
||||
gui_base->add_child(multi_run_ask);
|
||||
|
||||
|
||||
multi_scan_ask = memnew( ConfirmationDialog );
|
||||
multi_scan_ask->get_ok()->set_text(TTR("Scan"));
|
||||
|
||||
|
@@ -2,4 +2,4 @@ short_name="godot"
|
||||
name="Godot Engine"
|
||||
major=2
|
||||
minor=1
|
||||
status="rc1"
|
||||
status="stable"
|
||||
|
Reference in New Issue
Block a user