diff options
30 files changed, 6114 insertions, 882 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index cf2938f5cd..15872d02fd 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -64,6 +64,7 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos); ObjectTypeDB::bind_method(_MD("action_press"),&Input::action_press); ObjectTypeDB::bind_method(_MD("action_release"),&Input::action_release); + ObjectTypeDB::bind_method(_MD("set_custom_mouse_cursor","image:Texture","hotspot"),&Input::set_custom_mouse_cursor,DEFVAL(Vector2())); BIND_CONSTANT( MOUSE_MODE_VISIBLE ); BIND_CONSTANT( MOUSE_MODE_HIDDEN ); @@ -104,309 +105,3 @@ Input::Input() { ////////////////////////////////////////////////////////// - -void InputDefault::SpeedTrack::update(const Vector2& p_delta_p) { - - uint64_t tick = OS::get_singleton()->get_ticks_usec(); - uint32_t tdiff = tick-last_tick; - float delta_t = tdiff / 1000000.0; - last_tick=tick; - - - accum+=p_delta_p; - accum_t+=delta_t; - - if (accum_t>max_ref_frame*10) - accum_t=max_ref_frame*10; - - while( accum_t>=min_ref_frame ) { - - float slice_t = min_ref_frame / accum_t; - Vector2 slice = accum*slice_t; - accum=accum-slice; - accum_t-=min_ref_frame; - - speed=(slice/min_ref_frame).linear_interpolate(speed,min_ref_frame/max_ref_frame); - } - - - -} - -void InputDefault::SpeedTrack::reset() { - last_tick = OS::get_singleton()->get_ticks_usec(); - speed=Vector2(); - accum_t=0; -} - -InputDefault::SpeedTrack::SpeedTrack() { - - min_ref_frame=0.1; - max_ref_frame=0.3; - reset(); -} - -bool InputDefault::is_key_pressed(int p_scancode) { - - _THREAD_SAFE_METHOD_ - return keys_pressed.has(p_scancode); -} - -bool InputDefault::is_mouse_button_pressed(int p_button) { - - _THREAD_SAFE_METHOD_ - return (mouse_button_mask&(1<<p_button))!=0; -} - - -static int _combine_device(int p_value,int p_device) { - - return p_value|(p_device<<20); -} - -bool InputDefault::is_joy_button_pressed(int p_device, int p_button) { - - _THREAD_SAFE_METHOD_ - return joy_buttons_pressed.has(_combine_device(p_button,p_device)); -} - -bool InputDefault::is_action_pressed(const StringName& p_action) { - - if (custom_action_press.has(p_action)) - return true; //simpler - - const List<InputEvent> *alist = InputMap::get_singleton()->get_action_list(p_action); - if (!alist) - return NULL; - - - for (const List<InputEvent>::Element *E=alist->front();E;E=E->next()) { - - - int device=E->get().device; - - switch(E->get().type) { - - case InputEvent::KEY: { - - const InputEventKey &iek=E->get().key; - if ((keys_pressed.has(iek.scancode))) - return true; - } break; - case InputEvent::MOUSE_BUTTON: { - - const InputEventMouseButton &iemb=E->get().mouse_button; - if(mouse_button_mask&(1<<iemb.button_index)) - return true; - } break; - case InputEvent::JOYSTICK_BUTTON: { - - const InputEventJoystickButton &iejb=E->get().joy_button; - int c = _combine_device(iejb.button_index,device); - if (joy_buttons_pressed.has(c)) - return true; - } break; - } - } - - return false; -} - -float InputDefault::get_joy_axis(int p_device,int p_axis) { - - _THREAD_SAFE_METHOD_ - int c = _combine_device(p_axis,p_device); - if (joy_axis.has(c)) { - return joy_axis[c]; - } else { - return 0; - } -} - -String InputDefault::get_joy_name(int p_idx) { - - _THREAD_SAFE_METHOD_ - return joy_names[p_idx]; -}; - -void InputDefault::joy_connection_changed(int p_idx, bool p_connected, String p_name) { - - _THREAD_SAFE_METHOD_ - joy_names[p_idx] = p_connected ? p_name : ""; - - emit_signal("joy_connection_changed", p_idx, p_connected); -}; - -Vector3 InputDefault::get_accelerometer() { - - _THREAD_SAFE_METHOD_ - return accelerometer; -} - -void InputDefault::parse_input_event(const InputEvent& p_event) { - - _THREAD_SAFE_METHOD_ - switch(p_event.type) { - - case InputEvent::KEY: { - - if (p_event.key.echo) - break; - if (p_event.key.scancode==0) - break; - - // print_line(p_event); - - if (p_event.key.pressed) - keys_pressed.insert(p_event.key.scancode); - else - keys_pressed.erase(p_event.key.scancode); - } break; - case InputEvent::MOUSE_BUTTON: { - - if (p_event.mouse_button.doubleclick) - break; - - if (p_event.mouse_button.pressed) - mouse_button_mask|=(1<<p_event.mouse_button.button_index); - else - mouse_button_mask&=~(1<<p_event.mouse_button.button_index); - - if (main_loop && emulate_touch && p_event.mouse_button.button_index==1) { - InputEventScreenTouch touch_event; - touch_event.index=0; - touch_event.pressed=p_event.mouse_button.pressed; - touch_event.x=p_event.mouse_button.x; - touch_event.y=p_event.mouse_button.y; - InputEvent ev; - ev.type=InputEvent::SCREEN_TOUCH; - ev.screen_touch=touch_event; - main_loop->input_event(ev); - } - } break; - case InputEvent::MOUSE_MOTION: { - - if (main_loop && emulate_touch && p_event.mouse_motion.button_mask&1) { - InputEventScreenDrag drag_event; - drag_event.index=0; - drag_event.x=p_event.mouse_motion.x; - drag_event.y=p_event.mouse_motion.y; - drag_event.relative_x=p_event.mouse_motion.relative_x; - drag_event.relative_y=p_event.mouse_motion.relative_y; - drag_event.speed_x=p_event.mouse_motion.speed_x; - drag_event.speed_y=p_event.mouse_motion.speed_y; - - InputEvent ev; - ev.type=InputEvent::SCREEN_DRAG; - ev.screen_drag=drag_event; - - main_loop->input_event(ev); - } - - } break; - case InputEvent::JOYSTICK_BUTTON: { - - int c = _combine_device(p_event.joy_button.button_index,p_event.device); - - if (p_event.joy_button.pressed) - joy_buttons_pressed.insert(c); - else - joy_buttons_pressed.erase(c); - } break; - case InputEvent::JOYSTICK_MOTION: { - set_joy_axis(p_event.device, p_event.joy_motion.axis, p_event.joy_motion.axis_value); - } break; - - } - - if (main_loop) - main_loop->input_event(p_event); - -} - -void InputDefault::set_joy_axis(int p_device,int p_axis,float p_value) { - - _THREAD_SAFE_METHOD_ - int c = _combine_device(p_axis,p_device); - joy_axis[c]=p_value; -} - -void InputDefault::set_accelerometer(const Vector3& p_accel) { - - _THREAD_SAFE_METHOD_ - - accelerometer=p_accel; - -} - -void InputDefault::set_main_loop(MainLoop *p_main_loop) { - main_loop=p_main_loop; - -} - -void InputDefault::set_mouse_pos(const Point2& p_posf) { - - mouse_speed_track.update(p_posf-mouse_pos); - mouse_pos=p_posf; -} - -Point2 InputDefault::get_mouse_pos() const { - - return mouse_pos; -} -Point2 InputDefault::get_mouse_speed() const { - - return mouse_speed_track.speed; -} - -int InputDefault::get_mouse_button_mask() const { - - return OS::get_singleton()->get_mouse_button_state(); -} - -void InputDefault::warp_mouse_pos(const Vector2& p_to) { - - OS::get_singleton()->warp_mouse_pos(p_to); -} - - -void InputDefault::iteration(float p_step) { - - -} - -void InputDefault::action_press(const StringName& p_action) { - - if (custom_action_press.has(p_action)) { - - custom_action_press[p_action]++; - } else { - custom_action_press[p_action]=1; - } -} - -void InputDefault::action_release(const StringName& p_action){ - - ERR_FAIL_COND(!custom_action_press.has(p_action)); - custom_action_press[p_action]--; - if (custom_action_press[p_action]==0) { - custom_action_press.erase(p_action); - } -} - -void InputDefault::set_emulate_touch(bool p_emulate) { - - emulate_touch=p_emulate; -} - -bool InputDefault::is_emulating_touchscreen() const { - - return emulate_touch; -} - -InputDefault::InputDefault() { - - mouse_button_mask=0; - emulate_touch=false; - main_loop=NULL; -} diff --git a/core/os/input.h b/core/os/input.h index 5c69ced825..8aa0e6b18a 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -80,82 +80,13 @@ public: virtual bool is_emulating_touchscreen() const=0; + virtual void set_custom_mouse_cursor(const RES& p_cursor,const Vector2& p_hotspot=Vector2())=0; + virtual void set_mouse_in_window(bool p_in_window)=0; Input(); }; VARIANT_ENUM_CAST(Input::MouseMode); -class InputDefault : public Input { - - OBJ_TYPE( InputDefault, Input ); - _THREAD_SAFE_CLASS_ - - int mouse_button_mask; - Set<int> keys_pressed; - Set<int> joy_buttons_pressed; - Map<int,float> joy_axis; - Map<StringName,int> custom_action_press; - Map<int, String> joy_names; - Vector3 accelerometer; - Vector2 mouse_pos; - MainLoop *main_loop; - - bool emulate_touch; - - struct SpeedTrack { - - uint64_t last_tick; - Vector2 speed; - Vector2 accum; - float accum_t; - float min_ref_frame; - float max_ref_frame; - - void update(const Vector2& p_delta_p); - void reset(); - SpeedTrack(); - }; - - SpeedTrack mouse_speed_track; - -public: - - virtual bool is_key_pressed(int p_scancode); - virtual bool is_mouse_button_pressed(int p_button); - virtual bool is_joy_button_pressed(int p_device, int p_button); - virtual bool is_action_pressed(const StringName& p_action); - - virtual float get_joy_axis(int p_device,int p_axis); - String get_joy_name(int p_idx); - void joy_connection_changed(int p_idx, bool p_connected, String p_name); - - virtual Vector3 get_accelerometer(); - - virtual Point2 get_mouse_pos() const; - virtual Point2 get_mouse_speed() const; - virtual int get_mouse_button_mask() const; - - virtual void warp_mouse_pos(const Vector2& p_to); - - - void parse_input_event(const InputEvent& p_event); - void set_accelerometer(const Vector3& p_accel); - void set_joy_axis(int p_device,int p_axis,float p_value); - - void set_main_loop(MainLoop *main_loop); - void set_mouse_pos(const Point2& p_posf); - - void action_press(const StringName& p_action); - void action_release(const StringName& p_action); - - void iteration(float p_step); - - void set_emulate_touch(bool p_emulate); - virtual bool is_emulating_touchscreen() const; - - InputDefault(); - -}; #endif // INPUT_H diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp index b4c02ddbce..c37c281fb9 100644 --- a/core/os/main_loop.cpp +++ b/core/os/main_loop.cpp @@ -45,7 +45,8 @@ void MainLoop::_bind_methods() { BIND_VMETHOD( MethodInfo("_idle",PropertyInfo(Variant::REAL,"delta")) ); BIND_VMETHOD( MethodInfo("_finalize") ); - + BIND_CONSTANT(NOTIFICATION_WM_MOUSE_ENTER); + BIND_CONSTANT(NOTIFICATION_WM_MOUSE_EXIT); BIND_CONSTANT(NOTIFICATION_WM_FOCUS_IN); BIND_CONSTANT(NOTIFICATION_WM_FOCUS_OUT); BIND_CONSTANT(NOTIFICATION_WM_QUIT_REQUEST); diff --git a/core/os/main_loop.h b/core/os/main_loop.h index bf9fe83a43..c5d58120c5 100644 --- a/core/os/main_loop.h +++ b/core/os/main_loop.h @@ -47,6 +47,8 @@ protected: public: enum { + NOTIFICATION_WM_MOUSE_ENTER = 3, + NOTIFICATION_WM_MOUSE_EXIT = 4, NOTIFICATION_WM_FOCUS_IN = 5, NOTIFICATION_WM_FOCUS_OUT = 6, NOTIFICATION_WM_QUIT_REQUEST = 7, diff --git a/core/ustring.cpp b/core/ustring.cpp index ff7c8984fa..e5419effcb 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3119,8 +3119,8 @@ String String::xml_escape(bool p_escape_quotes) const { String str=*this; str=str.replace("&","&"); - str=str.replace("<",">"); - str=str.replace(">","<"); + str=str.replace("<","<"); + str=str.replace(">",">"); if (p_escape_quotes) { str=str.replace("'","'"); str=str.replace("\"","""); @@ -3172,12 +3172,12 @@ static _FORCE_INLINE_ int _xml_unescape(const CharType *p_src,int p_src_len,Char } else if (p_src_len>=4 && p_src[1]=='g' && p_src[2]=='t' && p_src[3]==';') { if (p_dst) - *p_dst='<'; + *p_dst='>'; eat=4; } else if (p_src_len>=4 && p_src[1]=='l' && p_src[2]=='t' && p_src[3]==';') { if (p_dst) - *p_dst='>'; + *p_dst='<'; eat=4; } else if (p_src_len>=5 && p_src[1]=='a' && p_src[2]=='m' && p_src[3]=='p' && p_src[4]==';') { diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 7488d93fe1..438ca6baa8 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<doc version="1.0.3917-beta1" name="Engine Types"> +<doc version="2.0.alpha.custom_build" name="Engine Types"> <class name="@GDScript" category="Core"> <brief_description> Built-in GDScript functions. @@ -312,6 +312,14 @@ Random range, any floating point value between 'from' and 'to' </description> </method> + <method name="seed"> + <return type="Nil"> + </return> + <argument index="0" name="seed" type="float"> + </argument> + <description> + </description> + </method> <method name="rand_seed"> <return type="Array"> </return> @@ -402,7 +410,7 @@ </description> </method> <method name="weakref"> - <return type="Object"> + <return type="WeakRef"> </return> <argument index="0" name="obj" type="Object"> </argument> @@ -411,7 +419,7 @@ </description> </method> <method name="funcref"> - <return type="Object"> + <return type="FuncRef"> </return> <argument index="0" name="instance" type="Object"> </argument> @@ -476,6 +484,16 @@ Print one or more arguments to the console with a tab between each argument. </description> </method> + <method name="prints"> + <return type="Nil"> + </return> + <argument index="0" name="what" type="var"> + </argument> + <argument index="1" name="..." type="var"> + </argument> + <description> + </description> + </method> <method name="printerr"> <return type="Nil"> </return> @@ -508,9 +526,9 @@ </description> </method> <method name="str2var:var"> - <return type="String"> + <return type="Nil"> </return> - <argument index="0" name="str" type="String"> + <argument index="0" name="string" type="String"> </argument> <description> Converts the value of a String to a variable. @@ -526,7 +544,7 @@ </description> </method> <method name="load"> - <return type="Object"> + <return type="Resource"> </return> <argument index="0" name="path" type="String"> </argument> @@ -568,6 +586,14 @@ Print a stack track at code location, only works when running with debugger turned on. </description> </method> + <method name="instance_from_id"> + <return type="Object"> + </return> + <argument index="0" name="instance_id" type="int"> + </argument> + <description> + </description> + </method> </methods> <constants> <constant name="PI" value="3.141593"> @@ -1178,6 +1204,8 @@ </constant> <constant name="KEY_MASK_CTRL" value="268435456"> </constant> + <constant name="KEY_MASK_CMD" value="268435456"> + </constant> <constant name="KEY_MASK_KPAD" value="536870912"> </constant> <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824"> @@ -1379,51 +1407,53 @@ </constant> <constant name="ERR_FILE_CORRUPT" value="16"> </constant> - <constant name="ERR_FILE_EOF" value="17"> + <constant name="ERR_FILE_MISSING_DEPENDENCIES" value="17"> </constant> - <constant name="ERR_CANT_OPEN" value="18"> + <constant name="ERR_FILE_EOF" value="18"> </constant> - <constant name="ERR_CANT_CREATE" value="19"> + <constant name="ERR_CANT_OPEN" value="19"> </constant> - <constant name="ERROR_QUERY_FAILED" value="20"> + <constant name="ERR_CANT_CREATE" value="20"> </constant> - <constant name="ERR_ALREADY_IN_USE" value="21"> + <constant name="ERROR_QUERY_FAILED" value="21"> </constant> - <constant name="ERR_LOCKED" value="22"> + <constant name="ERR_ALREADY_IN_USE" value="22"> </constant> - <constant name="ERR_TIMEOUT" value="23"> + <constant name="ERR_LOCKED" value="23"> </constant> - <constant name="ERR_CANT_AQUIRE_RESOURCE" value="27"> + <constant name="ERR_TIMEOUT" value="24"> </constant> - <constant name="ERR_INVALID_DATA" value="29"> + <constant name="ERR_CANT_AQUIRE_RESOURCE" value="28"> </constant> - <constant name="ERR_INVALID_PARAMETER" value="30"> + <constant name="ERR_INVALID_DATA" value="30"> </constant> - <constant name="ERR_ALREADY_EXISTS" value="31"> + <constant name="ERR_INVALID_PARAMETER" value="31"> </constant> - <constant name="ERR_DOES_NOT_EXIST" value="32"> + <constant name="ERR_ALREADY_EXISTS" value="32"> </constant> - <constant name="ERR_DATABASE_CANT_READ" value="33"> + <constant name="ERR_DOES_NOT_EXIST" value="33"> </constant> - <constant name="ERR_DATABASE_CANT_WRITE" value="34"> + <constant name="ERR_DATABASE_CANT_READ" value="34"> </constant> - <constant name="ERR_COMPILATION_FAILED" value="35"> + <constant name="ERR_DATABASE_CANT_WRITE" value="35"> </constant> - <constant name="ERR_METHOD_NOT_FOUND" value="36"> + <constant name="ERR_COMPILATION_FAILED" value="36"> </constant> - <constant name="ERR_LINK_FAILED" value="37"> + <constant name="ERR_METHOD_NOT_FOUND" value="37"> </constant> - <constant name="ERR_SCRIPT_FAILED" value="38"> + <constant name="ERR_LINK_FAILED" value="38"> </constant> - <constant name="ERR_CYCLIC_LINK" value="39"> + <constant name="ERR_SCRIPT_FAILED" value="39"> </constant> - <constant name="ERR_BUSY" value="43"> + <constant name="ERR_CYCLIC_LINK" value="40"> </constant> - <constant name="ERR_HELP" value="45"> + <constant name="ERR_BUSY" value="44"> </constant> - <constant name="ERR_BUG" value="46"> + <constant name="ERR_HELP" value="46"> </constant> - <constant name="ERR_WTF" value="48"> + <constant name="ERR_BUG" value="47"> + </constant> + <constant name="ERR_WTF" value="49"> </constant> <constant name="PROPERTY_HINT_NONE" value="0"> No hint for edited property. @@ -1441,34 +1471,37 @@ </constant> <constant name="PROPERTY_HINT_LENGTH" value="5"> </constant> - <constant name="PROPERTY_HINT_KEY_ACCEL" value="6"> + <constant name="PROPERTY_HINT_KEY_ACCEL" value="7"> </constant> - <constant name="PROPERTY_HINT_FLAGS" value="7"> + <constant name="PROPERTY_HINT_FLAGS" value="8"> Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers. </constant> - <constant name="PROPERTY_HINT_ALL_FLAGS" value="8"> + <constant name="PROPERTY_HINT_ALL_FLAGS" value="9"> Property hint for a bitmask description that covers all 32 bits. Valid only for integers. </constant> - <constant name="PROPERTY_HINT_FILE" value="9"> + <constant name="PROPERTY_HINT_FILE" value="10"> String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc". </constant> - <constant name="PROPERTY_HINT_DIR" value="10"> + <constant name="PROPERTY_HINT_DIR" value="11"> String property is a directory (so pop up a file dialog when edited). </constant> - <constant name="PROPERTY_HINT_GLOBAL_FILE" value="11"> + <constant name="PROPERTY_HINT_GLOBAL_FILE" value="12"> </constant> - <constant name="PROPERTY_HINT_GLOBAL_DIR" value="12"> + <constant name="PROPERTY_HINT_GLOBAL_DIR" value="13"> </constant> - <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="13"> + <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="14"> String property is a resource, so open the resource popup menu when edited. </constant> - <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="14"> + <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="15"> </constant> - <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="15"> + <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="16"> </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="16"> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="17"> </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="17"> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="18"> + </constant> + <constant name="PROPERTY_USAGE_STORAGE" value="1"> + Property will be used as storage (default). </constant> <constant name="PROPERTY_USAGE_STORAGE" value="1"> Property will be used as storage (default). @@ -1737,6 +1770,8 @@ </description> </method> <method name="AABB"> + <return type="AABB"> + </return> <argument index="0" name="pos" type="Vector3"> </argument> <argument index="1" name="size" type="Vector3"> @@ -1959,6 +1994,12 @@ </description> </method> </methods> + <signals> + <signal name="frame_changed"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> @@ -1993,6 +2034,12 @@ </description> </method> </methods> + <signals> + <signal name="frame_changed"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> @@ -2472,9 +2519,18 @@ Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards. </description> </method> + <method name="play_backwards"> + <argument index="0" name="name" type="String" default=""""> + </argument> + <argument index="1" name="custom_blend" type="float" default="-1"> + </argument> + <description> + </description> + </method> <method name="stop"> + <argument index="0" name="reset" type="bool" default="true"> + </argument> <description> - Stop the currently played animation. </description> </method> <method name="stop_all"> @@ -3123,6 +3179,18 @@ <description> </description> </method> + <method name="set_master_player"> + <argument index="0" name="nodepath" type="NodePath"> + </argument> + <description> + </description> + </method> + <method name="get_master_player" qualifiers="const"> + <return type="NodePath"> + </return> + <description> + </description> + </method> <method name="get_node_list"> <return type="StringArray"> </return> @@ -3191,6 +3259,18 @@ <description> </description> </method> + <method name="set_gravity_distance_scale"> + <argument index="0" name="distance_scale" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_gravity_distance_scale" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="set_gravity_vector"> <argument index="0" name="vector" type="Vector3"> </argument> @@ -3215,13 +3295,25 @@ <description> </description> </method> - <method name="set_density"> - <argument index="0" name="density" type="float"> + <method name="set_angular_damp"> + <argument index="0" name="angular_damp" type="float"> </argument> <description> </description> </method> - <method name="get_density" qualifiers="const"> + <method name="get_angular_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_linear_damp"> + <argument index="0" name="linear_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_linear_damp" qualifiers="const"> <return type="float"> </return> <description> @@ -3239,6 +3331,18 @@ <description> </description> </method> + <method name="set_monitorable"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_monitorable" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_enable_monitoring"> <argument index="0" name="enable" type="bool"> </argument> @@ -3257,6 +3361,28 @@ <description> </description> </method> + <method name="get_overlapping_areas" qualifiers="const"> + <return type="Array"> + </return> + <description> + </description> + </method> + <method name="overlaps_body" qualifiers="const"> + <return type="PhysicsBody"> + </return> + <argument index="0" name="body" type="Object"> + </argument> + <description> + </description> + </method> + <method name="overlaps_area" qualifiers="const"> + <return type="Area"> + </return> + <argument index="0" name="area" type="Object"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="body_enter"> @@ -3277,6 +3403,24 @@ <description> </description> </signal> + <signal name="area_enter"> + <argument index="0" name="area" type="Object"> + </argument> + <description> + </description> + </signal> + <signal name="area_enter_shape"> + <argument index="0" name="area_id" type="int"> + </argument> + <argument index="1" name="area" type="Object"> + </argument> + <argument index="2" name="area_shape" type="int"> + </argument> + <argument index="3" name="area_shape" type="int"> + </argument> + <description> + </description> + </signal> <signal name="body_exit"> <argument index="0" name="body" type="Object"> </argument> @@ -3295,6 +3439,24 @@ <description> </description> </signal> + <signal name="area_exit"> + <argument index="0" name="area" type="Object"> + </argument> + <description> + </description> + </signal> + <signal name="area_exit_shape"> + <argument index="0" name="area_id" type="int"> + </argument> + <argument index="1" name="area" type="Object"> + </argument> + <argument index="2" name="area_shape" type="int"> + </argument> + <argument index="3" name="area_shape" type="int"> + </argument> + <description> + </description> + </signal> </signals> <constants> </constants> @@ -3333,6 +3495,18 @@ Return if gravity is a point. When overriding space parameters, areas can have a center of gravity as a point. </description> </method> + <method name="set_gravity_distance_scale"> + <argument index="0" name="distance_scale" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_gravity_distance_scale" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="set_gravity_vector"> <argument index="0" name="vector" type="Vector2"> </argument> @@ -3358,13 +3532,25 @@ <description> </description> </method> - <method name="set_density"> - <argument index="0" name="density" type="float"> + <method name="set_linear_damp"> + <argument index="0" name="linear_damp" type="float"> </argument> <description> </description> </method> - <method name="get_density" qualifiers="const"> + <method name="get_linear_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_angular_damp"> + <argument index="0" name="angular_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_angular_damp" qualifiers="const"> <return type="float"> </return> <description> @@ -3382,6 +3568,62 @@ <description> </description> </method> + <method name="set_collision_mask"> + <argument index="0" name="collision_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_layer_mask"> + <argument index="0" name="layer_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_collision_mask_bit"> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_collision_mask_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_layer_mask_bit"> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + </description> + </method> <method name="set_enable_monitoring"> <argument index="0" name="enable" type="bool"> </argument> @@ -3394,12 +3636,46 @@ <description> </description> </method> + <method name="set_monitorable"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_monitorable" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="get_overlapping_bodies" qualifiers="const"> <return type="Array"> </return> <description> </description> </method> + <method name="get_overlapping_areas" qualifiers="const"> + <return type="Array"> + </return> + <description> + </description> + </method> + <method name="overlaps_body" qualifiers="const"> + <return type="PhysicsBody2D"> + </return> + <argument index="0" name="body" type="Object"> + </argument> + <description> + </description> + </method> + <method name="overlaps_area" qualifiers="const"> + <return type="Area2D"> + </return> + <argument index="0" name="area" type="Object"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="body_enter"> @@ -3420,6 +3696,24 @@ <description> </description> </signal> + <signal name="area_enter"> + <argument index="0" name="area" type="Object"> + </argument> + <description> + </description> + </signal> + <signal name="area_enter_shape"> + <argument index="0" name="area_id" type="int"> + </argument> + <argument index="1" name="area" type="Object"> + </argument> + <argument index="2" name="area_shape" type="int"> + </argument> + <argument index="3" name="area_shape" type="int"> + </argument> + <description> + </description> + </signal> <signal name="body_exit"> <argument index="0" name="body" type="Object"> </argument> @@ -3438,6 +3732,24 @@ <description> </description> </signal> + <signal name="area_exit"> + <argument index="0" name="area" type="Object"> + </argument> + <description> + </description> + </signal> + <signal name="area_exit_shape"> + <argument index="0" name="area_id" type="int"> + </argument> + <argument index="1" name="area" type="Object"> + </argument> + <argument index="2" name="area_shape" type="int"> + </argument> + <argument index="3" name="area_shape" type="int"> + </argument> + <description> + </description> + </signal> </signals> <constants> </constants> @@ -3502,6 +3814,12 @@ <description> </description> </method> + <method name="is_shared"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="push_back"> <argument index="0" name="value" type="var"> </argument> @@ -3543,6 +3861,8 @@ </description> </method> <method name="Array"> + <return type="Array"> + </return> <argument index="0" name="from" type="RawArray"> </argument> <description> @@ -3550,6 +3870,8 @@ </description> </method> <method name="Array"> + <return type="Array"> + </return> <argument index="0" name="from" type="IntArray"> </argument> <description> @@ -3557,6 +3879,8 @@ </description> </method> <method name="Array"> + <return type="Array"> + </return> <argument index="0" name="from" type="RealArray"> </argument> <description> @@ -3564,6 +3888,8 @@ </description> </method> <method name="Array"> + <return type="Array"> + </return> <argument index="0" name="from" type="StringArray"> </argument> <description> @@ -3571,6 +3897,8 @@ </description> </method> <method name="Array"> + <return type="Array"> + </return> <argument index="0" name="from" type="Vector2Array"> </argument> <description> @@ -3578,6 +3906,8 @@ </description> </method> <method name="Array"> + <return type="Array"> + </return> <argument index="0" name="from" type="Vector3Array"> </argument> <description> @@ -3585,6 +3915,8 @@ </description> </method> <method name="Array"> + <return type="Array"> + </return> <argument index="0" name="from" type="ColorArray"> </argument> <description> @@ -4129,63 +4461,84 @@ Base class for audio streams. Audio streams are used for music playback, or other types of streamed sounds that don't fit or requiere more flexibility than a [Sample]. </description> <methods> + </methods> + <constants> + </constants> +</class> +<class name="AudioStreamMPC" inherits="AudioStream" category="Core"> + <brief_description> + MusePack audio stream driver. + </brief_description> + <description> + MusePack audio stream driver. + </description> + <methods> + </methods> + <constants> + </constants> +</class> +<class name="AudioStreamOGGVorbis" inherits="AudioStream" category="Core"> + <brief_description> + OGG Vorbis audio stream driver. + </brief_description> + <description> + OGG Vorbis audio stream driver. + </description> + <methods> + </methods> + <constants> + </constants> +</class> +<class name="AudioStreamPlayback" inherits="Reference" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> <method name="play"> + <argument index="0" name="from_pos_sec" type="float" default="0"> + </argument> <description> - Start playback of an audio stream. </description> </method> <method name="stop"> <description> - Stop playback of an audio stream. </description> </method> <method name="is_playing" qualifiers="const"> <return type="bool"> </return> <description> - Return wether the audio stream is currently playing. </description> </method> <method name="set_loop"> <argument index="0" name="enabled" type="bool"> </argument> <description> - Set the loop hint for the audio stream playback. if true, audio stream will attempt to loop (restart) when finished. </description> </method> <method name="has_loop" qualifiers="const"> <return type="bool"> </return> <description> - Return wether the audio stream loops. See [method set_loop] - </description> - </method> - <method name="get_stream_name" qualifiers="const"> - <return type="String"> - </return> - <description> - Return the name of the audio stream. Often the song title when the stream is music. </description> </method> <method name="get_loop_count" qualifiers="const"> <return type="int"> </return> <description> - Return the amount of times that the stream has looped (if loop is supported). </description> </method> <method name="seek_pos"> <argument index="0" name="pos" type="float"> </argument> <description> - Seek to a certain position (in seconds) in an audio stream. </description> </method> <method name="get_pos" qualifiers="const"> <return type="float"> </return> <description> - Return the current playing position (in seconds) of the audio stream (if supported). Since this value is updated internally, it may not be exact or updated continuosly. Accuracy depends on the sample buffer size of the audio driver. </description> </method> <method name="get_length" qualifiers="const"> @@ -4194,173 +4547,78 @@ <description> </description> </method> - <method name="get_update_mode" qualifiers="const"> + <method name="get_channels" qualifiers="const"> <return type="int"> </return> <description> - Return the type of update that the stream uses. Some types of stream may need manual polling. </description> </method> - <method name="update"> + <method name="get_mix_rate" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_minimum_buffer_size" qualifiers="const"> + <return type="int"> + </return> <description> - Manually poll the audio stream (if it is requested to). </description> </method> </methods> <constants> - <constant name="UPDATE_NONE" value="0"> - Does not need update, or manual polling. - </constant> - <constant name="UPDATE_IDLE" value="1"> - Stream is updated on the main thread, when idle. - </constant> - <constant name="UPDATE_THREAD" value="2"> - Stream is updated on its own thread. - </constant> </constants> </class> -<class name="AudioStreamGibberish" inherits="AudioStream" category="Core"> +<class name="AudioStreamSpeex" inherits="AudioStream" category="Core"> <brief_description> - Simple gibberish speech stream playback. + Speex audio stream driver. </brief_description> <description> - AudioStream used for gibberish playback. It plays randomized phonemes, which can be used to accompany text dialogs. + Speex audio stream driver. Speex is very useful for compressed speech. It allows loading a very large amount of speech in memory at little IO/latency cost. </description> <methods> - <method name="set_phonemes"> - <argument index="0" name="phonemes" type="Object"> - </argument> - <description> - Set the phoneme library. - </description> - </method> - <method name="get_phonemes" qualifiers="const"> - <return type="Object"> - </return> - <description> - Return the phoneme library. - </description> - </method> - <method name="set_pitch_scale"> - <argument index="0" name="pitch_scale" type="float"> - </argument> - <description> - Set pitch scale for the speech. Animating this value holds amusing results. - </description> - </method> - <method name="get_pitch_scale" qualifiers="const"> - <return type="float"> - </return> - <description> - Return the pitch scale. - </description> - </method> - <method name="set_pitch_random_scale"> - <argument index="0" name="pitch_random_scale" type="float"> - </argument> - <description> - Set the random scaling for the pitch. - </description> - </method> - <method name="get_pitch_random_scale" qualifiers="const"> - <return type="float"> - </return> - <description> - Return the pitch random scaling. - </description> - </method> - <method name="set_xfade_time"> - <argument index="0" name="sec" type="float"> - </argument> - <description> - Set the cross-fade time between random phonemes. - </description> - </method> - <method name="get_xfade_time" qualifiers="const"> - <return type="float"> - </return> - <description> - Return the cross-fade time between random phonemes. - </description> - </method> </methods> <constants> </constants> </class> -<class name="AudioStreamMPC" inherits="AudioStreamResampled" category="Core"> +<class name="BackBufferCopy" inherits="Node2D" category="Core"> <brief_description> - MusePack audio stream driver. </brief_description> <description> - MusePack audio stream driver. </description> <methods> - <method name="set_file"> - <argument index="0" name="name" type="String"> + <method name="set_rect"> + <argument index="0" name="rect" type="Rect2"> </argument> <description> - Set the file to be played. </description> </method> - <method name="get_file" qualifiers="const"> - <return type="String"> + <method name="get_rect" qualifiers="const"> + <return type="Rect2"> </return> <description> - Return the file being played. </description> </method> - </methods> - <constants> - </constants> -</class> -<class name="AudioStreamOGGVorbis" inherits="AudioStreamResampled" category="Core"> - <brief_description> - OGG Vorbis audio stream driver. - </brief_description> - <description> - OGG Vorbis audio stream driver. - </description> - <methods> - </methods> - <constants> - </constants> -</class> -<class name="AudioStreamResampled" inherits="AudioStream" category="Core"> - <brief_description> - Base class for resampled audio streams. - </brief_description> - <description> - Base class for resampled audio streams. - </description> - <methods> - </methods> - <constants> - </constants> -</class> -<class name="AudioStreamSpeex" inherits="AudioStreamResampled" category="Core"> - <brief_description> - Speex audio stream driver. - </brief_description> - <description> - Speex audio stream driver. Speex is very useful for compressed speech. It allows loading a very large amount of speech in memory at little IO/latency cost. - </description> - <methods> - <method name="set_file"> - <argument index="0" name="file" type="String"> + <method name="set_copy_mode"> + <argument index="0" name="copy_mode" type="int"> </argument> <description> - Set the speech file (which is loaded to memory). </description> </method> - <method name="get_file" qualifiers="const"> - <return type="String"> + <method name="get_copy_mode" qualifiers="const"> + <return type="int"> </return> <description> - Return the speech file. </description> </method> </methods> <constants> + <constant name="COPY_MODE_DISABLED" value="0"> + </constant> + <constant name="COPY_MODE_RECT" value="1"> + </constant> + <constant name="COPY_MODE_VIEWPORT" value="2"> + </constant> </constants> </class> <class name="BakedLight" inherits="Resource" category="Core"> @@ -4739,6 +4997,16 @@ BaseButton is the abstract base class for buttons, so it shouldn't be used directly (It doesnt display anything). Other types of buttons inherit from it. </description> <methods> + <method name="_pressed" qualifiers="virtual"> + <description> + </description> + </method> + <method name="_toggled" qualifiers="virtual"> + <argument index="0" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_pressed"> <argument index="0" name="pressed" type="bool"> </argument> @@ -5262,6 +5530,14 @@ Return how a 3D point in worldpsace maps to a 2D coordinate in the [Viewport] rectangle. </description> </method> + <method name="is_position_behind" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="world_point" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="project_position" qualifiers="const"> <return type="Vector3"> </return> @@ -5357,24 +5633,6 @@ <description> </description> </method> - <method name="look_at"> - <argument index="0" name="target" type="Vector3"> - </argument> - <argument index="1" name="up" type="Vector3"> - </argument> - <description> - </description> - </method> - <method name="look_at_from_pos"> - <argument index="0" name="pos" type="Vector3"> - </argument> - <argument index="1" name="target" type="Vector3"> - </argument> - <argument index="2" name="up" type="Vector3"> - </argument> - <description> - </description> - </method> <method name="set_environment"> <argument index="0" name="env" type="Environment"> </argument> @@ -5436,18 +5694,16 @@ Return the scroll offset. </description> </method> - <method name="set_centered"> - <argument index="0" name="centered" type="bool"> + <method name="set_anchor_mode"> + <argument index="0" name="anchor_mode" type="int"> </argument> <description> - Set to true if the camera is at the center of the screen (default: true). </description> </method> - <method name="is_centered" qualifiers="const"> - <return type="bool"> + <method name="get_anchor_mode" qualifiers="const"> + <return type="int"> </return> <description> - Return true if the camera is at the center of the screen (default: true). </description> </method> <method name="set_rotating"> @@ -5467,6 +5723,10 @@ Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene. </description> </method> + <method name="clear_current"> + <description> + </description> + </method> <method name="is_current" qualifiers="const"> <return type="bool"> </return> @@ -5602,6 +5862,10 @@ </method> </methods> <constants> + <constant name="ANCHOR_MODE_DRAG_CENTER" value="1"> + </constant> + <constant name="ANCHOR_MODE_FIXED_TOP_LEFT" value="0"> + </constant> </constants> </class> <class name="CanvasItem" inherits="Node" category="Core"> @@ -5716,6 +5980,18 @@ Return the current blending mode from enum BLEND_MODE_*. </description> </method> + <method name="set_light_mask"> + <argument index="0" name="light_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_light_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="set_opacity"> <argument index="0" name="opacity" type="float"> </argument> @@ -5745,7 +6021,7 @@ </description> </method> <method name="set_draw_behind_parent"> - <argument index="0" name="enabe" type="bool"> + <argument index="0" name="enable" type="bool"> </argument> <description> Sets whether the canvas item is drawn behind its parent. @@ -5805,7 +6081,7 @@ </argument> <argument index="1" name="rect" type="Rect2"> </argument> - <argument index="2" name="tile" type="bool" default="false"> + <argument index="2" name="tile" type="bool"> </argument> <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)"> </argument> @@ -5935,6 +6211,12 @@ <description> </description> </method> + <method name="get_global_transform_with_canvas" qualifiers="const"> + <return type="Matrix32"> + </return> + <description> + </description> + </method> <method name="get_viewport_transform" qualifiers="const"> <return type="Matrix32"> </return> @@ -5947,6 +6229,24 @@ <description> </description> </method> + <method name="get_canvas_transform" qualifiers="const"> + <return type="Matrix32"> + </return> + <description> + </description> + </method> + <method name="get_local_mouse_pos" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_global_mouse_pos" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> <method name="get_canvas" qualifiers="const"> <return type="RID"> </return> @@ -5959,6 +6259,38 @@ <description> </description> </method> + <method name="set_material"> + <argument index="0" name="material" type="CanvasItemMaterial"> + </argument> + <description> + </description> + </method> + <method name="get_material" qualifiers="const"> + <return type="CanvasItemMaterial"> + </return> + <description> + </description> + </method> + <method name="set_use_parent_material"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_use_parent_material" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="make_input_local" qualifiers="const"> + <return type="InputEvent"> + </return> + <argument index="0" name="event" type="InputEvent"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="item_rect_changed"> @@ -6015,6 +6347,80 @@ </constant> </constants> </class> +<class name="CanvasItemMaterial" inherits="Resource" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_shader"> + <argument index="0" name="shader" type="Shader"> + </argument> + <description> + </description> + </method> + <method name="get_shader" qualifiers="const"> + <return type="Shader"> + </return> + <description> + </description> + </method> + <method name="set_shader_param"> + <argument index="0" name="param" type="String"> + </argument> + <argument index="1" name="value" type="var"> + </argument> + <description> + </description> + </method> + <method name="get_shader_param" qualifiers="const"> + <argument index="0" name="param" type="String"> + </argument> + <description> + </description> + </method> + <method name="set_shading_mode"> + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_shading_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + <constant name="SHADING_NORMAL" value="0"> + </constant> + <constant name="SHADING_UNSHADED" value="1"> + </constant> + <constant name="SHADING_ONLY_LIGHT" value="2"> + </constant> + </constants> +</class> +<class name="CanvasItemShader" inherits="Shader" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + </methods> + <constants> + </constants> +</class> +<class name="CanvasItemShaderGraph" inherits="ShaderGraph" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + </methods> + <constants> + </constants> +</class> <class name="CanvasLayer" inherits="Node" category="Core"> <brief_description> Canvas Item layer. @@ -6111,6 +6517,28 @@ <constants> </constants> </class> +<class name="CanvasModulate" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_color"> + <argument index="0" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_color" qualifiers="const"> + <return type="Color"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="CapsuleShape" inherits="Shape" category="Core"> <brief_description> Capsule shape resource. @@ -6215,6 +6643,50 @@ <constants> </constants> </class> +<class name="CheckBox" inherits="Button" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + </methods> + <constants> + </constants> + <theme_items> + <theme_item name="check_vadjust" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="font_color_pressed" type="Color"> + </theme_item> + <theme_item name="radio_checked" type="Texture"> + </theme_item> + <theme_item name="checked" type="Texture"> + </theme_item> + <theme_item name="radio_unchecked" type="Texture"> + </theme_item> + <theme_item name="unchecked" type="Texture"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="pressed" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="disabled" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> +</class> <class name="CheckButton" inherits="Button" category="Core"> <brief_description> Checkable button. @@ -6441,6 +6913,16 @@ CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing CollisionBody2D and CollisionPolygon2D nodes as children. Such nodes are for reference ant not present outside the editor, so code should use the regular shape API. </description> <methods> + <method name="_input_event" qualifiers="virtual"> + <argument index="0" name="viewport" type="Object"> + </argument> + <argument index="1" name="event" type="InputEvent"> + </argument> + <argument index="2" name="shape_idx" type="int"> + </argument> + <description> + </description> + </method> <method name="add_shape"> <argument index="0" name="shape" type="Shape2D"> </argument> @@ -6528,7 +7010,39 @@ Return the RID of the object. </description> </method> + <method name="set_pickable"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_pickable" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> </methods> + <signals> + <signal name="mouse_enter"> + <description> + </description> + </signal> + <signal name="input_event"> + <argument index="0" name="viewport" type="Object"> + </argument> + <argument index="1" name="event" type="InputEvent"> + </argument> + <argument index="2" name="shape_idx" type="int"> + </argument> + <description> + </description> + </signal> + <signal name="mouse_exit"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> @@ -6538,14 +7052,14 @@ <description> </description> <methods> - <method name="set_polygon"> - <argument index="0" name="polygon" type="Vector2Array"> + <method name="set_build_mode"> + <argument index="0" name="arg0" type="int"> </argument> <description> </description> </method> - <method name="get_polygon" qualifiers="const"> - <return type="Vector2Array"> + <method name="get_build_mode" qualifiers="const"> + <return type="int"> </return> <description> </description> @@ -6562,13 +7076,25 @@ <description> </description> </method> - <method name="set_build_mode"> - <argument index="0" name="arg0" type="int"> + <method name="set_polygon"> + <argument index="0" name="polygon" type="Vector2Array"> </argument> <description> </description> </method> - <method name="get_build_mode" qualifiers="const"> + <method name="get_polygon" qualifiers="const"> + <return type="Vector2Array"> + </return> + <description> + </description> + </method> + <method name="get_collision_object_first_shape" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_collision_object_last_shape" qualifiers="const"> <return type="int"> </return> <description> @@ -6586,6 +7112,54 @@ Editor-Only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. This class is for editing custom shape polygons. </description> <methods> + <method name="set_polygon"> + <argument index="0" name="polygon" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="get_polygon" qualifiers="const"> + <return type="Vector2Array"> + </return> + <description> + </description> + </method> + <method name="set_build_mode"> + <argument index="0" name="arg0" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_build_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_trigger"> + <argument index="0" name="arg0" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_trigger" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="get_collision_object_first_shape" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_collision_object_last_shape" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -6596,6 +7170,46 @@ <description> </description> <methods> + <method name="resource_changed"> + <argument index="0" name="arg0" type="Object"> + </argument> + <description> + </description> + </method> + <method name="set_shape"> + <argument index="0" name="shape" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_shape" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="set_trigger"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_trigger" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="make_convex_from_brothers"> + <description> + </description> + </method> + <method name="get_collision_object_shape_index" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -6608,6 +7222,36 @@ Editor-Only class. This is not present when running the game. It's used in the editor to properly edit and position collision shapes in [CollisionObject2D]. This is not accessible from regular code. </description> <methods> + <method name="set_shape"> + <argument index="0" name="shape" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_shape" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="set_trigger"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_trigger" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="get_collision_object_shape_index" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -6684,6 +7328,8 @@ </description> </method> <method name="Color"> + <return type="Color"> + </return> <argument index="0" name="r" type="float"> </argument> <argument index="1" name="g" type="float"> @@ -6697,6 +7343,8 @@ </description> </method> <method name="Color"> + <return type="Color"> + </return> <argument index="0" name="r" type="float"> </argument> <argument index="1" name="g" type="float"> @@ -6708,6 +7356,8 @@ </description> </method> <method name="Color"> + <return type="Color"> + </return> <argument index="0" name="from" type="int"> </argument> <description> @@ -6715,6 +7365,8 @@ </description> </method> <method name="Color"> + <return type="Color"> + </return> <argument index="0" name="from" type="String"> </argument> <description> @@ -6789,6 +7441,8 @@ </description> </method> <method name="ColorArray"> + <return type="ColorArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> @@ -6936,6 +7590,40 @@ </theme_item> </theme_items> </class> +<class name="ColorRamp" inherits="Resource" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_offsets"> + <argument index="0" name="offsets" type="RealArray"> + </argument> + <description> + </description> + </method> + <method name="get_offsets" qualifiers="const"> + <return type="RealArray"> + </return> + <description> + </description> + </method> + <method name="set_colors"> + <argument index="0" name="colors" type="ColorArray"> + </argument> + <description> + </description> + </method> + <method name="get_colors" qualifiers="const"> + <return type="ColorArray"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="ConcavePolygonShape" inherits="Shape" category="Core"> <brief_description> Concave polygon shape. @@ -7083,7 +7771,7 @@ </description> </method> <method name="load"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="path" type="String"> </argument> @@ -7091,7 +7779,7 @@ </description> </method> <method name="save"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="path" type="String"> </argument> @@ -7694,6 +8382,12 @@ <description> </description> </method> + <method name="warp_mouse"> + <argument index="0" name="to_pos" type="Vector2"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="focus_enter"> @@ -7727,6 +8421,8 @@ </description> </signal> <signal name="input_event"> + <argument index="0" name="ev" type="InputEvent"> + </argument> <description> Emitted when an input event is received. Connecting in realtime is recommended for accepting the events. </description> @@ -8114,6 +8810,16 @@ <description> </description> </method> + <method name="tesselate" qualifiers="const"> + <return type="Vector2Array"> + </return> + <argument index="0" name="max_stages" type="int" default="5"> + </argument> + <argument index="1" name="tolerance_degrees" type="float" default="4"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -8270,6 +8976,16 @@ <description> </description> </method> + <method name="tesselate" qualifiers="const"> + <return type="Vector3Array"> + </return> + <argument index="0" name="max_stages" type="int" default="5"> + </argument> + <argument index="1" name="tolerance_degrees" type="float" default="4"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -8478,7 +9194,7 @@ </description> <methods> <method name="open"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="path" type="String"> </argument> @@ -8522,7 +9238,7 @@ </description> </method> <method name="change_dir"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="todir" type="String"> </argument> @@ -8536,7 +9252,7 @@ </description> </method> <method name="make_dir"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="name" type="String"> </argument> @@ -8544,7 +9260,7 @@ </description> </method> <method name="make_dir_recursive"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="name" type="String"> </argument> @@ -8574,7 +9290,7 @@ </description> </method> <method name="copy"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="from" type="String"> </argument> @@ -8584,7 +9300,7 @@ </description> </method> <method name="rename"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="from" type="String"> </argument> @@ -8594,7 +9310,7 @@ </description> </method> <method name="remove"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="file" type="String"> </argument> @@ -8605,6 +9321,154 @@ <constants> </constants> </class> +<class name="EditorFileDialog" inherits="ConfirmationDialog" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="clear_filters"> + <description> + </description> + </method> + <method name="add_filter"> + <argument index="0" name="filter" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_current_dir" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_current_file" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_current_path" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="set_current_dir"> + <argument index="0" name="dir" type="String"> + </argument> + <description> + </description> + </method> + <method name="set_current_file"> + <argument index="0" name="file" type="String"> + </argument> + <description> + </description> + </method> + <method name="set_current_path"> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + <method name="set_mode"> + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_vbox"> + <return type="VBoxContainer"> + </return> + <description> + </description> + </method> + <method name="set_access"> + <argument index="0" name="access" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_access" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_show_hidden_files"> + <argument index="0" name="arg0" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_showing_hidden_files" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_display_mode"> + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_display_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="invalidate"> + <description> + </description> + </method> + </methods> + <signals> + <signal name="files_selected"> + <argument index="0" name="paths" type="StringArray"> + </argument> + <description> + </description> + </signal> + <signal name="dir_selected"> + <argument index="0" name="dir" type="String"> + </argument> + <description> + </description> + </signal> + <signal name="file_selected"> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </signal> + </signals> + <constants> + <constant name="MODE_OPEN_FILE" value="0"> + </constant> + <constant name="MODE_OPEN_FILES" value="1"> + </constant> + <constant name="MODE_OPEN_DIR" value="2"> + </constant> + <constant name="MODE_SAVE_FILE" value="3"> + </constant> + <constant name="ACCESS_RESOURCES" value="0"> + </constant> + <constant name="ACCESS_USERDATA" value="1"> + </constant> + <constant name="ACCESS_FILESYSTEM" value="2"> + </constant> + </constants> +</class> <class name="EditorImportPlugin" inherits="Reference" category="Core"> <brief_description> </brief_description> @@ -8734,7 +9598,7 @@ </description> </method> <method name="get_undo_redo"> - <return type="UndoRedo"> + <return type="Object"> </return> <description> </description> @@ -8823,28 +9687,6 @@ <constants> </constants> </class> -<class name="EmptyControl" inherits="Control" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="set_minsize"> - <argument index="0" name="minsize" type="Vector2"> - </argument> - <description> - </description> - </method> - <method name="get_minsize" qualifiers="const"> - <return type="Vector2"> - </return> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> <class name="Environment" inherits="Resource" category="Core"> <brief_description> </brief_description> @@ -8919,23 +9761,23 @@ </constant> <constant name="BG_CUBEMAP" value="4"> </constant> - <constant name="BG_TEXTURE_RGBE" value="5"> + <constant name="BG_CANVAS" value="5"> </constant> - <constant name="BG_CUBEMAP_RGBE" value="6"> + <constant name="BG_MAX" value="6"> </constant> - <constant name="BG_MAX" value="7"> + <constant name="BG_PARAM_CANVAS_MAX_LAYER" value="0"> </constant> - <constant name="BG_PARAM_COLOR" value="0"> + <constant name="BG_PARAM_COLOR" value="1"> </constant> - <constant name="BG_PARAM_TEXTURE" value="1"> + <constant name="BG_PARAM_TEXTURE" value="2"> </constant> - <constant name="BG_PARAM_CUBEMAP" value="2"> + <constant name="BG_PARAM_CUBEMAP" value="3"> </constant> - <constant name="BG_PARAM_ENERGY" value="3"> + <constant name="BG_PARAM_ENERGY" value="4"> </constant> - <constant name="BG_PARAM_GLOW" value="5"> + <constant name="BG_PARAM_GLOW" value="6"> </constant> - <constant name="BG_PARAM_MAX" value="6"> + <constant name="BG_PARAM_MAX" value="7"> </constant> <constant name="FX_AMBIENT_LIGHT" value="0"> </constant> @@ -9376,7 +10218,7 @@ </description> </method> <method name="get_error" qualifiers="const"> - <return type="int"> + <return type="Error"> </return> <description> </description> @@ -9578,6 +10420,18 @@ <description> </description> </method> + <method name="set_show_hidden_files"> + <argument index="0" name="arg0" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_showing_hidden_files" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="invalidate"> <description> </description> @@ -9802,6 +10656,14 @@ Font contains an unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc. </description> <methods> + <method name="create_from_fnt"> + <return type="int"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> <method name="set_height"> <argument index="0" name="px" type="float"> </argument> @@ -9881,6 +10743,20 @@ Add a character to the font, where "character" is the unicode value, "texture" is the texture index, "rect" is the region in the texture (in pixels!), "align" is the (optional) alignment for the character and "advance" is the (optional) advance. </description> </method> + <method name="get_texture_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_texture" qualifiers="const"> + <return type="Texture"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> <method name="get_char_size" qualifiers="const"> <return type="Vector2"> </return> @@ -9901,6 +10777,18 @@ Return the size of a string, taking kerning and advance into account. </description> </method> + <method name="set_distance_field_hint"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_distance_field_hint" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="clear"> <description> Clear all the font data. @@ -10036,6 +10924,12 @@ <description> </description> </method> + <method name="get_as_byte_code" qualifiers="const"> + <return type="RawArray"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -10370,6 +11264,20 @@ <description> </description> </method> + <method name="point_is_inside_triangle" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="point" type="Vector2"> + </argument> + <argument index="1" name="a" type="Vector2"> + </argument> + <argument index="2" name="b" type="Vector2"> + </argument> + <argument index="3" name="c" type="Vector2"> + </argument> + <description> + </description> + </method> <method name="triangulate_polygon"> <return type="IntArray"> </return> @@ -10464,6 +11372,18 @@ <description> </description> </method> + <method name="set_extra_cull_margin"> + <argument index="0" name="margin" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_extra_cull_margin" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> </methods> <constants> <constant name="FLAG_VISIBLE" value="0"> @@ -10592,10 +11512,336 @@ <description> </description> </method> + <method name="save_custom"> + <return type="int"> + </return> + <argument index="0" name="arg0" type="String"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> </class> +<class name="GraphEdit" inherits="Control" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="connect_node"> + <return type="Error"> + </return> + <argument index="0" name="from" type="String"> + </argument> + <argument index="1" name="from_port" type="int"> + </argument> + <argument index="2" name="to" type="String"> + </argument> + <argument index="3" name="to_port" type="int"> + </argument> + <description> + </description> + </method> + <method name="is_node_connected"> + <return type="bool"> + </return> + <argument index="0" name="from" type="String"> + </argument> + <argument index="1" name="from_port" type="int"> + </argument> + <argument index="2" name="to" type="String"> + </argument> + <argument index="3" name="to_port" type="int"> + </argument> + <description> + </description> + </method> + <method name="disconnect_node"> + <argument index="0" name="from" type="String"> + </argument> + <argument index="1" name="from_port" type="int"> + </argument> + <argument index="2" name="to" type="String"> + </argument> + <argument index="3" name="to_port" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_connection_list" qualifiers="const"> + <return type="Array"> + </return> + <description> + </description> + </method> + <method name="set_right_disconnects"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_right_disconnects_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <signals> + <signal name="disconnection_request"> + <argument index="0" name="from" type="String"> + </argument> + <argument index="1" name="from_slot" type="int"> + </argument> + <argument index="2" name="to" type="String"> + </argument> + <argument index="3" name="to_slot" type="int"> + </argument> + <description> + </description> + </signal> + <signal name="connection_request"> + <argument index="0" name="from" type="String"> + </argument> + <argument index="1" name="from_slot" type="int"> + </argument> + <argument index="2" name="to" type="String"> + </argument> + <argument index="3" name="to_slot" type="int"> + </argument> + <description> + </description> + </signal> + </signals> + <constants> + </constants> +</class> +<class name="GraphNode" inherits="Container" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_title"> + <argument index="0" name="title" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_title" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="set_slot"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="enable_left" type="bool"> + </argument> + <argument index="2" name="type_left" type="int"> + </argument> + <argument index="3" name="color_left" type="Color"> + </argument> + <argument index="4" name="enable_right" type="bool"> + </argument> + <argument index="5" name="type_right" type="int"> + </argument> + <argument index="6" name="color_right" type="Color"> + </argument> + <description> + </description> + </method> + <method name="clear_slot"> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear_all_slots"> + <description> + </description> + </method> + <method name="is_slot_enabled_left" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_slot_type_left" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_slot_color_left" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="is_slot_enabled_right" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_slot_type_right" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_slot_color_right" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_offset"> + <argument index="0" name="offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_offset" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_connection_output_count"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_connection_input_count"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_connection_output_pos"> + <return type="Vector2"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_connection_output_type"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_connection_output_color"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_connection_input_pos"> + <return type="Vector2"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_connection_input_type"> + <return type="int"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_connection_input_color"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_show_close_button"> + <argument index="0" name="show" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_close_button_visible" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <signals> + <signal name="raise_request"> + <description> + </description> + </signal> + <signal name="close_request"> + <description> + </description> + </signal> + <signal name="dragged"> + <argument index="0" name="from" type="Vector2"> + </argument> + <argument index="1" name="to" type="Vector2"> + </argument> + <description> + </description> + </signal> + <signal name="offset_changed"> + <description> + </description> + </signal> + </signals> + <constants> + </constants> + <theme_items> + <theme_item name="port_offset" type="int"> + </theme_item> + <theme_item name="close_offset" type="int"> + </theme_item> + <theme_item name="separation" type="int"> + </theme_item> + <theme_item name="title_offset" type="int"> + </theme_item> + <theme_item name="title_color" type="Color"> + </theme_item> + <theme_item name="port" type="Texture"> + </theme_item> + <theme_item name="close" type="Texture"> + </theme_item> + <theme_item name="title_font" type="Font"> + </theme_item> + <theme_item name="frame" type="StyleBox"> + </theme_item> + </theme_items> +</class> <class name="GridContainer" inherits="Container" category="Core"> <brief_description> </brief_description> @@ -10618,7 +11864,9 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int"> + <theme_item name="vseparation" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> </theme_item> </theme_items> </class> @@ -11081,7 +12329,7 @@ </description> <methods> <method name="connect"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="host" type="String"> </argument> @@ -11176,6 +12424,12 @@ <description> </description> </method> + <method name="set_read_chunk_size"> + <argument index="0" name="bytes" type="int"> + </argument> + <description> + </description> + </method> <method name="set_blocking_mode"> <argument index="0" name="enabled" type="bool"> </argument> @@ -11195,7 +12449,7 @@ </description> </method> <method name="poll"> - <return type="int"> + <return type="Error"> </return> <description> </description> @@ -11787,6 +13041,10 @@ <description> </description> </method> + <method name="normal_to_xy"> + <description> + </description> + </method> <method name="set_size_override"> <argument index="0" name="size" type="Vector2"> </argument> @@ -11848,7 +13106,7 @@ </description> </method> <method name="add_vertex"> - <argument index="0" name="color" type="Vector3"> + <argument index="0" name="pos" type="Vector3"> </argument> <description> </description> @@ -11939,13 +13197,6 @@ <description> </description> </method> - <method name="get_mouse_pos" qualifiers="const"> - <return type="Vector2"> - </return> - <description> - Return the global, unscaled, screen pointer coordinates. If the 2D viewport has been scaled, it may not work well with [Camera] or controls. - </description> - </method> <method name="get_mouse_speed" qualifiers="const"> <return type="Vector2"> </return> @@ -11976,6 +13227,18 @@ <description> </description> </method> + <method name="action_press"> + <argument index="0" name="arg0" type="String"> + </argument> + <description> + </description> + </method> + <method name="action_release"> + <argument index="0" name="arg0" type="String"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="joy_connection_changed"> @@ -12023,6 +13286,22 @@ Return if this input event matches a pre-defined action, no matter the type. </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12037,6 +13316,14 @@ Return if this input event is pressed (for key, mouse, joy button or screen press events). </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12087,6 +13374,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12099,6 +13402,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12143,6 +13454,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12155,6 +13482,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12205,6 +13540,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12217,6 +13568,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12265,6 +13624,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12277,6 +13652,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12337,6 +13720,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12349,6 +13748,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12421,6 +13828,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12433,6 +13856,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12511,6 +13942,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12523,6 +13970,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12587,6 +14042,22 @@ <description> </description> </method> + <method name="is_action_pressed"> + <return type="bool"> + </return> + <argument index="0" name="is_action_pressed" type="String"> + </argument> + <description> + </description> + </method> + <method name="is_action_released"> + <return type="bool"> + </return> + <argument index="0" name="is_action_released" type="String"> + </argument> + <description> + </description> + </method> <method name="is_echo"> <return type="bool"> </return> @@ -12599,6 +14070,14 @@ <description> </description> </method> + <method name="set_as_action"> + <argument index="0" name="action" type="String"> + </argument> + <argument index="1" name="pressed" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="type" type="int"> @@ -12710,7 +14189,7 @@ </description> </method> <method name="get_action_list"> - <return type="bool"> + <return type="Array"> </return> <argument index="0" name="action" type="String"> </argument> @@ -12783,6 +14262,8 @@ </description> </method> <method name="IntArray"> + <return type="IntArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> @@ -12845,6 +14326,322 @@ <constants> </constants> </class> +<class name="ItemList" inherits="Control" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="add_item"> + <argument index="0" name="text" type="String"> + </argument> + <argument index="1" name="icon" type="Texture" default="Object()"> + </argument> + <argument index="2" name="selectable" type="bool" default="true"> + </argument> + <description> + </description> + </method> + <method name="add_icon_item"> + <argument index="0" name="icon" type="Texture"> + </argument> + <argument index="1" name="selectable" type="bool" default="true"> + </argument> + <description> + </description> + </method> + <method name="set_item_text"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="text" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_item_text" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_item_icon"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="icon" type="Texture"> + </argument> + <description> + </description> + </method> + <method name="get_item_icon" qualifiers="const"> + <return type="Tedture"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_item_selectable"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="selectable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_item_selectable" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_item_disabled"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="disabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_item_disabled" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_item_metadata"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="metadata" type="var"> + </argument> + <description> + </description> + </method> + <method name="get_item_metadata" qualifiers="const"> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_item_custom_bg_color"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="custom_bg_color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_item_custom_bg_color" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_item_tooltip"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="tooltip" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_item_tooltip" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="select"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="single" type="bool" default="true"> + </argument> + <description> + </description> + </method> + <method name="unselect"> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="is_selected" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_item_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="remove_item"> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear"> + <description> + </description> + </method> + <method name="sort_items_by_text"> + <description> + </description> + </method> + <method name="set_fixed_column_width"> + <argument index="0" name="width" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_fixed_column_width" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_max_text_lines"> + <argument index="0" name="lines" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_max_text_lines" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_max_columns"> + <argument index="0" name="amount" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_max_columns" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_select_mode"> + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_select_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_icon_mode"> + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_icon_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_min_icon_size"> + <argument index="0" name="size" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_min_icon_size" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="ensure_current_is_visible"> + <description> + </description> + </method> + </methods> + <signals> + <signal name="item_activated"> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </signal> + <signal name="multi_selected"> + <argument index="0" name="index" type="int"> + </argument> + <argument index="1" name="selected" type="bool"> + </argument> + <description> + </description> + </signal> + <signal name="item_selected"> + <argument index="0" name="index" type="int"> + </argument> + <description> + </description> + </signal> + </signals> + <constants> + <constant name="ICON_MODE_TOP" value="0"> + </constant> + <constant name="ICON_MODE_LEFT" value="1"> + </constant> + <constant name="SELECT_SINGLE" value="0"> + </constant> + <constant name="SELECT_MULTI" value="1"> + </constant> + </constants> + <theme_items> + <theme_item name="vseparation" type="int"> + </theme_item> + <theme_item name="line_separation" type="int"> + </theme_item> + <theme_item name="icon_margin" type="int"> + </theme_item> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="guide_color" type="Color"> + </theme_item> + <theme_item name="font_color_selected" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="cursor" type="StyleBox"> + </theme_item> + <theme_item name="selected_focus" type="StyleBox"> + </theme_item> + <theme_item name="bg_focus" type="StyleBox"> + </theme_item> + <theme_item name="cursor_unfocused" type="StyleBox"> + </theme_item> + <theme_item name="selected" type="StyleBox"> + </theme_item> + <theme_item name="bg" type="StyleBox"> + </theme_item> + </theme_items> +</class> <class name="Joint" inherits="Spatial" category="Core"> <brief_description> </brief_description> @@ -13095,16 +14892,24 @@ <description> </description> </method> - <method name="can_move_to"> + <method name="test_move"> <return type="bool"> </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="arg1" type="bool"> + <argument index="0" name="rel_vec" type="Vector2"> </argument> <description> </description> </method> + <method name="get_travel" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="revert_motion"> + <description> + </description> + </method> <method name="is_colliding" qualifiers="const"> <return type="bool"> </return> @@ -13143,54 +14948,6 @@ <description> </description> </method> - <method name="set_collide_with_static_bodies"> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="can_collide_with_static_bodies" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="set_collide_with_kinematic_bodies"> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="can_collide_with_kinematic_bodies" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="set_collide_with_rigid_bodies"> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="can_collide_with_rigid_bodies" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="set_collide_with_character_bodies"> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="can_collide_with_character_bodies" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> <method name="set_collision_margin"> <argument index="0" name="pixels" type="float"> </argument> @@ -13551,7 +15308,7 @@ </constant> <constant name="PARAM_SPOT_ANGLE" value="1"> </constant> - <constant name="PARAM_SPOT_ATTENUATION" value="4"> + <constant name="PARAM_SPOT_ATTENUATION" value="0"> </constant> <constant name="PARAM_SHADOW_DARKENING" value="5"> </constant> @@ -13571,6 +15328,272 @@ </constant> </constants> </class> +<class name="Light2D" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_enabled"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_texture"> + <argument index="0" name="texture" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_texture" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="set_texture_offset"> + <argument index="0" name="texture_offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_texture_offset" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_color"> + <argument index="0" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_color" qualifiers="const"> + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="set_height"> + <argument index="0" name="height" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_height" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_energy"> + <argument index="0" name="energy" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_energy" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_texture_scale"> + <argument index="0" name="texture_scale" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_texture_scale" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_z_range_min"> + <argument index="0" name="z" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_z_range_min" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_z_range_max"> + <argument index="0" name="z" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_z_range_max" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_layer_range_min"> + <argument index="0" name="layer" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_range_min" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_layer_range_max"> + <argument index="0" name="layer" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_layer_range_max" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_item_mask"> + <argument index="0" name="item_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_item_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_item_shadow_mask"> + <argument index="0" name="item_shadow_mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_item_shadow_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_mode"> + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_shadow_enabled"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_shadow_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_shadow_buffer_size"> + <argument index="0" name="size" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_shadow_buffer_size" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_shadow_esm_multiplier"> + <argument index="0" name="multiplier" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_shadow_esm_multiplier" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_shadow_color"> + <argument index="0" name="shadow_color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_shadow_color" qualifiers="const"> + <return type="Color"> + </return> + <description> + </description> + </method> + </methods> + <constants> + <constant name="MODE_ADD" value="0"> + </constant> + <constant name="MODE_SUB" value="1"> + </constant> + <constant name="MODE_MIX" value="2"> + </constant> + </constants> +</class> +<class name="LightOccluder2D" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_occluder_polygon"> + <argument index="0" name="polygon" type="OccluderPolygon2D"> + </argument> + <description> + </description> + </method> + <method name="get_occluder_polygon" qualifiers="const"> + <return type="OccluderPolygon2D"> + </return> + <description> + </description> + </method> + <method name="set_occluder_light_mask"> + <argument index="0" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_occluder_light_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="LineEdit" inherits="Control" category="Core"> <brief_description> Control that provides single line string editing. @@ -13762,12 +15785,74 @@ Main loop is the abstract main loop base class. All other main loop classes are derived from it. Upon application start, a [MainLoop] has to be provided to OS, else the application will exit. This happens automatically (and a [SceneMainLoop] is created), unless a main [Script] is supplied, which may or not create and return a [MainLoop]. </description> <methods> + <method name="_finalize" qualifiers="virtual"> + <description> + </description> + </method> + <method name="_idle" qualifiers="virtual"> + <argument index="0" name="delta" type="float"> + </argument> + <description> + </description> + </method> + <method name="_initialize" qualifiers="virtual"> + <description> + </description> + </method> + <method name="_input_event" qualifiers="virtual"> + <argument index="0" name="ev" type="InputEvent"> + </argument> + <description> + </description> + </method> + <method name="_input_text" qualifiers="virtual"> + <argument index="0" name="text" type="String"> + </argument> + <description> + </description> + </method> + <method name="_iteration" qualifiers="virtual"> + <argument index="0" name="delta" type="float"> + </argument> + <description> + </description> + </method> <method name="input_event"> - <argument index="0" name="arg0" type="InputEvent"> + <argument index="0" name="ev" type="InputEvent"> + </argument> + <description> + </description> + </method> + <method name="input_text"> + <argument index="0" name="text" type="String"> + </argument> + <description> + </description> + </method> + <method name="init"> + <description> + </description> + </method> + <method name="iteration"> + <return type="bool"> + </return> + <argument index="0" name="delta" type="float"> </argument> <description> </description> </method> + <method name="idle"> + <return type="bool"> + </return> + <argument index="0" name="delta" type="float"> + </argument> + <description> + </description> + </method> + <method name="finish"> + <description> + </description> + </method> </methods> <constants> <constant name="NOTIFICATION_WM_FOCUS_IN" value="5"> @@ -13818,6 +15903,38 @@ <description> </description> </method> + <method name="raw_to_base64"> + <return type="String"> + </return> + <argument index="0" name="array" type="RawArray"> + </argument> + <description> + </description> + </method> + <method name="base64_to_raw"> + <return type="RawArray"> + </return> + <argument index="0" name="base64_str" type="String"> + </argument> + <description> + </description> + </method> + <method name="utf8_to_base64"> + <return type="String"> + </return> + <argument index="0" name="utf8_str" type="String"> + </argument> + <description> + </description> + </method> + <method name="base64_to_utf8"> + <return type="String"> + </return> + <argument index="0" name="base64_str" type="String"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -13934,6 +16051,26 @@ </constant> </constants> </class> +<class name="MaterialShader" inherits="Shader" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + </methods> + <constants> + </constants> +</class> +<class name="MaterialShaderGraph" inherits="ShaderGraph" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + </methods> + <constants> + </constants> +</class> <class name="Matrix3" category="Built-In Types"> <brief_description> 3x3 matrix datatype. @@ -14055,6 +16192,8 @@ </description> </method> <method name="Matrix3"> + <return type="Matrix3"> + </return> <argument index="0" name="x_axis" type="Vector3"> </argument> <argument index="1" name="y_axis" type="Vector3"> @@ -14066,6 +16205,8 @@ </description> </method> <method name="Matrix3"> + <return type="Matrix3"> + </return> <argument index="0" name="axis" type="Vector3"> </argument> <argument index="1" name="phi" type="float"> @@ -14075,6 +16216,8 @@ </description> </method> <method name="Matrix3"> + <return type="Matrix3"> + </return> <argument index="0" name="from" type="Quat"> </argument> <description> @@ -14204,6 +16347,18 @@ </description> </method> <method name="Matrix32"> + <return type="Matrix32"> + </return> + <argument index="0" name="rot" type="float"> + </argument> + <argument index="1" name="pos" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="Matrix32"> + <return type="Matrix32"> + </return> <argument index="0" name="x_axis" type="Vector2"> </argument> <argument index="1" name="y_axis" type="Vector2"> @@ -14213,6 +16368,14 @@ <description> </description> </method> + <method name="Matrix32"> + <return type="Matrix32"> + </return> + <argument index="0" name="from" type="Transform"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="x" type="float"> @@ -14234,7 +16397,7 @@ </description> <methods> <method name="get_popup"> - <return type="Object"> + <return type="PopupMenu"> </return> <description> Return the [PopupMenu] contained in this button. @@ -15105,7 +17268,7 @@ </description> </method> <method name="try_lock"> - <return type="int"> + <return type="Error"> </return> <description> </description> @@ -15169,6 +17332,8 @@ </argument> <argument index="1" name="end" type="Vector3"> </argument> + <argument index="2" name="use_collision" type="bool" default="false"> + </argument> <description> </description> </method> @@ -15188,6 +17353,14 @@ <description> </description> </method> + <method name="get_closest_point_owner"> + <return type="Object"> + </return> + <argument index="0" name="to_point" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="set_up_vector"> <argument index="0" name="up" type="Vector3"> </argument> @@ -15204,6 +17377,70 @@ <constants> </constants> </class> +<class name="Navigation2D" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="navpoly_create"> + <return type="int"> + </return> + <argument index="0" name="mesh" type="NavigationPolygon"> + </argument> + <argument index="1" name="xform" type="Matrix32"> + </argument> + <argument index="2" name="owner" type="Object" default="NULL"> + </argument> + <description> + </description> + </method> + <method name="navpoly_set_transform"> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="xform" type="Matrix32"> + </argument> + <description> + </description> + </method> + <method name="navpoly_remove"> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_simple_path"> + <return type="Vector2Array"> + </return> + <argument index="0" name="start" type="Vector2"> + </argument> + <argument index="1" name="end" type="Vector2"> + </argument> + <argument index="2" name="optimize" type="bool" default="true"> + </argument> + <description> + </description> + </method> + <method name="get_closest_point"> + <return type="Vector2"> + </return> + <argument index="0" name="to_point" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_closest_point_owner"> + <return type="Object"> + </return> + <argument index="0" name="to_point" type="Vector2"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="NavigationMesh" inherits="Resource" category="Core"> <brief_description> </brief_description> @@ -15284,6 +17521,136 @@ <constants> </constants> </class> +<class name="NavigationPolygon" inherits="Resource" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_vertices"> + <argument index="0" name="vertices" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="get_vertices" qualifiers="const"> + <return type="Vector2Array"> + </return> + <description> + </description> + </method> + <method name="add_polygon"> + <argument index="0" name="polygon" type="IntArray"> + </argument> + <description> + </description> + </method> + <method name="get_polygon_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_polygon"> + <return type="IntArray"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear_polygons"> + <description> + </description> + </method> + <method name="add_outline"> + <argument index="0" name="outline" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="add_outline_at_index"> + <argument index="0" name="outline" type="Vector2Array"> + </argument> + <argument index="1" name="index" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_outline_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_outline"> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="outline" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="get_outline" qualifiers="const"> + <return type="Vector2Array"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="remove_outline"> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear_outlines"> + <description> + </description> + </method> + <method name="make_polygons_from_outlines"> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> +<class name="NavigationPolygonInstance" inherits="Node2D" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_navigation_polygon"> + <argument index="0" name="navpoly" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_navigation_polygon" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="set_enabled"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Nil" category="Built-In Types"> <brief_description> </brief_description> @@ -15554,12 +17921,6 @@ Remove a child [Node]. Node is NOT deleted and will have to be deleted manually. </description> </method> - <method name="remove_and_delete_child"> - <argument index="0" name="node" type="Node"> - </argument> - <description> - </description> - </method> <method name="get_child_count" qualifiers="const"> <return type="int"> </return> @@ -15621,6 +17982,14 @@ Return the parent [Node] of the current [Node], or an empty Object if the node lacks a parent. </description> </method> + <method name="find_node" qualifiers="const"> + <return type="Node"> + </return> + <argument index="0" name="mask" type="NodePath" default="true"> + </argument> + <description> + </description> + </method> <method name="has_node_and_resource" qualifiers="const"> <return type="bool"> </return> @@ -15893,8 +18262,9 @@ <method name="duplicate" qualifiers="const"> <return type="Node"> </return> + <argument index="0" name="use_instancing" type="bool" default="false"> + </argument> <description> - Return a duplicate of the scene, with all nodes and parameters copied. Subscriptions will not be duplicated. </description> </method> <method name="replace_by"> @@ -16015,7 +18385,7 @@ </description> </method> <method name="rotate"> - <argument index="0" name="degrees" type="float"> + <argument index="0" name="radians" type="float"> </argument> <description> </description> @@ -16036,19 +18406,37 @@ <description> </description> </method> - <method name="get_global_pos" qualifiers="const"> - <return type="Vector2"> - </return> + <method name="translate"> + <argument index="0" name="offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="global_translate"> + <argument index="0" name="offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="scale"> + <argument index="0" name="ratio" type="Vector2"> + </argument> <description> - Return the global position of the 2D node. </description> </method> <method name="set_global_pos"> - <argument index="0" name="arg0" type="Vector2"> + <argument index="0" name="pos" type="Vector2"> </argument> <description> </description> </method> + <method name="get_global_pos" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Return the global position of the 2D node. + </description> + </method> <method name="set_transform"> <argument index="0" name="xform" type="Matrix32"> </argument> @@ -16061,12 +18449,58 @@ <description> </description> </method> + <method name="look_at"> + <argument index="0" name="point" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_angle_to" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="point" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="set_z"> + <argument index="0" name="z" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_z" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_z_as_relative"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_z_relative" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="edit_set_pivot"> <argument index="0" name="arg0" type="Vector2"> </argument> <description> </description> </method> + <method name="get_relative_transform" qualifiers="const"> + <return type="Matrix32"> + </return> + <argument index="0" name="arg0" type="Object"> + </argument> + <description> + </description> + </method> </methods> <constants> </constants> @@ -16133,6 +18567,8 @@ </description> </method> <method name="NodePath"> + <return type="NodePath"> + </return> <argument index="0" name="from" type="String"> </argument> <description> @@ -16222,6 +18658,124 @@ Return the list of fullscreen modes. </description> </method> + <method name="get_screen_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_current_screen" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_current_screen"> + <argument index="0" name="screen" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_screen_position" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="screen" type="int" default="0"> + </argument> + <description> + </description> + </method> + <method name="get_screen_size" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="screen" type="int" default="0"> + </argument> + <description> + </description> + </method> + <method name="get_window_position" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_window_position"> + <argument index="0" name="position" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_window_size" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_window_size"> + <argument index="0" name="size" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="set_window_fullscreen"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_window_fullscreen" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_window_resizable"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_window_resizable" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_window_minimized"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_window_minimized" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_window_maximized"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_window_maximized" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_screen_orientation"> + <argument index="0" name="orientation" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_screen_orientation" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="set_iterations_per_second"> <argument index="0" name="iterations_per_second" type="int"> </argument> @@ -16266,6 +18820,12 @@ <description> </description> </method> + <method name="set_window_title"> + <argument index="0" name="title" type="String"> + </argument> + <description> + </description> + </method> <method name="set_low_processor_usage_mode"> <argument index="0" name="enable" type="bool"> </argument> @@ -16373,15 +18933,23 @@ <method name="get_date" qualifiers="const"> <return type="Dictionary"> </return> + <argument index="0" name="utc" type="bool" default="false"> + </argument> <description> - Return the current date. </description> </method> <method name="get_time" qualifiers="const"> <return type="Dictionary"> </return> + <argument index="0" name="utc" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="get_time_zone_info" qualifiers="const"> + <return type="Dictionary"> + </return> <description> - Return the current time. </description> </method> <method name="get_unix_time" qualifiers="const"> @@ -16390,6 +18958,12 @@ <description> </description> </method> + <method name="get_system_time_msec" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="set_icon"> <argument index="0" name="arg0" type="Image"> </argument> @@ -16417,6 +18991,12 @@ Return the amount of time passed in milliseconds since the engine started. </description> </method> + <method name="get_splash_tick_msec" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="get_locale" qualifiers="const"> <return type="String"> </return> @@ -16519,12 +19099,26 @@ <description> </description> </method> + <method name="get_system_dir" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="dir" type="int"> + </argument> + <description> + </description> + </method> <method name="get_unique_ID" qualifiers="const"> <return type="String"> </return> <description> </description> </method> + <method name="is_ok_left_and_cancel_right" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="get_frames_per_second" qualifiers="const"> <return type="float"> </return> @@ -16548,9 +19142,9 @@ </argument> <argument index="1" name="arg1" type="float"> </argument> - <argument index="2" name="arg2" type="int"> + <argument index="2" name="arg2" type="String"> </argument> - <argument index="3" name="arg3" type="int"> + <argument index="3" name="arg3" type="String"> </argument> <description> </description> @@ -16569,12 +19163,44 @@ <description> </description> </method> + <method name="get_scancode_string" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="code" type="int"> + </argument> + <description> + </description> + </method> + <method name="is_scancode_unicode" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="code" type="int"> + </argument> + <description> + </description> + </method> + <method name="find_scancode_from_string" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="string" type="String"> + </argument> + <description> + </description> + </method> <method name="set_use_file_access_save_and_swap"> <argument index="0" name="enabled" type="bool"> </argument> <description> </description> </method> + <method name="alert"> + <argument index="0" name="text" type="String"> + </argument> + <argument index="1" name="title" type="String" default=""Alert!""> + </argument> + <description> + </description> + </method> </methods> <constants> <constant name="DAY_SUNDAY" value="0"> @@ -16615,6 +19241,36 @@ </constant> <constant name="MONTH_DECEMBER" value="11"> </constant> + <constant name="SCREEN_ORIENTATION_LANDSCAPE" value="0"> + </constant> + <constant name="SCREEN_ORIENTATION_PORTRAIT" value="1"> + </constant> + <constant name="SCREEN_ORIENTATION_REVERSE_LANDSCAPE" value="2"> + </constant> + <constant name="SCREEN_ORIENTATION_REVERSE_PORTRAIT" value="3"> + </constant> + <constant name="SCREEN_ORIENTATION_SENSOR_LANDSCAPE" value="4"> + </constant> + <constant name="SCREEN_ORIENTATION_SENSOR_PORTRAIT" value="5"> + </constant> + <constant name="SCREEN_ORIENTATION_SENSOR" value="6"> + </constant> + <constant name="SYSTEM_DIR_DESKTOP" value="0"> + </constant> + <constant name="SYSTEM_DIR_DCIM" value="1"> + </constant> + <constant name="SYSTEM_DIR_DOCUMENTS" value="2"> + </constant> + <constant name="SYSTEM_DIR_DOWNLOADS" value="3"> + </constant> + <constant name="SYSTEM_DIR_MOVIES" value="4"> + </constant> + <constant name="SYSTEM_DIR_MUSIC" value="5"> + </constant> + <constant name="SYSTEM_DIR_PICTURES" value="6"> + </constant> + <constant name="SYSTEM_DIR_RINGTONES" value="7"> + </constant> </constants> </class> <class name="Object" category="Core"> @@ -16663,6 +19319,10 @@ Set a property. Return true if the property was found. </description> </method> + <method name="free"> + <description> + </description> + </method> <method name="get_type" qualifiers="const"> <return type="String"> </return> @@ -16702,6 +19362,12 @@ Return the list of properties as an array of dictionaries, dictionaries countain: name:String, type:int (see TYPE_* enum in globals) and optionally: hint:int (see PROPERTY_HINT_* in globals), hint_string:String, usage:int (see PROPERTY_USAGE_* in globals). </description> </method> + <method name="get_method_list" qualifiers="const"> + <return type="Array"> + </return> + <description> + </description> + </method> <method name="notification"> <argument index="0" name="what" type="int"> </argument> @@ -16773,6 +19439,14 @@ Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@GlobalScope] TYPE_*). </description> </method> + <method name="has_user_signal" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="signal" type="String"> + </argument> + <description> + </description> + </method> <method name="emit_signal"> <argument index="0" name="signal" type="String"> </argument> @@ -16948,6 +19622,12 @@ Translate a message. Only works in message translation is enabled (which is by default). See [method set_message_translation]. </description> </method> + <method name="is_queued_for_deletion" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> </methods> <signals> <signal name="script_changed"> @@ -16973,6 +19653,58 @@ </constant> </constants> </class> +<class name="OccluderPolygon2D" inherits="Resource" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_closed"> + <argument index="0" name="closed" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_closed" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_cull_mode"> + <argument index="0" name="cull_mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_cull_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_polygon"> + <argument index="0" name="polygon" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="get_polygon" qualifiers="const"> + <return type="Vector2Array"> + </return> + <description> + </description> + </method> + </methods> + <constants> + <constant name="CULL_DISABLED" value="0"> + </constant> + <constant name="CULL_CLOCKWISE" value="1"> + </constant> + <constant name="CULL_COUNTER_CLOCKWISE" value="2"> + </constant> + </constants> +</class> <class name="OmniLight" inherits="Light" category="Core"> <brief_description> OmniDirectional Light, such as a lightbulb or a candle. @@ -17185,7 +19917,7 @@ </theme_item> </theme_items> </class> -<class name="PCKPacker" inherits="Object" category="Core"> +<class name="PCKPacker" inherits="Reference" category="Core"> <brief_description> </brief_description> <description> @@ -17248,7 +19980,7 @@ </description> <methods> <method name="pack"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="value" type="var"> </argument> @@ -17335,6 +20067,26 @@ <description> </description> </method> + <method name="get_packet" qualifiers="const"> + <return type="RawArray"> + </return> + <description> + </description> + </method> + <method name="put_packet"> + <return type="Error"> + </return> + <argument index="0" name="buffer" type="RawArray"> + </argument> + <description> + </description> + </method> + <method name="get_packet_error" qualifiers="const"> + <return type="Error"> + </return> + <description> + </description> + </method> <method name="get_available_packet_count" qualifiers="const"> <return type="int"> </return> @@ -17371,7 +20123,7 @@ </description> <methods> <method name="listen"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="port" type="int"> </argument> @@ -17385,7 +20137,7 @@ </description> </method> <method name="wait"> - <return type="int"> + <return type="Error"> </return> <description> </description> @@ -17650,28 +20402,6 @@ <constants> </constants> </class> -<class name="ParticleSystemMaterial" inherits="Material" category="Core"> - <brief_description> - </brief_description> - <description> - </description> - <methods> - <method name="set_texture"> - <argument index="0" name="texture" type="Object"> - </argument> - <description> - </description> - </method> - <method name="get_texture" qualifiers="const"> - <return type="Texture"> - </return> - <description> - </description> - </method> - </methods> - <constants> - </constants> -</class> <class name="Particles" inherits="GeometryInstance" category="Core"> <brief_description> Particle system 3D Node @@ -18062,6 +20792,30 @@ <description> </description> </method> + <method name="set_color"> + <argument index="0" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_color" qualifiers="const"> + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="set_color_ramp"> + <argument index="0" name="color_ramp" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_color_ramp" qualifiers="const"> + <return type="ColorRamp"> + </return> + <description> + </description> + </method> <method name="set_emissor_offset"> <argument index="0" name="offset" type="Vector2"> </argument> @@ -18242,6 +20996,8 @@ </constant> <constant name="PARAM_SPIN_VELOCITY" value="3"> </constant> + <constant name="PARAM_ORBIT_VELOCITY" value="4"> + </constant> <constant name="PARAM_GRAVITY_DIRECTION" value="5"> </constant> <constant name="PARAM_GRAVITY_STRENGTH" value="6"> @@ -18250,18 +21006,88 @@ </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="8"> </constant> + <constant name="PARAM_DAMPING" value="9"> + </constant> + <constant name="PARAM_INITIAL_ANGLE" value="10"> + </constant> <constant name="PARAM_INITIAL_SIZE" value="11"> </constant> <constant name="PARAM_FINAL_SIZE" value="12"> </constant> <constant name="PARAM_HUE_VARIATION" value="13"> </constant> + <constant name="PARAM_ANIM_SPEED_SCALE" value="14"> + </constant> + <constant name="PARAM_ANIM_INITIAL_POS" value="15"> + </constant> <constant name="PARAM_MAX" value="16"> </constant> <constant name="MAX_COLOR_PHASES" value="4"> </constant> </constants> </class> +<class name="Patch9Frame" inherits="Control" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="set_texture"> + <argument index="0" name="texture" type="Object"> + </argument> + <description> + </description> + </method> + <method name="get_texture" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="set_modulate"> + <argument index="0" name="modulate" type="Color"> + </argument> + <description> + </description> + </method> + <method name="get_modulate" qualifiers="const"> + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="set_patch_margin"> + <argument index="0" name="margin" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_patch_margin" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="margin" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_draw_center"> + <argument index="0" name="draw_center" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_draw_center" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="Path" inherits="Spatial" category="Core"> <brief_description> </brief_description> @@ -18644,11 +21470,16 @@ Return the total gravity vector being currently applied to this body. </description> </method> - <method name="get_total_density" qualifiers="const"> + <method name="get_total_linear_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="get_total_angular_damp" qualifiers="const"> <return type="float"> </return> <description> - Return the space density currently being applied to this body. </description> </method> <method name="get_inverse_mass" qualifiers="const"> @@ -18855,6 +21686,22 @@ Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space. </description> <methods> + <method name="intersect_point"> + <return type="Array"> + </return> + <argument index="0" name="point" type="Vector2"> + </argument> + <argument index="1" name="max_results" type="int" default="32"> + </argument> + <argument index="2" name="exclude" type="Array" default="Array()"> + </argument> + <argument index="3" name="layer_mask" type="int" default="2147483647"> + </argument> + <argument index="4" name="type_mask" type="int" default="15"> + </argument> + <description> + </description> + </method> <method name="intersect_ray"> <return type="Dictionary"> </return> @@ -18869,7 +21716,7 @@ <argument index="4" name="type_mask" type="int" default="15"> </argument> <description> - Intersect a ray in a given space, the returned object is a dictionary with the following fields: + Intersect a ray in a given space, the returned object is a dictionary with the following fields: position: place where ray is stopped. normal: normal of the object at the point where the ray was stopped. shape: shape index of the object agaisnt which the ray was stopped. @@ -19131,6 +21978,22 @@ <description> </description> </method> + <method name="area_set_layer_mask"> + <argument index="0" name="area" type="RID"> + </argument> + <argument index="1" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="area_set_collision_mask"> + <argument index="0" name="area" type="RID"> + </argument> + <argument index="1" name="mask" type="int"> + </argument> + <description> + </description> + </method> <method name="area_set_param"> <argument index="0" name="area" type="RID"> </argument> @@ -19388,8 +22251,6 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="arg1" type="int"> - </argument> <description> </description> </method> @@ -19406,8 +22267,6 @@ </return> <argument index="0" name="body" type="RID"> </argument> - <argument index="1" name="arg1" type="int"> - </argument> <description> </description> </method> @@ -19499,6 +22358,38 @@ <description> </description> </method> + <method name="body_set_one_way_collision_direction"> + <argument index="0" name="normal" type="RID"> + </argument> + <argument index="1" name="arg1" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="body_get_one_way_collision_direction" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="arg0" type="RID"> + </argument> + <description> + </description> + </method> + <method name="body_set_one_way_collision_max_depth"> + <argument index="0" name="normal" type="RID"> + </argument> + <argument index="1" name="arg1" type="float"> + </argument> + <description> + </description> + </method> + <method name="body_get_one_way_collision_max_depth" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="arg0" type="RID"> + </argument> + <description> + </description> + </method> <method name="body_set_omit_force_integration"> <argument index="0" name="body" type="RID"> </argument> @@ -19527,6 +22418,20 @@ <description> </description> </method> + <method name="body_test_motion"> + <return type="bool"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="motion" type="Vector2"> + </argument> + <argument index="2" name="margin" type="float" default="0.08"> + </argument> + <argument index="3" name="result" type="Physics2DTestMotionResult" default="NULL"> + </argument> + <description> + </description> + </method> <method name="joint_set_param"> <argument index="0" name="joint" type="RID"> </argument> @@ -19661,11 +22566,15 @@ </constant> <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2"> </constant> - <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="3"> + <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3"> + </constant> + <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4"> </constant> - <constant name="AREA_PARAM_DENSITY" value="4"> + <constant name="AREA_PARAM_LINEAR_DAMP" value="5"> </constant> - <constant name="AREA_PARAM_PRIORITY" value="5"> + <constant name="AREA_PARAM_ANGULAR_DAMP" value="6"> + </constant> + <constant name="AREA_PARAM_PRIORITY" value="7"> </constant> <constant name="AREA_SPACE_OVERRIDE_COMBINE" value="1"> </constant> @@ -19687,7 +22596,13 @@ </constant> <constant name="BODY_PARAM_MASS" value="2"> </constant> - <constant name="BODY_PARAM_MAX" value="3"> + <constant name="BODY_PARAM_GRAVITY_SCALE" value="3"> + </constant> + <constant name="BODY_PARAM_LINEAR_DAMP" value="4"> + </constant> + <constant name="BODY_PARAM_ANGULAR_DAMP" value="5"> + </constant> + <constant name="BODY_PARAM_MAX" value="6"> </constant> <constant name="BODY_STATE_TRANSFORM" value="0"> </constant> @@ -19887,6 +22802,70 @@ <constants> </constants> </class> +<class name="Physics2DTestMotionResult" inherits="Reference" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="get_motion" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_motion_remainder" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_collision_point" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_collision_normal" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_collider_velocity" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_collider_id" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_collider_rid" qualifiers="const"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="get_collider" qualifiers="const"> + <return type="Object"> + </return> + <description> + </description> + </method> + <method name="get_collider_shape" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="PhysicsBody" inherits="CollisionObject" category="Core"> <brief_description> Base class for differnt types of Physics bodies. @@ -19941,6 +22920,74 @@ <description> </description> </method> + <method name="set_collision_mask"> + <argument index="0" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_collision_mask" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_collision_mask_bit"> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_collision_mask_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_layer_mask_bit"> + <argument index="0" name="bit" type="int"> + </argument> + <argument index="1" name="value" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_layer_mask_bit" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="bit" type="int"> + </argument> + <description> + </description> + </method> + <method name="set_one_way_collision_direction"> + <argument index="0" name="dir" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="get_one_way_collision_direction" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="set_one_way_collision_max_depth"> + <argument index="0" name="depth" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_one_way_collision_max_depth" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="add_collision_exception_with"> <argument index="0" name="body" type="PhysicsBody2D"> </argument> @@ -19969,7 +23016,13 @@ <description> </description> </method> - <method name="get_total_density" qualifiers="const"> + <method name="get_total_linear_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="get_total_angular_damp" qualifiers="const"> <return type="float"> </return> <description> @@ -21249,11 +24302,15 @@ </constant> <constant name="AREA_PARAM_GRAVITY_IS_POINT" value="2"> </constant> - <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="3"> + <constant name="AREA_PARAM_GRAVITY_DISTANCE_SCALE" value="3"> + </constant> + <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4"> + </constant> + <constant name="AREA_PARAM_LINEAR_DAMP" value="5"> </constant> - <constant name="AREA_PARAM_DENSITY" value="4"> + <constant name="AREA_PARAM_ANGULAR_DAMP" value="6"> </constant> - <constant name="AREA_PARAM_PRIORITY" value="5"> + <constant name="AREA_PARAM_PRIORITY" value="7"> </constant> <constant name="AREA_SPACE_OVERRIDE_COMBINE" value="1"> </constant> @@ -21275,7 +24332,13 @@ </constant> <constant name="BODY_PARAM_MASS" value="2"> </constant> - <constant name="BODY_PARAM_MAX" value="3"> + <constant name="BODY_PARAM_GRAVITY_SCALE" value="3"> + </constant> + <constant name="BODY_PARAM_ANGULAR_DAMP" value="5"> + </constant> + <constant name="BODY_PARAM_LINEAR_DAMP" value="4"> + </constant> + <constant name="BODY_PARAM_MAX" value="6"> </constant> <constant name="BODY_STATE_TRANSFORM" value="0"> </constant> @@ -21591,6 +24654,8 @@ </description> </method> <method name="Plane"> + <return type="Plane"> + </return> <argument index="0" name="a" type="float"> </argument> <argument index="1" name="b" type="float"> @@ -21604,6 +24669,8 @@ </description> </method> <method name="Plane"> + <return type="Plane"> + </return> <argument index="0" name="v1" type="Vector3"> </argument> <argument index="1" name="v2" type="Vector3"> @@ -21615,6 +24682,8 @@ </description> </method> <method name="Plane"> + <return type="Plane"> + </return> <argument index="0" name="normal" type="Vector3"> </argument> <argument index="1" name="d" type="float"> @@ -21751,18 +24820,6 @@ <description> </description> </method> - <method name="set_texture_repeat"> - <argument index="0" name="enable" type="bool"> - </argument> - <description> - </description> - </method> - <method name="get_texture_repeat" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> <method name="set_invert"> <argument index="0" name="invert" type="bool"> </argument> @@ -22613,6 +25670,8 @@ </description> </method> <method name="Quat"> + <return type="Quat"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> @@ -22625,6 +25684,18 @@ </description> </method> <method name="Quat"> + <return type="Quat"> + </return> + <argument index="0" name="axis" type="Vector3"> + </argument> + <argument index="1" name="angle" type="float"> + </argument> + <description> + </description> + </method> + <method name="Quat"> + <return type="Quat"> + </return> <argument index="0" name="from" type="Matrix3"> </argument> <description> @@ -22657,6 +25728,8 @@ </description> </method> <method name="RID"> + <return type="RID"> + </return> <argument index="0" name="from" type="Object"> </argument> <description> @@ -22875,6 +25948,8 @@ </description> </method> <method name="RawArray"> + <return type="RawArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> @@ -22944,6 +26019,34 @@ <description> </description> </method> + <method name="add_exception_rid"> + <argument index="0" name="rid" type="RID"> + </argument> + <description> + </description> + </method> + <method name="add_exception"> + <argument index="0" name="node" type="Object"> + </argument> + <description> + </description> + </method> + <method name="remove_exception_rid"> + <argument index="0" name="rid" type="RID"> + </argument> + <description> + </description> + </method> + <method name="remove_exception"> + <argument index="0" name="node" type="Object"> + </argument> + <description> + </description> + </method> + <method name="clear_exceptions"> + <description> + </description> + </method> </methods> <constants> </constants> @@ -23143,6 +26246,8 @@ </description> </method> <method name="RealArray"> + <return type="RealArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> @@ -23227,6 +26332,8 @@ </description> </method> <method name="Rect2"> + <return type="Rect2"> + </return> <argument index="0" name="pos" type="Vector2"> </argument> <argument index="1" name="size" type="Vector2"> @@ -23235,6 +26342,8 @@ </description> </method> <method name="Rect2"> + <return type="Rect2"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> @@ -23356,6 +26465,30 @@ <description> </description> </method> + <method name="clear"> + <description> + </description> + </method> + <method name="is_valid" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="get_capture_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_capture" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="capture" type="int"> + </argument> + <description> + </description> + </method> <method name="get_captures" qualifiers="const"> <return type="StringArray"> </return> @@ -23498,7 +26631,7 @@ <method name="add_source"> <argument index="0" name="path" type="String"> </argument> - <argument index="1" name="md5" type="String"> + <argument index="1" name="md5" type="String" default=""""> </argument> <description> </description> @@ -23627,8 +26760,9 @@ </argument> <argument index="1" name="type_hint" type="String" default=""""> </argument> + <argument index="2" name="p_no_cache" type="bool" default="false"> + </argument> <description> - Load a resource. Optionally a hint can be given for the resource type to load. </description> </method> <method name="get_recognized_extensions_for_type"> @@ -23883,6 +27017,12 @@ <description> </description> </method> + <method name="get_v_scroll"> + <return type="Object"> + </return> + <description> + </description> + </method> <method name="set_tab_size"> <argument index="0" name="spaces" type="int"> </argument> @@ -23925,6 +27065,48 @@ <description> </description> </method> + <method name="set_bbcode"> + <argument index="0" name="text" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_bbcode" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="set_visible_characters"> + <argument index="0" name="amount" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_visible_characters" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="get_total_character_count" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_use_bbcode"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_using_bbcode" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> </methods> <signals> <signal name="meta_clicked"> @@ -23981,7 +27163,15 @@ </theme_item> <theme_item name="font_color_selected" type="Color"> </theme_item> - <theme_item name="default_font" type="Font"> + <theme_item name="mono_font" type="Font"> + </theme_item> + <theme_item name="bold_italics_font" type="Font"> + </theme_item> + <theme_item name="italics_font" type="Font"> + </theme_item> + <theme_item name="bold_font" type="Font"> + </theme_item> + <theme_item name="normal_font" type="Font"> </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> @@ -24083,6 +27273,42 @@ <description> </description> </method> + <method name="set_gravity_scale"> + <argument index="0" name="gravity_scale" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_gravity_scale" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_linear_damp"> + <argument index="0" name="linear_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_linear_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_angular_damp"> + <argument index="0" name="angular_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_angular_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="set_max_contacts_reported"> <argument index="0" name="amount" type="int"> </argument> @@ -24324,6 +27550,42 @@ Return the body bounciness. </description> </method> + <method name="set_gravity_scale"> + <argument index="0" name="gravity_scale" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_gravity_scale" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_linear_damp"> + <argument index="0" name="linear_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_linear_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_angular_damp"> + <argument index="0" name="angular_damp" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_angular_damp" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="set_linear_velocity"> <argument index="0" name="linear_velocity" type="Vector2"> </argument> @@ -24460,6 +27722,18 @@ Return true if the body has the ability to fall asleep when not moving. See [set_can_sleep]. </description> </method> + <method name="test_motion"> + <return type="bool"> + </return> + <argument index="0" name="motion" type="Vector2"> + </argument> + <argument index="1" name="margin" type="float" default="0.08"> + </argument> + <argument index="2" name="result" type="Physics2DTestMotionResult" default="NULL"> + </argument> + <description> + </description> + </method> <method name="get_colliding_bodies" qualifiers="const"> <return type="Array"> </return> @@ -25437,6 +28711,30 @@ <description> </description> </method> + <method name="set_debug_collisions_hint"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_debugging_collisions_hint" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="set_debug_navigation_hint"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_debugging_navigation_hint" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_edited_scene_root"> <argument index="0" name="scene" type="Object"> </argument> @@ -25517,6 +28815,40 @@ <description> </description> </method> + <method name="set_current_scene"> + <argument index="0" name="child_node" type="Node"> + </argument> + <description> + </description> + </method> + <method name="get_current_scene" qualifiers="const"> + <return type="Node"> + </return> + <description> + </description> + </method> + <method name="change_scene"> + <return type="int"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + <method name="change_scene_to"> + <return type="int"> + </return> + <argument index="0" name="packed_scene" type="PackedScene"> + </argument> + <description> + </description> + </method> + <method name="reload_current_scene"> + <return type="int"> + </return> + <description> + </description> + </method> </methods> <signals> <signal name="screen_resized"> @@ -25529,10 +28861,18 @@ <description> </description> </signal> + <signal name="idle_frame"> + <description> + </description> + </signal> <signal name="tree_changed"> <description> </description> </signal> + <signal name="fixed_frame"> + <description> + </description> + </signal> </signals> <constants> <constant name="GROUP_CALL_DEFAULT" value="0"> @@ -25740,13 +29080,13 @@ </description> <methods> <method name="wait"> - <return type="int"> + <return type="Error"> </return> <description> </description> </method> <method name="post"> - <return type="int"> + <return type="Error"> </return> <description> </description> @@ -25775,12 +29115,6 @@ To be changed, ignore. </description> <methods> - <method name="set_mode"> - <argument index="0" name="mode" type="int"> - </argument> - <description> - </description> - </method> <method name="get_mode" qualifiers="const"> <return type="int"> </return> @@ -25819,6 +29153,22 @@ <description> </description> </method> + <method name="set_default_texture_param"> + <argument index="0" name="param" type="String"> + </argument> + <argument index="1" name="texture" type="Texture"> + </argument> + <description> + </description> + </method> + <method name="get_default_texture_param" qualifiers="const"> + <return type="Texture"> + </return> + <argument index="0" name="param" type="String"> + </argument> + <description> + </description> + </method> <method name="has_param" qualifiers="const"> <return type="bool"> </return> @@ -25837,6 +29187,852 @@ </constant> </constants> </class> +<class name="ShaderGraph" inherits="Shader" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="node_add"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="node_type" type="int"> + </argument> + <argument index="2" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="node_remove"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="node_set_pos"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="pos" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="node_get_pos" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="node_get_type" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_node_list" qualifiers="const"> + <return type="Array"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <description> + </description> + </method> + <method name="scalar_const_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="scalar_const_node_get_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="arg2" type="float"> + </argument> + <description> + </description> + </method> + <method name="vec_const_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="vec_const_node_get_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="arg2" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="rgb_const_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="Color"> + </argument> + <description> + </description> + </method> + <method name="rgb_const_node_get_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="arg2" type="Color"> + </argument> + <description> + </description> + </method> + <method name="xform_const_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="xform_const_node_get_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="arg2" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="texture_node_set_filter_size"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="filter_size" type="int"> + </argument> + <description> + </description> + </method> + <method name="texture_node_get_filter_size"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="arg2" type="int"> + </argument> + <description> + </description> + </method> + <method name="texture_node_set_filter_strength"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <argument index="2" name="filter_strength" type="float"> + </argument> + <description> + </description> + </method> + <method name="texture_node_get_filter_strength"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <argument index="2" name="arg2" type="float"> + </argument> + <description> + </description> + </method> + <method name="scalar_op_node_set_op"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <argument index="2" name="op" type="int"> + </argument> + <description> + </description> + </method> + <method name="scalar_op_node_get_op" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <description> + </description> + </method> + <method name="vec_op_node_set_op"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <argument index="2" name="op" type="int"> + </argument> + <description> + </description> + </method> + <method name="vec_op_node_get_op" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <description> + </description> + </method> + <method name="vec_scalar_op_node_set_op"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <argument index="2" name="op" type="int"> + </argument> + <description> + </description> + </method> + <method name="vec_scalar_op_node_get_op" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <description> + </description> + </method> + <method name="rgb_op_node_set_op"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <argument index="2" name="op" type="int"> + </argument> + <description> + </description> + </method> + <method name="rgb_op_node_get_op" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="float"> + </argument> + <description> + </description> + </method> + <method name="xform_vec_mult_node_set_no_translation"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="disable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="xform_vec_mult_node_get_no_translation" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="scalar_func_node_set_function"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="func" type="int"> + </argument> + <description> + </description> + </method> + <method name="scalar_func_node_get_function" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="vec_func_node_set_function"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="func" type="int"> + </argument> + <description> + </description> + </method> + <method name="vec_func_node_get_function" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="input_node_set_name"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="name" type="String"> + </argument> + <description> + </description> + </method> + <method name="input_node_get_name"> + <return type="String"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="scalar_input_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + </description> + </method> + <method name="scalar_input_node_get_value" qualifiers="const"> + <return type="float"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="vec_input_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="vec_input_node_get_value" qualifiers="const"> + <return type="Vector3"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="rgb_input_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="Color"> + </argument> + <description> + </description> + </method> + <method name="rgb_input_node_get_value" qualifiers="const"> + <return type="Color"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="xform_input_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="Transform"> + </argument> + <description> + </description> + </method> + <method name="xform_input_node_get_value" qualifiers="const"> + <return type="Transform"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="texture_input_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="Texture"> + </argument> + <description> + </description> + </method> + <method name="texture_input_node_get_value" qualifiers="const"> + <return type="Texture"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="cubemap_input_node_set_value"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="value" type="CubeMap"> + </argument> + <description> + </description> + </method> + <method name="cubemap_input_node_get_value" qualifiers="const"> + <return type="CubeMap"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="comment_node_set_text"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="text" type="String"> + </argument> + <description> + </description> + </method> + <method name="comment_node_get_text" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="color_ramp_node_set_ramp"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="colors" type="ColorArray"> + </argument> + <argument index="3" name="offsets" type="RealArray"> + </argument> + <description> + </description> + </method> + <method name="color_ramp_node_get_colors" qualifiers="const"> + <return type="ColorArray"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="color_ramp_node_get_offsets" qualifiers="const"> + <return type="RealArray"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="curve_map_node_set_points"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="points" type="Vector2Array"> + </argument> + <description> + </description> + </method> + <method name="curve_map_node_get_points" qualifiers="const"> + <return type="Vector2Array"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="connect_node"> + <return type="Error"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="src_id" type="int"> + </argument> + <argument index="2" name="src_slot" type="int"> + </argument> + <argument index="3" name="dst_id" type="int"> + </argument> + <argument index="4" name="dst_slot" type="int"> + </argument> + <description> + </description> + </method> + <method name="is_node_connected" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="src_id" type="int"> + </argument> + <argument index="2" name="src_slot" type="int"> + </argument> + <argument index="3" name="dst_id" type="int"> + </argument> + <argument index="4" name="dst_slot" type="int"> + </argument> + <description> + </description> + </method> + <method name="disconnect_node"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="src_id" type="int"> + </argument> + <argument index="2" name="src_slot" type="int"> + </argument> + <argument index="3" name="dst_id" type="int"> + </argument> + <argument index="4" name="dst_slot" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_node_connections" qualifiers="const"> + <return type="Array"> + </return> + <argument index="0" name="shader_type" type="int"> + </argument> + <description> + </description> + </method> + <method name="clear"> + <argument index="0" name="shader_type" type="int"> + </argument> + <description> + </description> + </method> + <method name="node_set_state"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="state" type="var"> + </argument> + <description> + </description> + </method> + <method name="node_get_state" qualifiers="const"> + <argument index="0" name="shader_type" type="int"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <description> + </description> + </method> + </methods> + <signals> + <signal name="updated"> + <description> + </description> + </signal> + </signals> + <constants> + <constant name="NODE_INPUT" value="0"> + </constant> + <constant name="NODE_SCALAR_CONST" value="1"> + </constant> + <constant name="NODE_VEC_CONST" value="2"> + </constant> + <constant name="NODE_RGB_CONST" value="3"> + </constant> + <constant name="NODE_XFORM_CONST" value="4"> + </constant> + <constant name="NODE_TIME" value="5"> + </constant> + <constant name="NODE_SCREEN_TEX" value="6"> + </constant> + <constant name="NODE_SCALAR_OP" value="7"> + </constant> + <constant name="NODE_VEC_OP" value="8"> + </constant> + <constant name="NODE_VEC_SCALAR_OP" value="9"> + </constant> + <constant name="NODE_RGB_OP" value="10"> + </constant> + <constant name="NODE_XFORM_MULT" value="11"> + </constant> + <constant name="NODE_XFORM_VEC_MULT" value="12"> + </constant> + <constant name="NODE_XFORM_VEC_INV_MULT" value="13"> + </constant> + <constant name="NODE_SCALAR_FUNC" value="14"> + </constant> + <constant name="NODE_VEC_FUNC" value="15"> + </constant> + <constant name="NODE_VEC_LEN" value="16"> + </constant> + <constant name="NODE_DOT_PROD" value="17"> + </constant> + <constant name="NODE_VEC_TO_SCALAR" value="18"> + </constant> + <constant name="NODE_SCALAR_TO_VEC" value="19"> + </constant> + <constant name="NODE_VEC_TO_XFORM" value="21"> + </constant> + <constant name="NODE_XFORM_TO_VEC" value="20"> + </constant> + <constant name="NODE_SCALAR_INTERP" value="22"> + </constant> + <constant name="NODE_VEC_INTERP" value="23"> + </constant> + <constant name="NODE_COLOR_RAMP" value="24"> + </constant> + <constant name="NODE_CURVE_MAP" value="25"> + </constant> + <constant name="NODE_SCALAR_INPUT" value="26"> + </constant> + <constant name="NODE_VEC_INPUT" value="27"> + </constant> + <constant name="NODE_RGB_INPUT" value="28"> + </constant> + <constant name="NODE_XFORM_INPUT" value="29"> + </constant> + <constant name="NODE_TEXTURE_INPUT" value="30"> + </constant> + <constant name="NODE_CUBEMAP_INPUT" value="31"> + </constant> + <constant name="NODE_DEFAULT_TEXTURE" value="32"> + </constant> + <constant name="NODE_OUTPUT" value="33"> + </constant> + <constant name="NODE_COMMENT" value="34"> + </constant> + <constant name="NODE_TYPE_MAX" value="35"> + </constant> + <constant name="SLOT_TYPE_SCALAR" value="0"> + </constant> + <constant name="SLOT_TYPE_VEC" value="1"> + </constant> + <constant name="SLOT_TYPE_XFORM" value="2"> + </constant> + <constant name="SLOT_TYPE_TEXTURE" value="3"> + </constant> + <constant name="SLOT_MAX" value="4"> + </constant> + <constant name="SHADER_TYPE_VERTEX" value="0"> + </constant> + <constant name="SHADER_TYPE_FRAGMENT" value="1"> + </constant> + <constant name="SHADER_TYPE_LIGHT" value="2"> + </constant> + <constant name="SHADER_TYPE_MAX" value="3"> + </constant> + <constant name="SLOT_IN" value="0"> + </constant> + <constant name="SLOT_OUT" value="1"> + </constant> + <constant name="GRAPH_OK" value="0"> + </constant> + <constant name="GRAPH_ERROR_CYCLIC" value="1"> + </constant> + <constant name="GRAPH_ERROR_MISSING_CONNECTIONS" value="2"> + </constant> + <constant name="SCALAR_OP_ADD" value="0"> + </constant> + <constant name="SCALAR_OP_SUB" value="1"> + </constant> + <constant name="SCALAR_OP_MUL" value="2"> + </constant> + <constant name="SCALAR_OP_DIV" value="3"> + </constant> + <constant name="SCALAR_OP_MOD" value="4"> + </constant> + <constant name="SCALAR_OP_POW" value="5"> + </constant> + <constant name="SCALAR_OP_MAX" value="6"> + </constant> + <constant name="SCALAR_OP_MIN" value="7"> + </constant> + <constant name="SCALAR_OP_ATAN2" value="8"> + </constant> + <constant name="SCALAR_MAX_OP" value="9"> + </constant> + <constant name="VEC_OP_ADD" value="0"> + </constant> + <constant name="VEC_OP_SUB" value="1"> + </constant> + <constant name="VEC_OP_MUL" value="2"> + </constant> + <constant name="VEC_OP_DIV" value="3"> + </constant> + <constant name="VEC_OP_MOD" value="4"> + </constant> + <constant name="VEC_OP_POW" value="5"> + </constant> + <constant name="VEC_OP_MAX" value="6"> + </constant> + <constant name="VEC_OP_MIN" value="7"> + </constant> + <constant name="VEC_OP_CROSS" value="8"> + </constant> + <constant name="VEC_MAX_OP" value="9"> + </constant> + <constant name="VEC_SCALAR_OP_MUL" value="0"> + </constant> + <constant name="VEC_SCALAR_OP_DIV" value="1"> + </constant> + <constant name="VEC_SCALAR_OP_POW" value="2"> + </constant> + <constant name="VEC_SCALAR_MAX_OP" value="3"> + </constant> + <constant name="RGB_OP_SCREEN" value="0"> + </constant> + <constant name="RGB_OP_DIFFERENCE" value="1"> + </constant> + <constant name="RGB_OP_DARKEN" value="2"> + </constant> + <constant name="RGB_OP_LIGHTEN" value="3"> + </constant> + <constant name="RGB_OP_OVERLAY" value="4"> + </constant> + <constant name="RGB_OP_DODGE" value="5"> + </constant> + <constant name="RGB_OP_BURN" value="6"> + </constant> + <constant name="RGB_OP_SOFT_LIGHT" value="7"> + </constant> + <constant name="RGB_OP_HARD_LIGHT" value="8"> + </constant> + <constant name="RGB_MAX_OP" value="9"> + </constant> + <constant name="SCALAR_FUNC_SIN" value="0"> + </constant> + <constant name="SCALAR_FUNC_COS" value="1"> + </constant> + <constant name="SCALAR_FUNC_TAN" value="2"> + </constant> + <constant name="SCALAR_FUNC_ASIN" value="3"> + </constant> + <constant name="SCALAR_FUNC_ACOS" value="4"> + </constant> + <constant name="SCALAR_FUNC_ATAN" value="5"> + </constant> + <constant name="SCALAR_FUNC_SINH" value="6"> + </constant> + <constant name="SCALAR_FUNC_COSH" value="7"> + </constant> + <constant name="SCALAR_FUNC_TANH" value="8"> + </constant> + <constant name="SCALAR_FUNC_LOG" value="9"> + </constant> + <constant name="SCALAR_FUNC_EXP" value="10"> + </constant> + <constant name="SCALAR_FUNC_SQRT" value="11"> + </constant> + <constant name="SCALAR_FUNC_ABS" value="12"> + </constant> + <constant name="SCALAR_FUNC_SIGN" value="13"> + </constant> + <constant name="SCALAR_FUNC_FLOOR" value="14"> + </constant> + <constant name="SCALAR_FUNC_ROUND" value="15"> + </constant> + <constant name="SCALAR_FUNC_CEIL" value="16"> + </constant> + <constant name="SCALAR_FUNC_FRAC" value="17"> + </constant> + <constant name="SCALAR_FUNC_SATURATE" value="18"> + </constant> + <constant name="SCALAR_FUNC_NEGATE" value="19"> + </constant> + <constant name="SCALAR_MAX_FUNC" value="20"> + </constant> + <constant name="VEC_FUNC_NORMALIZE" value="0"> + </constant> + <constant name="VEC_FUNC_SATURATE" value="1"> + </constant> + <constant name="VEC_FUNC_NEGATE" value="2"> + </constant> + <constant name="VEC_FUNC_RECIPROCAL" value="3"> + </constant> + <constant name="VEC_FUNC_RGB2HSV" value="4"> + </constant> + <constant name="VEC_FUNC_HSV2RGB" value="5"> + </constant> + <constant name="VEC_MAX_FUNC" value="6"> + </constant> + </constants> +</class> <class name="ShaderMaterial" inherits="Material" category="Core"> <brief_description> </brief_description> @@ -26474,6 +30670,90 @@ <description> </description> </method> + <method name="set_notify_local_transform"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_local_transform_notification_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="rotate"> + <argument index="0" name="normal" type="Vector3"> + </argument> + <argument index="1" name="radians" type="float"> + </argument> + <description> + </description> + </method> + <method name="global_rotate"> + <argument index="0" name="normal" type="Vector3"> + </argument> + <argument index="1" name="radians" type="float"> + </argument> + <description> + </description> + </method> + <method name="rotate_x"> + <argument index="0" name="radians" type="float"> + </argument> + <description> + </description> + </method> + <method name="rotate_y"> + <argument index="0" name="radians" type="float"> + </argument> + <description> + </description> + </method> + <method name="rotate_z"> + <argument index="0" name="radians" type="float"> + </argument> + <description> + </description> + </method> + <method name="translate"> + <argument index="0" name="offset" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="global_translate"> + <argument index="0" name="offset" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="orthonormalize"> + <description> + </description> + </method> + <method name="set_identity"> + <description> + </description> + </method> + <method name="look_at"> + <argument index="0" name="target" type="Vector3"> + </argument> + <argument index="1" name="up" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="look_at_from_pos"> + <argument index="0" name="pos" type="Vector3"> + </argument> + <argument index="1" name="target" type="Vector3"> + </argument> + <argument index="2" name="up" type="Vector3"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="visibility_changed"> @@ -26678,6 +30958,8 @@ </description> </method> <method name="play"> + <argument index="0" name="arg0" type="float" default="0"> + </argument> <description> </description> </method> @@ -26691,6 +30973,18 @@ <description> </description> </method> + <method name="set_paused"> + <argument index="0" name="paused" type="bool"> + </argument> + <description> + </description> + </method> + <method name="is_paused" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> <method name="set_loop"> <argument index="0" name="enabled" type="bool"> </argument> @@ -26703,6 +30997,54 @@ <description> </description> </method> + <method name="set_volume"> + <argument index="0" name="volume" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_volume" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_volume_db"> + <argument index="0" name="db" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_volume_db" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="set_buffering_msec"> + <argument index="0" name="msec" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_buffering_msec" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_loop_restart_time"> + <argument index="0" name="secs" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_loop_restart_time" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="get_stream_name" qualifiers="const"> <return type="String"> </return> @@ -26727,6 +31069,24 @@ <description> </description> </method> + <method name="set_autoplay"> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="has_autoplay" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="get_length" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -26865,6 +31225,14 @@ </description> </method> </methods> + <signals> + <signal name="dragged"> + <argument index="0" name="offset" type="int"> + </argument> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> @@ -27043,6 +31411,12 @@ </description> </method> </methods> + <signals> + <signal name="frame_changed"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> @@ -27125,6 +31499,12 @@ </description> </method> </methods> + <signals> + <signal name="frame_changed"> + <description> + </description> + </signal> + </signals> <constants> </constants> </class> @@ -27518,7 +31898,7 @@ </description> <methods> <method name="accept"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="stream" type="StreamPeer"> </argument> @@ -27526,7 +31906,7 @@ </description> </method> <method name="connect"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="stream" type="StreamPeer"> </argument> @@ -27572,7 +31952,7 @@ </return> <argument index="0" name="host" type="String"> </argument> - <argument index="1" name="ip" type="int"> + <argument index="1" name="port" type="int"> </argument> <description> </description> @@ -27638,6 +32018,8 @@ </description> </method> <method name="play"> + <argument index="0" name="arg0" type="float" default="0"> + </argument> <description> </description> </method> @@ -27699,6 +32081,30 @@ <description> </description> </method> + <method name="set_buffering_msec"> + <argument index="0" name="msec" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_buffering_msec" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="set_loop_restart_time"> + <argument index="0" name="secs" type="float"> + </argument> + <description> + </description> + </method> + <method name="get_loop_restart_time" qualifiers="const"> + <return type="float"> + </return> + <description> + </description> + </method> <method name="get_stream_name" qualifiers="const"> <return type="String"> </return> @@ -28110,6 +32516,12 @@ Return part of the string from "from", with length "len". </description> </method> + <method name="to_ascii"> + <return type="String"> + </return> + <description> + </description> + </method> <method name="to_float"> <return type="float"> </return> @@ -28138,6 +32550,12 @@ Return the string converted to uppercase. </description> </method> + <method name="to_utf8"> + <return type="String"> + </return> + <description> + </description> + </method> <method name="xml_escape"> <return type="String"> </return> @@ -28199,6 +32617,8 @@ </description> </method> <method name="StringArray"> + <return type="StringArray"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> @@ -28682,6 +33102,20 @@ Return the current tab that is being showed. </description> </method> + <method name="get_current_tab_control" qualifiers="const"> + <return type="Control"> + </return> + <description> + </description> + </method> + <method name="get_tab_control" qualifiers="const"> + <return type="Control"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> <method name="set_tab_align"> <argument index="0" name="align" type="int"> </argument> @@ -28745,8 +33179,24 @@ <description> </description> </method> + <method name="set_popup"> + <argument index="0" name="popup" type="Popup"> + </argument> + <description> + </description> + </method> + <method name="get_popup" qualifiers="const"> + <return type="Popup"> + </return> + <description> + </description> + </method> </methods> <signals> + <signal name="pre_popup_pressed"> + <description> + </description> + </signal> <signal name="tab_changed"> <argument index="0" name="tab" type="int"> </argument> @@ -28772,8 +33222,12 @@ </theme_item> <theme_item name="font_color_fg" type="Color"> </theme_item> + <theme_item name="menu_hilite" type="Texture"> + </theme_item> <theme_item name="increment_hilite" type="Texture"> </theme_item> + <theme_item name="menu" type="Texture"> + </theme_item> <theme_item name="decrement_hilite" type="Texture"> </theme_item> <theme_item name="increment" type="Texture"> @@ -28862,8 +33316,26 @@ <description> </description> </method> + <method name="set_tab_align"> + <argument index="0" name="align" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_tab_align" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> </methods> <signals> + <signal name="right_button_pressed"> + <argument index="0" name="tab" type="int"> + </argument> + <description> + </description> + </signal> <signal name="tab_changed"> <argument index="0" name="tab" type="int"> </argument> @@ -28872,6 +33344,12 @@ </signal> </signals> <constants> + <constant name="ALIGN_LEFT" value="0"> + </constant> + <constant name="ALIGN_CENTER" value="1"> + </constant> + <constant name="ALIGN_RIGHT" value="2"> + </constant> </constants> <theme_items> <theme_item name="label_valign_fg" type="int"> @@ -28890,10 +33368,14 @@ </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> + <theme_item name="button" type="StyleBox"> + </theme_item> <theme_item name="tab_bg" type="StyleBox"> </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> + <theme_item name="button_pressed" type="StyleBox"> + </theme_item> </theme_items> </class> <class name="TestCube" inherits="GeometryInstance" category="Core"> @@ -29179,10 +33661,6 @@ </description> </signal> <signal name="request_completion"> - <argument index="0" name="keyword" type="String"> - </argument> - <argument index="1" name="line" type="int"> - </argument> <description> </description> </signal> @@ -29223,6 +33701,8 @@ </theme_item> <theme_item name="completion_scroll_color" type="Color"> </theme_item> + <theme_item name="brace_mismatch_color" type="Color"> + </theme_item> <theme_item name="current_line_color" type="Color"> </theme_item> <theme_item name="mark_color" type="Color"> @@ -29304,8 +33784,9 @@ </argument> <argument index="2" name="modulate" type="Color" default="Color(1,1,1,1)"> </argument> + <argument index="3" name="arg3" type="bool" default="false"> + </argument> <description> - Draw the texture into a a [VisualServer] canvas item. </description> </method> <method name="draw_rect" qualifiers="const"> @@ -29317,6 +33798,8 @@ </argument> <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)"> </argument> + <argument index="4" name="arg4" type="bool" default="false"> + </argument> <description> </description> </method> @@ -29329,6 +33812,8 @@ </argument> <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)"> </argument> + <argument index="4" name="arg4" type="bool" default="false"> + </argument> <description> </description> </method> @@ -29353,6 +33838,8 @@ </constant> <constant name="FLAG_CONVERT_TO_LINEAR" value="16"> </constant> + <constant name="FLAG_MIRRORED_REPEAT" value="32"> + </constant> </constants> </class> <class name="TextureButton" inherits="BaseButton" category="Core"> @@ -29400,6 +33887,18 @@ <description> </description> </method> + <method name="set_scale"> + <argument index="0" name="scale" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="set_modulate"> + <argument index="0" name="color" type="Color"> + </argument> + <description> + </description> + </method> <method name="get_normal_texture" qualifiers="const"> <return type="Texture"> </return> @@ -29436,6 +33935,18 @@ <description> </description> </method> + <method name="get_scale" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="get_modulate" qualifiers="const"> + <return type="Color"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -29810,7 +34321,7 @@ </description> <methods> <method name="start"> - <return type="int"> + <return type="Error"> </return> <argument index="0" name="instance" type="Object"> </argument> @@ -29851,10 +34362,10 @@ </class> <class name="TileMap" inherits="Node2D" category="Core"> <brief_description> - Node for 2D Tile-Based games. + Node for 2D tile-based games. </brief_description> <description> - Node for 2D Tile-Based games. Tilemaps use a TileSet which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps. + Node for 2D tile-based games. Tilemaps use a [TileSet] which contain a list of tiles (textures, their rect and a collision) and are used to create complex grid-based maps. To optimize drawing and culling (sort of like [GridMap]), you can specify a quadrant size, so chunks of the map will be batched together at drawing time. </description> <methods> @@ -29876,36 +34387,43 @@ <argument index="0" name="mode" type="int"> </argument> <description> + Set the orientation mode as square, isometric or custom (use MODE_* constants as argument). </description> </method> <method name="get_mode" qualifiers="const"> <return type="int"> </return> <description> + Return the orientation mode. </description> </method> <method name="set_half_offset"> <argument index="0" name="half_offset" type="int"> </argument> <description> + Set an half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument). + Half offset sets every other tile off by a half tile size in the specified direction. </description> </method> <method name="get_half_offset" qualifiers="const"> <return type="int"> </return> <description> + Return the current half offset configuration. </description> </method> <method name="set_custom_transform"> <argument index="0" name="custom_transform" type="Matrix32"> </argument> <description> + Set custom transform matrix, to use in combination with the custom orientation mode. </description> </method> <method name="get_custom_transform" qualifiers="const"> <return type="Matrix32"> </return> <description> + Return the custom transform matrix. </description> </method> <method name="set_cell_size"> @@ -29927,13 +34445,28 @@ </argument> <description> Set the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time. + Allowed values are integers ranging from 1 to 128. </description> </method> <method name="get_quadrant_size" qualifiers="const"> <return type="int"> </return> <description> - Return the quadrant size, this optimizes drawing by batching chunks of map at draw/cull time. + Return the quadrant size. + </description> + </method> + <method name="set_tile_origin"> + <argument index="0" name="origin" type="int"> + </argument> + <description> + Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument). + </description> + </method> + <method name="get_tile_origin" qualifiers="const"> + <return type="int"> + </return> + <description> + Return the tile origin configuration. </description> </method> <method name="set_center_x"> @@ -29964,40 +34497,93 @@ Return true if tiles are to be centered in y coordinate (by default this is false and they are drawn from upper left cell corner). </description> </method> - <method name="set_collision_layer_mask"> + <method name="set_y_sort_mode"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + Set the Y sort mode. Enabled Y sort mode means that children of the tilemap will be drawn in the order defined by their Y coordinate. + A tile with a higher Y coordinate will therefore be drawn later, potentially covering up the tile(s) above it if its sprite is higher than its cell size. + </description> + </method> + <method name="is_y_sort_mode_enabled" qualifiers="const"> + <return type="bool"> + </return> + <description> + Return the Y sort mode. + </description> + </method> + <method name="set_collision_use_kinematic"> + <argument index="0" name="use_kinematic" type="bool"> + </argument> + <description> + Set the tilemap to handle collisions as a kinematic body (enabled) or a static body (disabled). + </description> + </method> + <method name="get_collision_use_kinematic" qualifiers="const"> + <return type="bool"> + </return> + <description> + Return whether the tilemap handles collisions as a kinematic body. + </description> + </method> + <method name="set_collision_layer"> + <argument index="0" name="mask" type="int"> + </argument> + <description> + Set the collision layer. + Layers are referenced by binary indexes, so allowable values to describe the 20 available layers range from 0 to 2^20-1. + </description> + </method> + <method name="get_collision_layer" qualifiers="const"> + <return type="int"> + </return> + <description> + Return the collision layer. + </description> + </method> + <method name="set_collision_mask"> <argument index="0" name="mask" type="int"> </argument> <description> + Set the collision masks. + Masks are referenced by binary indexes, so allowable values to describe the 20 available masks range from 0 to 2^20-1. </description> </method> - <method name="get_collision_layer_mask" qualifiers="const"> + <method name="get_collision_mask" qualifiers="const"> <return type="int"> </return> <description> + Return the collision mask. </description> </method> <method name="set_collision_friction"> <argument index="0" name="value" type="float"> </argument> <description> + Set the collision friction parameter. + Allowable values range from 0 to 1. </description> </method> <method name="get_collision_friction" qualifiers="const"> <return type="float"> </return> <description> + Return the collision friction parameter. </description> </method> <method name="set_collision_bounce"> <argument index="0" name="value" type="float"> </argument> <description> + Set the collision bounce parameter. + Allowable values range from 0 to 1. </description> </method> <method name="get_collision_bounce" qualifiers="const"> <return type="float"> </return> <description> + Return the collision bounce parameter. </description> </method> <method name="set_cell"> @@ -30011,8 +34597,29 @@ </argument> <argument index="4" name="flip_y" type="bool" default="false"> </argument> + <argument index="5" name="transpose" type="bool" default="false"> + </argument> + <description> + Set the tile index for the cell referenced by its grid-based X and Y coordinates. + A tile index of -1 clears the cell. + Optionally, the tile can also be flipped over the X and Y coordinates or transposed. + </description> + </method> + <method name="set_cellv"> + <argument index="0" name="pos" type="Vector2"> + </argument> + <argument index="1" name="tile" type="int"> + </argument> + <argument index="2" name="flip_x" type="bool" default="false"> + </argument> + <argument index="3" name="flip_y" type="bool" default="false"> + </argument> + <argument index="4" name="transpose" type="bool" default="false"> + </argument> <description> - Set the contents of a cell. Cells can be optionally flipped in y or x. + Set the tile index for the cell referenced by a Vector2 of grid-based coordinates. + A tile index of -1 clears the cell. + Optionally, the tile can also be flipped over the X and Y axes or transposed. </description> </method> <method name="get_cell" qualifiers="const"> @@ -30023,7 +34630,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Return the contents of a cell. + Return the tile index of the referenced cell. </description> </method> <method name="is_cell_x_flipped" qualifiers="const"> @@ -30034,7 +34641,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Return if a given cell is flipped in x axis. + Return whether the referenced cell is flipped over the X axis. </description> </method> <method name="is_cell_y_flipped" qualifiers="const"> @@ -30045,7 +34652,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Return if a given cell is flipped in y axis. + Return whether the referenced cell is flipped over the Y axis. </description> </method> <method name="clear"> @@ -30053,6 +34660,13 @@ Clear all cells. </description> </method> + <method name="get_used_cells" qualifiers="const"> + <return type="Array"> + </return> + <description> + Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1). + </description> + </method> <method name="map_to_world" qualifiers="const"> <return type="Vector2"> </return> @@ -30061,6 +34675,8 @@ <argument index="1" name="ignore_half_ofs" type="bool" default="false"> </argument> <description> + Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument. + Optionally, the tilemap's potential half offset can be ignored. </description> </method> <method name="world_to_map" qualifiers="const"> @@ -30069,12 +34685,14 @@ <argument index="0" name="worldpos" type="Vector2"> </argument> <description> + Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument. </description> </method> </methods> <signals> <signal name="settings_changed"> <description> + Signal indicating that a tilemap setting has changed. </description> </signal> </signals> @@ -30083,16 +34701,28 @@ Returned when a cell doesn't exist. </constant> <constant name="MODE_SQUARE" value="0"> + Orthogonal orientation mode. </constant> <constant name="MODE_ISOMETRIC" value="1"> + Isometric orientation mode. </constant> <constant name="MODE_CUSTOM" value="2"> + Custom orientation mode. </constant> <constant name="HALF_OFFSET_X" value="0"> + Half offset on the X coordinate. </constant> <constant name="HALF_OFFSET_Y" value="1"> + Half offset on the Y coordinate. </constant> <constant name="HALF_OFFSET_DISABLED" value="2"> + Half offset disabled. + </constant> + <constant name="TILE_ORIGIN_TOP_LEFT" value="0"> + Tile origin at its top-left corner. + </constant> + <constant name="TILE_ORIGIN_CENTER" value="1"> + Tile origin at its center. </constant> </constants> </class> @@ -30147,6 +34777,22 @@ Return the texture of the tile. </description> </method> + <method name="tile_set_material"> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="material" type="CanvasItemMaterial"> + </argument> + <description> + </description> + </method> + <method name="tile_get_material" qualifiers="const"> + <return type="CanvasItemMaterial"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> <method name="tile_set_texture_offset"> <argument index="0" name="id" type="int"> </argument> @@ -30231,6 +34877,70 @@ <description> </description> </method> + <method name="tile_set_navigation_polygon"> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="navigation_polygon" type="NavigationPolygon"> + </argument> + <description> + </description> + </method> + <method name="tile_get_navigation_polygon" qualifiers="const"> + <return type="NavigationPolygon"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="tile_set_navigation_polygon_offset"> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="navigation_polygon_offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="tile_get_navigation_polygon_offset" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="tile_set_light_occluder"> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="light_occluder" type="OccluderPolygon2D"> + </argument> + <description> + </description> + </method> + <method name="tile_get_light_occluder" qualifiers="const"> + <return type="OccluderPolygon2D"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> + <method name="tile_set_occluder_offset"> + <argument index="0" name="id" type="int"> + </argument> + <argument index="1" name="occluder_offset" type="Vector2"> + </argument> + <description> + </description> + </method> + <method name="tile_get_occluder_offset" qualifiers="const"> + <return type="Vector2"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + </description> + </method> <method name="remove_tile"> <argument index="0" name="id" type="int"> </argument> @@ -30335,6 +35045,18 @@ Return the time left for timeout if the timer is active. </description> </method> + <method name="set_timer_process_mode"> + <argument index="0" name="mode" type="int"> + </argument> + <description> + </description> + </method> + <method name="get_timer_process_mode" qualifiers="const"> + <return type="int"> + </return> + <description> + </description> + </method> </methods> <signals> <signal name="timeout"> @@ -30346,6 +35068,40 @@ <constants> </constants> </class> +<class name="ToolButton" inherits="Button" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + </methods> + <constants> + </constants> + <theme_items> + <theme_item name="hseparation" type="int"> + </theme_item> + <theme_item name="font_color_disabled" type="Color"> + </theme_item> + <theme_item name="font_color" type="Color"> + </theme_item> + <theme_item name="font_color_hover" type="Color"> + </theme_item> + <theme_item name="font_color_pressed" type="Color"> + </theme_item> + <theme_item name="font" type="Font"> + </theme_item> + <theme_item name="hover" type="StyleBox"> + </theme_item> + <theme_item name="pressed" type="StyleBox"> + </theme_item> + <theme_item name="focus" type="StyleBox"> + </theme_item> + <theme_item name="disabled" type="StyleBox"> + </theme_item> + <theme_item name="normal" type="StyleBox"> + </theme_item> + </theme_items> +</class> <class name="TouchScreenButton" inherits="Node2D" category="Core"> <brief_description> </brief_description> @@ -30526,6 +35282,8 @@ </description> </method> <method name="Transform"> + <return type="Transform"> + </return> <argument index="0" name="x_axis" type="Vector3"> </argument> <argument index="1" name="y_axis" type="Vector3"> @@ -30538,6 +35296,8 @@ </description> </method> <method name="Transform"> + <return type="Transform"> + </return> <argument index="0" name="basis" type="Matrix3"> </argument> <argument index="1" name="origin" type="Vector3"> @@ -30546,18 +35306,24 @@ </description> </method> <method name="Transform"> + <return type="Transform"> + </return> <argument index="0" name="from" type="Matrix32"> </argument> <description> </description> </method> <method name="Transform"> + <return type="Transform"> + </return> <argument index="0" name="from" type="Quat"> </argument> <description> </description> </method> <method name="Transform"> + <return type="Transform"> + </return> <argument index="0" name="from" type="Matrix3"> </argument> <description> @@ -31411,7 +36177,7 @@ <method name="reset"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="key" type="String"> </argument> @@ -31427,7 +36193,7 @@ <method name="stop"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="key" type="String"> </argument> @@ -31443,7 +36209,7 @@ <method name="resume"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="key" type="String"> </argument> @@ -31459,7 +36225,7 @@ <method name="remove"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="key" type="String"> </argument> @@ -31495,7 +36261,7 @@ <method name="interpolate_property"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="property" type="String"> </argument> @@ -31517,7 +36283,7 @@ <method name="interpolate_method"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="method" type="String"> </argument> @@ -31539,13 +36305,43 @@ <method name="interpolate_callback"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="times_in_sec" type="float"> + </argument> + <argument index="2" name="callback" type="String"> </argument> - <argument index="1" name="callback" type="String"> + <argument index="3" name="arg1" type="var" default="NULL"> </argument> - <argument index="2" name="times_in_sec" type="float"> + <argument index="4" name="arg2" type="var" default="NULL"> </argument> - <argument index="3" name="args" type="var" default="NULL"> + <argument index="5" name="arg3" type="var" default="NULL"> + </argument> + <argument index="6" name="arg4" type="var" default="NULL"> + </argument> + <argument index="7" name="arg5" type="var" default="NULL"> + </argument> + <description> + </description> + </method> + <method name="interpolate_deferred_callback"> + <return type="bool"> + </return> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="times_in_sec" type="float"> + </argument> + <argument index="2" name="callback" type="String"> + </argument> + <argument index="3" name="arg1" type="var" default="NULL"> + </argument> + <argument index="4" name="arg2" type="var" default="NULL"> + </argument> + <argument index="5" name="arg3" type="var" default="NULL"> + </argument> + <argument index="6" name="arg4" type="var" default="NULL"> + </argument> + <argument index="7" name="arg5" type="var" default="NULL"> </argument> <description> </description> @@ -31553,7 +36349,7 @@ <method name="follow_property"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="property" type="String"> </argument> @@ -31577,7 +36373,7 @@ <method name="follow_method"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="method" type="String"> </argument> @@ -31601,7 +36397,7 @@ <method name="targeting_property"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="property" type="String"> </argument> @@ -31625,7 +36421,7 @@ <method name="targeting_method"> <return type="bool"> </return> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="method" type="String"> </argument> @@ -31649,7 +36445,7 @@ </methods> <signals> <signal name="tween_complete"> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="key" type="String"> </argument> @@ -31657,7 +36453,7 @@ </description> </signal> <signal name="tween_step"> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="key" type="String"> </argument> @@ -31669,7 +36465,7 @@ </description> </signal> <signal name="tween_start"> - <argument index="0" name="node" type="Object"> + <argument index="0" name="object" type="Object"> </argument> <argument index="1" name="key" type="String"> </argument> @@ -31678,6 +36474,10 @@ </signal> </signals> <constants> + <constant name="TWEEN_PROCESS_FIXED" value="0"> + </constant> + <constant name="TWEEN_PROCESS_IDLE" value="1"> + </constant> <constant name="TRANS_LINEAR" value="0"> </constant> <constant name="TRANS_SINE" value="1"> @@ -31710,44 +36510,104 @@ </constant> </constants> </class> -<class name="UnshadedMaterial" inherits="Material" category="Core"> +<class name="UndoRedo" inherits="Object" category="Core"> <brief_description> </brief_description> <description> </description> <methods> - <method name="set_texture"> - <argument index="0" name="texture" type="Object"> + <method name="create_action"> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="mergeable" type="bool" default="false"> </argument> <description> </description> </method> - <method name="get_texture" qualifiers="const"> - <return type="Texture"> - </return> + <method name="commit_action"> <description> </description> </method> - <method name="set_use_alpha"> - <argument index="0" name="enable" type="bool"> + <method name="add_do_method"> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="method" type="String"> + </argument> + <argument index="2" name="arg0" type="var" default="NULL"> + </argument> + <argument index="3" name="arg1" type="var" default="NULL"> + </argument> + <argument index="4" name="arg2" type="var" default="NULL"> + </argument> + <argument index="5" name="arg3" type="var" default="NULL"> + </argument> + <argument index="6" name="arg4" type="var" default="NULL"> </argument> <description> </description> </method> - <method name="is_using_alpha" qualifiers="const"> - <return type="bool"> - </return> + <method name="add_undo_method"> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="method" type="String"> + </argument> + <argument index="2" name="arg0" type="var" default="NULL"> + </argument> + <argument index="3" name="arg1" type="var" default="NULL"> + </argument> + <argument index="4" name="arg2" type="var" default="NULL"> + </argument> + <argument index="5" name="arg3" type="var" default="NULL"> + </argument> + <argument index="6" name="arg4" type="var" default="NULL"> + </argument> <description> </description> </method> - <method name="set_use_color_array"> - <argument index="0" name="enable" type="bool"> + <method name="add_do_property"> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="property" type="String"> + </argument> + <argument index="2" name="value" type="var"> </argument> <description> </description> </method> - <method name="is_using_color_array" qualifiers="const"> - <return type="bool"> + <method name="add_undo_property"> + <argument index="0" name="object" type="Object"> + </argument> + <argument index="1" name="property" type="String"> + </argument> + <argument index="2" name="value" type="var"> + </argument> + <description> + </description> + </method> + <method name="add_do_reference"> + <argument index="0" name="object" type="Object"> + </argument> + <description> + </description> + </method> + <method name="add_undo_reference"> + <argument index="0" name="object" type="Object"> + </argument> + <description> + </description> + </method> + <method name="clear_history"> + <description> + </description> + </method> + <method name="get_current_action_name" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_version" qualifiers="const"> + <return type="int"> </return> <description> </description> @@ -31912,6 +36772,7 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> + Returns the angle in radians between the two vectors. </description> </method> <method name="angle_to_point"> @@ -31920,12 +36781,14 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> + Returns the angle in radians between the line connecting the two points and the x coordinate. </description> </method> <method name="atan2"> <return type="float"> </return> <description> + Returns the result of atan2 when called with the Vector's x and y as parameters. </description> </method> <method name="cubic_interpolate"> @@ -31940,6 +36803,7 @@ <argument index="3" name="t" type="float"> </argument> <description> + Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t". </description> </method> <method name="distance_squared_to"> @@ -31948,6 +36812,7 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> + Returns the squared distance to vector "b". Prefer this function over "distance_to" if you need to sort vectors or need the squared distance for some formula. </description> </method> <method name="distance_to"> @@ -31985,6 +36850,7 @@ <return type="float"> </return> <description> + Returns the ratio of X to Y. </description> </method> <method name="length"> @@ -31998,6 +36864,7 @@ <return type="float"> </return> <description> + Returns the squared length of the vector. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. </description> </method> <method name="linear_interpolate"> @@ -32008,7 +36875,7 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of the linear interpolation between this vector and "b", by amount "i". + Returns the result of the linear interpolation between this vector and "b", by amount "t". </description> </method> <method name="normalized"> @@ -32019,11 +36886,12 @@ </description> </method> <method name="reflect"> - <return type="float"> + <return type="Vector2"> </return> <argument index="0" name="vec" type="Vector2"> </argument> <description> + Reflects/mirrors the vector around another vector. </description> </method> <method name="rotated"> @@ -32032,14 +36900,16 @@ <argument index="0" name="phi" type="float"> </argument> <description> + Rotates the vector by "phi" radians. </description> </method> <method name="slide"> - <return type="float"> + <return type="Vector2"> </return> <argument index="0" name="vec" type="Vector2"> </argument> <description> + Slides the vector by the other vector. </description> </method> <method name="snapped"> @@ -32048,20 +36918,25 @@ <argument index="0" name="by" type="Vector2"> </argument> <description> + Snaps the vector to a grid with the given size. </description> </method> <method name="tangent"> <return type="Vector2"> </return> <description> + Returns a perpendicular vector. </description> </method> <method name="Vector2"> + <return type="Vector2"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> </argument> <description> + Constructs a new Vector2 from the given x and y. </description> </method> </methods> @@ -32080,8 +36955,10 @@ </class> <class name="Vector2Array" category="Built-In Types"> <brief_description> + An Array of Vector2's. </brief_description> <description> + An Array specifically designed to hold Vector2's. </description> <methods> <method name="get"> @@ -32090,18 +36967,21 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Get the Vector2 at the given index. </description> </method> <method name="push_back"> <argument index="0" name="vector2" type="Vector2"> </argument> <description> + Insert a new Vector2. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> + Set the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -32110,18 +36990,23 @@ <argument index="1" name="vector2" type="Vector2"> </argument> <description> + Set the Vector2 at the given index. </description> </method> <method name="size"> <return type="int"> </return> <description> + Returns the size of the array. </description> </method> <method name="Vector2Array"> + <return type="Vector2Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> + Constructs a new Vector2Array. Optionally, you can pass in an Array that will be converted. </description> </method> </methods> @@ -32280,6 +37165,8 @@ </description> </method> <method name="Vector3"> + <return type="Vector3"> + </return> <argument index="0" name="x" type="float"> </argument> <argument index="1" name="y" type="float"> @@ -32348,6 +37235,8 @@ </description> </method> <method name="Vector3Array"> + <return type="Vector3Array"> + </return> <argument index="0" name="from" type="Array"> </argument> <description> @@ -32869,6 +37758,22 @@ <description> </description> </method> + <method name="set_render_target_clear_on_new_frame"> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="get_render_target_clear_on_new_frame" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="render_target_clear"> + <description> + </description> + </method> <method name="set_render_target_filter"> <argument index="0" name="enable" type="bool"> </argument> @@ -32994,6 +37899,18 @@ <description> </description> </method> + <method name="get_mouse_pos" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="warp_mouse"> + <argument index="0" name="to_pos" type="Vector2"> + </argument> + <description> + </description> + </method> </methods> <signals> <signal name="size_changed"> @@ -33130,7 +38047,13 @@ </constant> <constant name="ENABLER_PAUSE_ANIMATIONS" value="0"> </constant> - <constant name="ENABLER_MAX" value="2"> + <constant name="ENABLER_PAUSE_PARTICLES" value="2"> + </constant> + <constant name="ENABLER_PARENT_PROCESS" value="3"> + </constant> + <constant name="ENABLER_PARENT_FIXED_PROCESS" value="4"> + </constant> + <constant name="ENABLER_MAX" value="5"> </constant> </constants> </class> @@ -34478,6 +39401,8 @@ </argument> <argument index="4" name="arg4" type="Color" default="Color(1,1,1,1)"> </argument> + <argument index="5" name="arg5" type="bool" default="false"> + </argument> <description> </description> </method> @@ -34492,6 +39417,8 @@ </argument> <argument index="4" name="arg4" type="Color" default="Color(1,1,1,1)"> </argument> + <argument index="5" name="arg5" type="bool" default="false"> + </argument> <description> </description> </method> @@ -34625,7 +39552,7 @@ <description> </description> </method> - <method name="flush"> + <method name="sync"> <description> </description> </method> @@ -34877,6 +39804,20 @@ </constant> </constants> </class> +<class name="WeakRef" inherits="Reference" category="Core"> + <brief_description> + </brief_description> + <description> + </description> + <methods> + <method name="get_ref" qualifiers="const"> + <description> + </description> + </method> + </methods> + <constants> + </constants> +</class> <class name="WindowDialog" inherits="Popup" category="Core"> <brief_description> Base class for window dialogs. @@ -34914,10 +39855,10 @@ </theme_item> <theme_item name="titlebar_height" type="int"> </theme_item> - <theme_item name="close_v_ofs" type="int"> - </theme_item> <theme_item name="title_height" type="int"> </theme_item> + <theme_item name="close_v_ofs" type="int"> + </theme_item> <theme_item name="title_color" type="Color"> </theme_item> <theme_item name="close_hilite" type="Texture"> @@ -34968,6 +39909,12 @@ <description> </description> </method> + <method name="get_direct_space_state"> + <return type="PhysicsDirectSpaceState"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -34998,6 +39945,12 @@ <description> </description> </method> + <method name="get_direct_space_state"> + <return type="Physics2DDirectSpaceState"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> @@ -35195,18 +40148,24 @@ </description> <methods> <method name="bool"> + <return type="bool"> + </return> <argument index="0" name="from" type="int"> </argument> <description> </description> </method> <method name="bool"> + <return type="bool"> + </return> <argument index="0" name="from" type="float"> </argument> <description> </description> </method> <method name="bool"> + <return type="bool"> + </return> <argument index="0" name="from" type="String"> </argument> <description> @@ -35223,18 +40182,24 @@ </description> <methods> <method name="float"> + <return type="float"> + </return> <argument index="0" name="from" type="bool"> </argument> <description> </description> </method> <method name="float"> + <return type="float"> + </return> <argument index="0" name="from" type="int"> </argument> <description> </description> </method> <method name="float"> + <return type="float"> + </return> <argument index="0" name="from" type="String"> </argument> <description> @@ -35253,18 +40218,24 @@ </description> <methods> <method name="int"> + <return type="int"> + </return> <argument index="0" name="from" type="bool"> </argument> <description> </description> </method> <method name="int"> + <return type="int"> + </return> <argument index="0" name="from" type="float"> </argument> <description> </description> </method> <method name="int"> + <return type="int"> + </return> <argument index="0" name="from" type="String"> </argument> <description> diff --git a/main/input_default.cpp b/main/input_default.cpp new file mode 100644 index 0000000000..878d21c302 --- /dev/null +++ b/main/input_default.cpp @@ -0,0 +1,343 @@ +#include "input_default.h" +#include "servers/visual_server.h" +#include "os/os.h" +#include "input_map.h" + +void InputDefault::SpeedTrack::update(const Vector2& p_delta_p) { + + uint64_t tick = OS::get_singleton()->get_ticks_usec(); + uint32_t tdiff = tick-last_tick; + float delta_t = tdiff / 1000000.0; + last_tick=tick; + + + accum+=p_delta_p; + accum_t+=delta_t; + + if (accum_t>max_ref_frame*10) + accum_t=max_ref_frame*10; + + while( accum_t>=min_ref_frame ) { + + float slice_t = min_ref_frame / accum_t; + Vector2 slice = accum*slice_t; + accum=accum-slice; + accum_t-=min_ref_frame; + + speed=(slice/min_ref_frame).linear_interpolate(speed,min_ref_frame/max_ref_frame); + } + +} + +void InputDefault::SpeedTrack::reset() { + last_tick = OS::get_singleton()->get_ticks_usec(); + speed=Vector2(); + accum_t=0; +} + +InputDefault::SpeedTrack::SpeedTrack() { + + min_ref_frame=0.1; + max_ref_frame=0.3; + reset(); +} + +bool InputDefault::is_key_pressed(int p_scancode) { + + _THREAD_SAFE_METHOD_ + return keys_pressed.has(p_scancode); +} + +bool InputDefault::is_mouse_button_pressed(int p_button) { + + _THREAD_SAFE_METHOD_ + return (mouse_button_mask&(1<<p_button))!=0; +} + + +static int _combine_device(int p_value,int p_device) { + + return p_value|(p_device<<20); +} + +bool InputDefault::is_joy_button_pressed(int p_device, int p_button) { + + _THREAD_SAFE_METHOD_ + return joy_buttons_pressed.has(_combine_device(p_button,p_device)); +} + +bool InputDefault::is_action_pressed(const StringName& p_action) { + + if (custom_action_press.has(p_action)) + return true; //simpler + + const List<InputEvent> *alist = InputMap::get_singleton()->get_action_list(p_action); + if (!alist) + return NULL; + + + for (const List<InputEvent>::Element *E=alist->front();E;E=E->next()) { + + + int device=E->get().device; + + switch(E->get().type) { + + case InputEvent::KEY: { + + const InputEventKey &iek=E->get().key; + if ((keys_pressed.has(iek.scancode))) + return true; + } break; + case InputEvent::MOUSE_BUTTON: { + + const InputEventMouseButton &iemb=E->get().mouse_button; + if(mouse_button_mask&(1<<iemb.button_index)) + return true; + } break; + case InputEvent::JOYSTICK_BUTTON: { + + const InputEventJoystickButton &iejb=E->get().joy_button; + int c = _combine_device(iejb.button_index,device); + if (joy_buttons_pressed.has(c)) + return true; + } break; + } + } + + return false; +} + +float InputDefault::get_joy_axis(int p_device,int p_axis) { + + _THREAD_SAFE_METHOD_ + int c = _combine_device(p_axis,p_device); + if (joy_axis.has(c)) { + return joy_axis[c]; + } else { + return 0; + } +} + +String InputDefault::get_joy_name(int p_idx) { + + _THREAD_SAFE_METHOD_ + return joy_names[p_idx]; +}; + +void InputDefault::joy_connection_changed(int p_idx, bool p_connected, String p_name) { + + _THREAD_SAFE_METHOD_ + joy_names[p_idx] = p_connected ? p_name : ""; + + emit_signal("joy_connection_changed", p_idx, p_connected); +}; + +Vector3 InputDefault::get_accelerometer() { + + _THREAD_SAFE_METHOD_ + return accelerometer; +} + +void InputDefault::parse_input_event(const InputEvent& p_event) { + + _THREAD_SAFE_METHOD_ + switch(p_event.type) { + + case InputEvent::KEY: { + + if (p_event.key.echo) + break; + if (p_event.key.scancode==0) + break; + + // print_line(p_event); + + if (p_event.key.pressed) + keys_pressed.insert(p_event.key.scancode); + else + keys_pressed.erase(p_event.key.scancode); + } break; + case InputEvent::MOUSE_BUTTON: { + + if (p_event.mouse_button.doubleclick) + break; + + if (p_event.mouse_button.pressed) + mouse_button_mask|=(1<<p_event.mouse_button.button_index); + else + mouse_button_mask&=~(1<<p_event.mouse_button.button_index); + + if (main_loop && emulate_touch && p_event.mouse_button.button_index==1) { + InputEventScreenTouch touch_event; + touch_event.index=0; + touch_event.pressed=p_event.mouse_button.pressed; + touch_event.x=p_event.mouse_button.x; + touch_event.y=p_event.mouse_button.y; + InputEvent ev; + ev.type=InputEvent::SCREEN_TOUCH; + ev.screen_touch=touch_event; + main_loop->input_event(ev); + } + } break; + case InputEvent::MOUSE_MOTION: { + + if (main_loop && emulate_touch && p_event.mouse_motion.button_mask&1) { + InputEventScreenDrag drag_event; + drag_event.index=0; + drag_event.x=p_event.mouse_motion.x; + drag_event.y=p_event.mouse_motion.y; + drag_event.relative_x=p_event.mouse_motion.relative_x; + drag_event.relative_y=p_event.mouse_motion.relative_y; + drag_event.speed_x=p_event.mouse_motion.speed_x; + drag_event.speed_y=p_event.mouse_motion.speed_y; + + InputEvent ev; + ev.type=InputEvent::SCREEN_DRAG; + ev.screen_drag=drag_event; + + main_loop->input_event(ev); + } + + } break; + case InputEvent::JOYSTICK_BUTTON: { + + int c = _combine_device(p_event.joy_button.button_index,p_event.device); + + if (p_event.joy_button.pressed) + joy_buttons_pressed.insert(c); + else + joy_buttons_pressed.erase(c); + } break; + case InputEvent::JOYSTICK_MOTION: { + set_joy_axis(p_event.device, p_event.joy_motion.axis, p_event.joy_motion.axis_value); + } break; + + } + + if (main_loop) + main_loop->input_event(p_event); + +} + +void InputDefault::set_joy_axis(int p_device,int p_axis,float p_value) { + + _THREAD_SAFE_METHOD_ + int c = _combine_device(p_axis,p_device); + joy_axis[c]=p_value; +} + +void InputDefault::set_accelerometer(const Vector3& p_accel) { + + _THREAD_SAFE_METHOD_ + + accelerometer=p_accel; + +} + +void InputDefault::set_main_loop(MainLoop *p_main_loop) { + main_loop=p_main_loop; + +} + +void InputDefault::set_mouse_pos(const Point2& p_posf) { + + mouse_speed_track.update(p_posf-mouse_pos); + mouse_pos=p_posf; + if (custom_cursor.is_valid()) { + VisualServer::get_singleton()->cursor_set_pos(get_mouse_pos()); + } +} + +Point2 InputDefault::get_mouse_pos() const { + + return mouse_pos; +} +Point2 InputDefault::get_mouse_speed() const { + + return mouse_speed_track.speed; +} + +int InputDefault::get_mouse_button_mask() const { + + return OS::get_singleton()->get_mouse_button_state(); +} + +void InputDefault::warp_mouse_pos(const Vector2& p_to) { + + OS::get_singleton()->warp_mouse_pos(p_to); +} + + +void InputDefault::iteration(float p_step) { + + +} + +void InputDefault::action_press(const StringName& p_action) { + + if (custom_action_press.has(p_action)) { + + custom_action_press[p_action]++; + } else { + custom_action_press[p_action]=1; + } +} + +void InputDefault::action_release(const StringName& p_action){ + + ERR_FAIL_COND(!custom_action_press.has(p_action)); + custom_action_press[p_action]--; + if (custom_action_press[p_action]==0) { + custom_action_press.erase(p_action); + } +} + +void InputDefault::set_emulate_touch(bool p_emulate) { + + emulate_touch=p_emulate; +} + +bool InputDefault::is_emulating_touchscreen() const { + + return emulate_touch; +} + +void InputDefault::set_custom_mouse_cursor(const RES& p_cursor,const Vector2& p_hotspot) { + if (custom_cursor==p_cursor) + return; + + custom_cursor=p_cursor; + + if (p_cursor.is_null()) { + set_mouse_mode(MOUSE_MODE_VISIBLE); + VisualServer::get_singleton()->cursor_set_visible(false); + } else { + set_mouse_mode(MOUSE_MODE_HIDDEN); + VisualServer::get_singleton()->cursor_set_visible(true); + VisualServer::get_singleton()->cursor_set_texture(custom_cursor->get_rid(),p_hotspot); + VisualServer::get_singleton()->cursor_set_pos(get_mouse_pos()); + } +} + +void InputDefault::set_mouse_in_window(bool p_in_window) { + + if (custom_cursor.is_valid()) { + + if (p_in_window) { + set_mouse_mode(MOUSE_MODE_HIDDEN); + VisualServer::get_singleton()->cursor_set_visible(true); + } else { + set_mouse_mode(MOUSE_MODE_VISIBLE); + VisualServer::get_singleton()->cursor_set_visible(false); + } + + } +} + +InputDefault::InputDefault() { + + mouse_button_mask=0; + emulate_touch=false; + main_loop=NULL; +} diff --git a/main/input_default.h b/main/input_default.h new file mode 100644 index 0000000000..2ef4f727c6 --- /dev/null +++ b/main/input_default.h @@ -0,0 +1,83 @@ +#ifndef INPUT_DEFAULT_H +#define INPUT_DEFAULT_H + +#include "os/input.h" + +class InputDefault : public Input { + + OBJ_TYPE( InputDefault, Input ); + _THREAD_SAFE_CLASS_ + + int mouse_button_mask; + Set<int> keys_pressed; + Set<int> joy_buttons_pressed; + Map<int,float> joy_axis; + Map<StringName,int> custom_action_press; + Map<int, String> joy_names; + Vector3 accelerometer; + Vector2 mouse_pos; + MainLoop *main_loop; + + bool emulate_touch; + + struct SpeedTrack { + + uint64_t last_tick; + Vector2 speed; + Vector2 accum; + float accum_t; + float min_ref_frame; + float max_ref_frame; + + void update(const Vector2& p_delta_p); + void reset(); + SpeedTrack(); + }; + + SpeedTrack mouse_speed_track; + + RES custom_cursor; + +public: + + virtual bool is_key_pressed(int p_scancode); + virtual bool is_mouse_button_pressed(int p_button); + virtual bool is_joy_button_pressed(int p_device, int p_button); + virtual bool is_action_pressed(const StringName& p_action); + + virtual float get_joy_axis(int p_device,int p_axis); + String get_joy_name(int p_idx); + void joy_connection_changed(int p_idx, bool p_connected, String p_name); + + virtual Vector3 get_accelerometer(); + + virtual Point2 get_mouse_pos() const; + virtual Point2 get_mouse_speed() const; + virtual int get_mouse_button_mask() const; + + virtual void warp_mouse_pos(const Vector2& p_to); + + + void parse_input_event(const InputEvent& p_event); + void set_accelerometer(const Vector3& p_accel); + void set_joy_axis(int p_device,int p_axis,float p_value); + + void set_main_loop(MainLoop *main_loop); + void set_mouse_pos(const Point2& p_posf); + + void action_press(const StringName& p_action); + void action_release(const StringName& p_action); + + void iteration(float p_step); + + void set_emulate_touch(bool p_emulate); + virtual bool is_emulating_touchscreen() const; + + virtual void set_custom_mouse_cursor(const RES& p_cursor,const Vector2& p_hotspot=Vector2()); + virtual void set_mouse_in_window(bool p_in_window); + + InputDefault(); + +}; + +#endif // INPUT_DEFAULT_H diff --git a/main/main.cpp b/main/main.cpp index 7006b48282..84f7c3a88e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -75,7 +75,7 @@ #include "core/io/file_access_zip.h" #include "translation.h" #include "version.h" -#include "os/input.h" +#include "main/input_default.h" #include "performance.h" static Globals *globals=NULL; @@ -926,6 +926,9 @@ Error Main::setup2() { id->set_emulate_touch(true); } } + + + MAIN_PRINT("Main: Load Remaps"); MAIN_PRINT("Main: Load Scene Types"); @@ -933,6 +936,20 @@ Error Main::setup2() { register_scene_types(); register_server_types(); + GLOBAL_DEF("display/custom_mouse_cursor",String()); + GLOBAL_DEF("display/custom_mouse_cursor_hotspot",Vector2()); + Globals::get_singleton()->set_custom_property_info("display/custom_mouse_cursor",PropertyInfo(Variant::STRING,"display/custom_mouse_cursor",PROPERTY_HINT_FILE,"*.png,*.webp")); + + if (String(Globals::get_singleton()->get("display/custom_mouse_cursor"))!=String()) { + + print_line("use custom cursor"); + Ref<Texture> cursor=ResourceLoader::load(Globals::get_singleton()->get("display/custom_mouse_cursor")); + if (cursor.is_valid()) { + print_line("loaded ok"); + Vector2 hotspot = Globals::get_singleton()->get("display/custom_mouse_cursor_hotspot"); + Input::get_singleton()->set_custom_mouse_cursor(cursor,hotspot); + } + } #ifdef TOOLS_ENABLED EditorNode::register_editor_types(); ObjectTypeDB::register_type<PCKPacker>(); // todo: move somewhere else diff --git a/platform/android/os_android.h b/platform/android/os_android.h index e9b0d00196..dcaa1db654 100644 --- a/platform/android/os_android.h +++ b/platform/android/os_android.h @@ -39,7 +39,7 @@ #include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/physics_2d/physics_2d_server_wrap_mt.h" #include "servers/visual/rasterizer.h" - +#include "main/input_default.h" //#ifdef USE_JAVA_FILE_ACCESS diff --git a/platform/flash/os_flash.h b/platform/flash/os_flash.h index 42ae3f0718..c8013df2f2 100644 --- a/platform/flash/os_flash.h +++ b/platform/flash/os_flash.h @@ -11,6 +11,7 @@ #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h"
#include "servers/audio/audio_server_sw.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
+#include "main/input_default.h"
class OSFlash : public OS_Unix {
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h index 844f067552..de167dd309 100644 --- a/platform/iphone/os_iphone.h +++ b/platform/iphone/os_iphone.h @@ -43,9 +43,11 @@ #include "servers/audio/sample_manager_sw.h" #include "servers/spatial_sound/spatial_sound_server_sw.h" #include "servers/spatial_sound_2d/spatial_sound_2d_server_sw.h" +#include "main/input_default.h" #include "game_center.h" #include "in_app_store.h" + class AudioDriverIphone; class RasterizerGLES2; diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h index 55ac7cdae4..1e925fb8df 100644 --- a/platform/javascript/os_javascript.h +++ b/platform/javascript/os_javascript.h @@ -40,6 +40,7 @@ #include "servers/visual/rasterizer.h" #include "audio_server_javascript.h" #include "audio_driver_javascript.h" +#include "main/input_default.h" typedef void (*GFXInitFunc)(void *ud,bool gl2,int w, int h, bool fs); typedef int (*OpenURIFunc)(const String&); diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 869997f190..49fa6c0862 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -32,7 +32,7 @@ #include "os/input.h" #include "drivers/unix/os_unix.h" - +#include "main/input_default.h" #include "servers/visual_server.h" #include "servers/visual/visual_server_wrap_mt.h" #include "servers/visual/rasterizer.h" diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index abfe42beda..b0ce37cecf 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -512,12 +512,26 @@ static int button_mask=0; - (void)mouseExited:(NSEvent *)event { + if (!OS_OSX::singleton) + return; + + if (OS_OSX::singleton->main_loop && OS_OSX::singleton->mouse_mode!=OS::MOUSE_MODE_CAPTURED) + OS_OSX::singleton->main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_EXIT); + if (OS_OSX::singleton->input) + OS_OSX::singleton->input->set_mouse_in_window(false); // _glfwInputCursorEnter(window, GL_FALSE); } - (void)mouseEntered:(NSEvent *)event { // _glfwInputCursorEnter(window, GL_TRUE); + if (!OS_OSX::singleton) + return; + if (OS_OSX::singleton->main_loop && OS_OSX::singleton->mouse_mode!=OS::MOUSE_MODE_CAPTURED) + OS_OSX::singleton->main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER); + if (OS_OSX::singleton->input) + OS_OSX::singleton->input->set_mouse_in_window(true); + } - (void)viewDidChangeBackingProperties diff --git a/platform/server/os_server.h b/platform/server/os_server.h index 4e7721f068..b3410f7955 100644 --- a/platform/server/os_server.h +++ b/platform/server/os_server.h @@ -30,7 +30,7 @@ #define OS_SERVER_H -#include "os/input.h" +#include "main/input_default.h" #include "drivers/unix/os_unix.h" #include "servers/visual_server.h" #include "servers/visual/rasterizer.h" diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 87d9a43d8c..438a5a6903 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -323,11 +323,21 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) { old_invalid=true; outside=true; + if (main_loop && mouse_mode!=MOUSE_MODE_CAPTURED) + main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_EXIT); + if (input) + input->set_mouse_in_window(false); } break; case WM_MOUSEMOVE: { if (outside) { + //mouse enter + + if (main_loop && mouse_mode!=MOUSE_MODE_CAPTURED) + main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER); + if (input) + input->set_mouse_in_window(true); CursorShape c=cursor_shape; cursor_shape=CURSOR_MAX; diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index cce94f5b25..026b50c33d 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -47,6 +47,7 @@ #include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/physics_2d/physics_2d_server_wrap_mt.h" +#include "main/input_default.h" #include <windows.h> diff --git a/platform/winrt/os_winrt.h b/platform/winrt/os_winrt.h index b69feccae9..5719426f9f 100644 --- a/platform/winrt/os_winrt.h +++ b/platform/winrt/os_winrt.h @@ -50,6 +50,8 @@ #include <fcntl.h> #include <stdio.h> +#include "main/input_default.h" + /** @author Juan Linietsky <reduzio@gmail.com> */ diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index ce8259eea0..fe15dd5a08 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -1181,8 +1181,22 @@ void OS_X11::process_xevents() { XVisibilityEvent * visibility = (XVisibilityEvent *)&event; minimized = (visibility->state == VisibilityFullyObscured); } break; + case LeaveNotify: { - case FocusIn: + if (main_loop && mouse_mode!=MOUSE_MODE_CAPTURED) + main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_EXIT); + if (input) + input->set_mouse_in_window(false); + + } break; + case EnterNotify: { + + if (main_loop && mouse_mode!=MOUSE_MODE_CAPTURED) + main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER); + if (input) + input->set_mouse_in_window(true); + } break; + case FocusIn: minimized = false; #ifdef NEW_WM_API if(current_videomode.fullscreen) { diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index cc6a90c6dd..1566062b9e 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -46,6 +46,7 @@ #include "drivers/pulseaudio/audio_driver_pulseaudio.h" #include "servers/physics_2d/physics_2d_server_sw.h" #include "servers/physics_2d/physics_2d_server_wrap_mt.h" +#include "main/input_default.h" #include <X11/keysym.h> #include <X11/Xlib.h> diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp index cd89e914fb..85751fc735 100644 --- a/scene/2d/collision_shape_2d.cpp +++ b/scene/2d/collision_shape_2d.cpp @@ -113,6 +113,10 @@ void CollisionShape2D::_notification(int p_what) { break; } + if (!shape.is_valid()) { + break; + } + rect=Rect2(); diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index 9df29f70ec..4712ba308a 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -187,30 +187,59 @@ void Skeleton::_notification(int p_what) { Bone &b=bonesptr[i]; - if (b.enabled) { + if (b.disable_rest) { + if (b.enabled) { - Transform pose=b.pose; - if (b.custom_pose_enable) { + Transform pose=b.pose; + if (b.custom_pose_enable) { - pose = b.custom_pose * pose; - } + pose = b.custom_pose * pose; + } + + if (b.parent>=0) { + + b.pose_global=bonesptr[b.parent].pose_global * pose; + } else { - if (b.parent>=0) { - - b.pose_global=bonesptr[b.parent].pose_global * (b.rest * pose); + b.pose_global=pose; + } } else { - - b.pose_global=b.rest * pose; + + if (b.parent>=0) { + + b.pose_global=bonesptr[b.parent].pose_global; + } else { + + b.pose_global=Transform(); + } } + } else { - - if (b.parent>=0) { - - b.pose_global=bonesptr[b.parent].pose_global * b.rest; + if (b.enabled) { + + Transform pose=b.pose; + if (b.custom_pose_enable) { + + pose = b.custom_pose * pose; + } + + if (b.parent>=0) { + + b.pose_global=bonesptr[b.parent].pose_global * (b.rest * pose); + } else { + + b.pose_global=b.rest * pose; + } } else { - - b.pose_global=b.rest; - } + + if (b.parent>=0) { + + b.pose_global=bonesptr[b.parent].pose_global * b.rest; + } else { + + b.pose_global=b.rest; + } + } } vs->skeleton_bone_set_transform( skeleton, i, b.pose_global * b.rest_global_inverse ); @@ -315,6 +344,37 @@ void Skeleton::set_bone_parent(int p_bone, int p_parent) { _make_dirty(); } +void Skeleton::unparent_bone_and_rest(int p_bone) { + + ERR_FAIL_INDEX( p_bone, bones.size() ); + + int parent=bones[p_bone].parent; + while(parent>=0) { + bones[p_bone].rest = bones[parent].rest * bones[p_bone].rest; + parent=bones[parent].parent; + } + + bones[p_bone].parent=-1; + bones[p_bone].rest_global_inverse=bones[p_bone].rest.affine_inverse(); //same thing + + _make_dirty(); + +} + +void Skeleton::set_bone_disable_rest(int p_bone, bool p_disable) { + + ERR_FAIL_INDEX( p_bone, bones.size() ); + bones[p_bone].disable_rest=p_disable; + +} + +bool Skeleton::is_bone_rest_disabled(int p_bone) const { + + ERR_FAIL_INDEX_V( p_bone, bones.size(), false ); + return bones[p_bone].disable_rest; +} + + int Skeleton::get_bone_parent(int p_bone) const { ERR_FAIL_INDEX_V( p_bone, bones.size(), -1 ); @@ -522,9 +582,14 @@ void Skeleton::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_bone_count"),&Skeleton::get_bone_count); + ObjectTypeDB::bind_method(_MD("unparent_bone_and_rest","bone_idx"),&Skeleton::unparent_bone_and_rest); + ObjectTypeDB::bind_method(_MD("get_bone_rest","bone_idx"),&Skeleton::get_bone_rest); ObjectTypeDB::bind_method(_MD("set_bone_rest","bone_idx","rest"),&Skeleton::set_bone_rest); + ObjectTypeDB::bind_method(_MD("set_bone_disable_rest","bone_idx","disable"),&Skeleton::set_bone_disable_rest); + ObjectTypeDB::bind_method(_MD("is_bone_rest_disabled","bone_idx"),&Skeleton::is_bone_rest_disabled); + ObjectTypeDB::bind_method(_MD("bind_child_node_to_bone","bone_idx","node:Node"),&Skeleton::bind_child_node_to_bone); ObjectTypeDB::bind_method(_MD("unbind_child_node_from_bone","bone_idx","node:Node"),&Skeleton::unbind_child_node_from_bone); ObjectTypeDB::bind_method(_MD("get_bound_child_nodes_to_bone","bone_idx"),&Skeleton::_get_bound_child_nodes_to_bone); diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h index b7f84f44c9..6678722d12 100644 --- a/scene/3d/skeleton.h +++ b/scene/3d/skeleton.h @@ -46,6 +46,7 @@ class Skeleton : public Spatial { bool enabled; int parent; + bool disable_rest; Transform rest; Transform rest_global_inverse; @@ -57,7 +58,7 @@ class Skeleton : public Spatial { List<uint32_t> nodes_bound; - Bone() { parent=-1; enabled=true; custom_pose_enable=false; } + Bone() { parent=-1; enabled=true; custom_pose_enable=false; disable_rest=false; } }; bool rest_global_inverse_dirty; @@ -111,6 +112,11 @@ public: void set_bone_parent(int p_bone, int p_parent); int get_bone_parent(int p_bone) const; + void unparent_bone_and_rest(int p_idx); + + void set_bone_disable_rest(int p_bone, bool p_disable); + bool is_bone_rest_disabled(int p_bone) const; + int get_bone_count() const; void set_bone_rest(int p_bone, const Transform& p_rest); diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp index 6489cbccd5..b63b3de530 100644 --- a/scene/gui/box_container.cpp +++ b/scene/gui/box_container.cpp @@ -99,8 +99,10 @@ void BoxContainer::_resort() { elements exist */ + bool has_stretched = false; while(stretch_ratio_total>0) { // first of all, dont even be here if no stretchable objects exist + has_stretched = true; bool refit_successful=true; //assume refit-test will go well for(int i=0;i<get_child_count();i++) { @@ -143,6 +145,18 @@ void BoxContainer::_resort() { int ofs=0; + if (!has_stretched) { + switch (align) { + case ALIGN_BEGIN: + break; + case ALIGN_CENTER: + ofs = stretch_diff / 2; + break; + case ALIGN_END: + ofs = stretch_diff; + break; + } + } first=true; int idx=0; @@ -254,6 +268,15 @@ void BoxContainer::_notification(int p_what) { } } +void BoxContainer::set_alignment(AlignMode p_align) { + align = p_align; + _resort(); +} + +BoxContainer::AlignMode BoxContainer::get_alignment() const { + return align; +} + void BoxContainer::add_spacer(bool p_begin) { Control *c = memnew( Control ); @@ -270,10 +293,23 @@ void BoxContainer::add_spacer(bool p_begin) { BoxContainer::BoxContainer(bool p_vertical) { vertical=p_vertical; + align = ALIGN_BEGIN; // set_ignore_mouse(true); set_stop_mouse(false); } +void BoxContainer::_bind_methods() { + + ObjectTypeDB::bind_method(_MD("get_alignment"),&BoxContainer::get_alignment); + ObjectTypeDB::bind_method(_MD("set_alignment","alignment"),&BoxContainer::set_alignment); + + BIND_CONSTANT( ALIGN_BEGIN ); + BIND_CONSTANT( ALIGN_CENTER ); + BIND_CONSTANT( ALIGN_END ); + + ADD_PROPERTY( PropertyInfo(Variant::INT,"alignment", PROPERTY_HINT_ENUM, "Begin,Center,End"), _SCS("set_alignment"),_SCS("get_alignment") ); + +} MarginContainer* VBoxContainer::add_margin_child(const String& p_label,Control *p_control,bool p_expand) { diff --git a/scene/gui/box_container.h b/scene/gui/box_container.h index d461b4aebe..c357814baf 100644 --- a/scene/gui/box_container.h +++ b/scene/gui/box_container.h @@ -35,16 +35,31 @@ class BoxContainer : public Container { OBJ_TYPE(BoxContainer,Container); +public: + + enum AlignMode { + ALIGN_BEGIN, + ALIGN_CENTER, + ALIGN_END + }; + +private: bool vertical; + AlignMode align; void _resort(); protected: void _notification(int p_what); + + static void _bind_methods(); public: void add_spacer(bool p_begin=false); + void set_alignment(AlignMode p_align); + AlignMode get_alignment() const; + virtual Size2 get_minimum_size() const; BoxContainer(bool p_vertical=false); @@ -73,4 +88,6 @@ public: VBoxContainer() : BoxContainer(true) {} }; +VARIANT_ENUM_CAST(BoxContainer::AlignMode); + #endif // BOX_CONTAINER_H diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp index 9a32b013c1..7903d88736 100644 --- a/scene/resources/rectangle_shape_2d.cpp +++ b/scene/resources/rectangle_shape_2d.cpp @@ -57,7 +57,7 @@ void RectangleShape2D::draw(const RID& p_to_rid,const Color& p_color) { Rect2 RectangleShape2D::get_rect() const { - Rect2(-extents,extents*2.0); + return Rect2(-extents,extents*2.0); } diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp index 08697ab72d..432f358627 100644 --- a/tools/doc/doc_data.cpp +++ b/tools/doc/doc_data.cpp @@ -917,9 +917,9 @@ Error DocData::save(const String& p_path) { String qualifiers; if (m.qualifiers!="") - qualifiers+="qualifiers=\""+m.qualifiers.xml_escape()+"\""; + qualifiers+=" qualifiers=\""+m.qualifiers.xml_escape()+"\""; - _write_string(f,2,"<method name=\""+m.name+"\" "+qualifiers+" >"); + _write_string(f,2,"<method name=\""+m.name+"\""+qualifiers+">"); if (m.return_type!="") { diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 7d2871fd10..3b5b8fba81 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -842,6 +842,17 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func boot_splash=splash; } } + StringName custom_cursor; + { + String splash=Globals::get_singleton()->get("display/custom_mouse_cursor"); //avoid splash from being converted + splash=splash.strip_edges(); + if (splash!=String()) { + if (!splash.begins_with("res://")) + splash="res://"+splash; + splash=splash.simplify_path(); + custom_cursor=splash; + } + } @@ -853,7 +864,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func String src=files[i]; Vector<uint8_t> buf; - if (src==boot_splash) + if (src==boot_splash || src==custom_cursor) buf = get_exported_file_default(src); //bootsplash must be kept if used else buf = get_exported_file(src); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 03d1dfb743..fb3c7d5d18 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -93,7 +93,7 @@ #include "plugins/light_occluder_2d_editor_plugin.h" #include "plugins/color_ramp_editor_plugin.h" #include "plugins/collision_shape_2d_editor_plugin.h" -#include "os/input.h" +#include "main/input_default.h" // end #include "tools/editor/io_plugins/editor_texture_import_plugin.h" #include "tools/editor/io_plugins/editor_scene_import_plugin.h" @@ -4404,11 +4404,15 @@ EditorNode::EditorNode() { EditorHelp::generate_doc(); //before any editor classes are crated - if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton()) { - //only if no touchscreen ui hint, set emulation - InputDefault *id = Input::get_singleton()->cast_to<InputDefault>(); - if (id) + InputDefault *id = Input::get_singleton()->cast_to<InputDefault>(); + + if (id) { + + if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton()) { + //only if no touchscreen ui hint, set emulation id->set_emulate_touch(false); //just disable just in case + } + id->set_custom_mouse_cursor(RES()); } |