Compare commits

...

40 Commits

Author SHA1 Message Date
Rémi Verschelde
53aa9cd51a Release 2.0.1 2016-03-06 19:05:45 +01:00
Rémi Verschelde
706d576f7b Add support for patch versions (2.0.x) 2016-03-06 19:05:27 +01:00
Franklin Sobrinho
226e0a7f4f Fix Project Settings dialog add/delete global variable
(cherry picked from commit 48524384d6)
2016-03-06 18:07:42 +01:00
hondres
c44060bb82 doc: fix joystick left/right trigger axis description (index 6/7 instead of 4/5)
(cherry picked from commit 1b806ef54e)
2016-03-06 18:06:47 +01:00
Martin Chuckeles
4fee5f3915 Add more verbose build-in functions descriptions
Add descriptions for some global constants

(cherry picked from commit ff7c89ebaf)
2016-03-06 10:39:21 +01:00
Franklin Sobrinho
e69c9021b5 The help page now show the entire object hierarchy
(cherry picked from commit fdd1209276)
2016-03-06 09:48:26 +01:00
Franklin Sobrinho
edb3716da7 Fix Sprite doesn't updating region_rect value in certain conditions
(cherry picked from commit 1d188c1c7b)
2016-03-06 09:48:20 +01:00
Franklin Sobrinho
1bdd5d24cb Removed "__editor_plugin_screen__" metadata creation
(cherry picked from commit b79e83ad6f)
2016-03-06 09:48:15 +01:00
Franklin Sobrinho
a1a1c0b9f6 Added search box in Class List dialog (Script Editor)
(cherry picked from commit cc6a6ef08c)
2016-03-06 09:48:06 +01:00
Martin Chuckeles
450a7a9120 Write GDScript documentation
(cherry picked from commit cd1184d56c)
2016-03-05 15:12:24 +01:00
Zher Huei Lee
c850fa7331 Added relative paths for DirAccess::remove()
Follows similar behaviour to DirAccess::rename()

(cherry picked from commit d7052ddba3)
2016-03-05 13:35:48 +01:00
hondres
afd75013f9 html5: workaround for echo key events.
(cherry picked from commit 352db6b17e)
2016-03-05 13:35:36 +01:00
Martin Chuckeles
848c7378fd Add editor settings for call hint placement
Added settings: text_editor/put_callhint_tooltip_below_current_line
and text_editor/callhint_tooltip_offset

(cherry picked from commit 47206b409d)
2016-03-05 12:58:01 +01:00
Martin Chuckeles
4b2fcabb74 Hide hint if completion is active
(cherry picked from commit 26cc14e839)
2016-03-05 12:57:56 +01:00
Martin Chuckeles
cb7693c533 Move the call hint under the current line
(cherry picked from commit 03025f60b6)
2016-03-05 12:57:52 +01:00
Stabington
7fea990b1b set_time_scale docs
This is correct?

(cherry picked from commit 6b7ec5de69)
2016-03-05 12:56:27 +01:00
volzhs
95e46e6eac fix gradle build on windows
(cherry picked from commit d6cc887627)
2016-03-05 12:56:19 +01:00
Josh Grams
bea8e1654e AnimationTreePlayer (Blend3): process all inputs.
Always call _process_node on all three inputs so that looped animations
don't get out of sync.

(cherry picked from commit b79351aa45)
2016-03-05 12:55:54 +01:00
Josh Grams
cafcdb015d AnimationTreePlayer: blend value tracks (closes #2299)
Variant:
- zero() sets a Variant to the appropriate type of zero value
- blend() blends part of one Variant on top of another.

(cherry picked from commit 391ce81c5e)
2016-03-05 12:55:43 +01:00
Rémi Verschelde
459b914d9c Quick fixes to tween documentation formatting
Maybe the reST parser should be improved instead though ;)

(cherry picked from commit a12c63ef9e)
2016-03-01 08:38:23 +01:00
Rémi Verschelde
9ed3d21d5a Sync classes 2016-03-01 08:25:04 +01:00
hinsbart
82d06b0027 use joystick name from mapping-db if available 2016-03-01 08:16:27 +01:00
Ariel Manzur
e0a66b6e56 deleted files added accidentally
(cherry picked from commit 96b60c281f)
2016-02-29 09:03:31 +01:00
Bojidar Marinov
186b82c350 Document Tween class
(cherry picked from commit 49e1cc6fa9)
2016-02-29 09:03:06 +01:00
Rémi Verschelde
1af2e1101d Remove grey capsule on official logo
It had been added by a contributor without prior discussion
with the rest of the team, but the grey capsule did not look
so good. Closes #3848.

Also renamed godot_{icon,logo} to just {icon,logo}.

(cherry picked from commit eb5f9ed89b)
2016-02-29 09:01:02 +01:00
Rémi Verschelde
a55f41e3d9 screen_shaders: convert demo images to JPG
(cherry picked from commit a97c1ca8f9)
2016-02-29 09:00:55 +01:00
Rémi Verschelde
439e29ea95 normalmap demo: convert images to JPG
To make the demos lighter

(cherry picked from commit 2fd177b2a5)
2016-02-29 09:00:48 +01:00
Rémi Verschelde
f5e8e89f50 Remove Noto Sans font from translation demo (heavy!)
(cherry picked from commit 0f087755cc)
2016-02-29 09:00:43 +01:00
Ariel Manzur
f619b05751 added [presets] to ._sc_ and "android/shutdown_adb_on_exit" to editor_settings
(cherry picked from commit 30d0ca9766)
2016-02-29 09:00:35 +01:00
Juan Linietsky
aa94ff6dae fix transform localization event in mouse motion
(cherry picked from commit 08e0e64a19)
2016-02-29 09:00:14 +01:00
Krzysztof Jankowski
ee5c250b63 OUYA gamepad mappings fix
Fix gamepad mappings for OUYA revision 4
2016-02-27 15:28:34 +01:00
Ariel Manzur
e4d367e7a1 theora on server build 2016-02-27 15:28:22 +01:00
Ariel Manzur
45a0bbe56e adds -pm and -project_manager command line options to start project manager
fixes bug where the user has an engine.cfg on the executable directory so it runs the game instead of opening the project manager
2016-02-27 15:27:33 +01:00
Julian Murgia - StraToN
d86b12a397 Fixed closing a scene tab when it was not the CURRENT tab. Fixes #3810 2016-02-27 15:27:25 +01:00
hinsbart
f0ba9c7e78 x11: fix joysticks not recognizing some buttons
dpad on x360 pads with kernel < 4.3 is working now
2016-02-27 15:27:15 +01:00
David
61f17fb1bb applied some typo fixes. see godotengine/godot-docs#18 2016-02-27 15:27:10 +01:00
Dana Olson
a43af20f31 added more Android gamepad mappings 2016-02-27 15:26:59 +01:00
est31
7ba92ae9eb Fix typo in error 2016-02-27 15:26:27 +01:00
est31
b05c27a27f Fix allocation bug if compiled with modern clang or gcc
* Add overflow checked intrinsic abstractions that check on overflow.
* Use them for memory allocation code.
* Use size_t type for memory allocation code to support full platform dependent width.

Fixes #3756.
2016-02-27 15:26:18 +01:00
Dana Olson
e30cbc3b36 added a couple more Linux mappings, tweaked Ouya Linux mapping 2016-02-27 15:25:51 +01:00
71 changed files with 936 additions and 1339 deletions

View File

@@ -41,7 +41,11 @@
#define _MKSTR(m_x) _STR(m_x)
#endif
// have to include version.h for this to work, include it in the .cpp not the .h
#ifdef VERSION_PATCH
#define VERSION_MKSTRING _MKSTR(VERSION_MAJOR)"." _MKSTR(VERSION_MINOR)"." _MKSTR(VERSION_PATCH)"." _MKSTR(VERSION_STATUS)"." _MKSTR(VERSION_REVISION)
#else
#define VERSION_MKSTRING _MKSTR(VERSION_MAJOR)"." _MKSTR(VERSION_MINOR)"." _MKSTR(VERSION_STATUS)"." _MKSTR(VERSION_REVISION)
#endif // VERSION_PATCH
#define VERSION_FULL_NAME _MKSTR(VERSION_NAME)" v" VERSION_MKSTRING
@@ -154,6 +158,23 @@ inline void __swap_tmpl(T &x, T &y ) {
((m_hex>='A' && m_hex<='F')?(10+m_hex-'A'):\
((m_hex>='a' && m_hex<='f')?(10+m_hex-'a'):0)))
// Macro to check whether we are compiled by clang
// and we have a specific builtin
#if defined(__llvm__) && defined(__has_builtin)
#define _llvm_has_builtin(x) __has_builtin(x)
#else
#define _llvm_has_builtin(x) 0
#endif
#if (defined(__GNUC__) && (__GNUC__ >= 5)) || _llvm_has_builtin(__builtin_mul_overflow)
# define _mul_overflow __builtin_mul_overflow
#endif
#if (defined(__GNUC__) && (__GNUC__ >= 5)) || _llvm_has_builtin(__builtin_add_overflow)
# define _add_overflow __builtin_add_overflow
#endif
@@ -167,6 +188,19 @@ static _FORCE_INLINE_ unsigned int nearest_power_of_2(unsigned int x) {
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
return ++x;
}
template<class T>
static _FORCE_INLINE_ T nearest_power_of_2_templated(T x) {
--x;
// If the compiler is smart, it unrolls this loop
// If its dumb, this is a bit slow.
for (size_t i = 0; i < sizeof(T); i++)
x |= x >> (1 << i);
return ++x;
}

View File

@@ -1115,6 +1115,21 @@ void Variant::reference(const Variant& p_variant) {
}
}
void Variant::zero() {
switch(type) {
case NIL: break;
case BOOL: this->_data._bool = false; break;
case INT: this->_data._int = 0; break;
case REAL: this->_data._real = 0; break;
case VECTOR2: *reinterpret_cast<Vector2*>(this->_data._mem) = Vector2(); break;
case RECT2: *reinterpret_cast<Rect2*>(this->_data._mem) = Rect2(); break;
case VECTOR3: *reinterpret_cast<Vector3*>(this->_data._mem) = Vector3(); break;
case PLANE: *reinterpret_cast<Plane*>(this->_data._mem) = Plane(); break;
case QUAT: *reinterpret_cast<Quat*>(this->_data._mem) = Quat(); break;
case COLOR: *reinterpret_cast<Color*>(this->_data._mem) = Color(); break;
default: this->clear(); break;
}
}
void Variant::clear() {

View File

@@ -372,6 +372,8 @@ public:
return res;
}
void zero();
static void blend(const Variant& a, const Variant& b, float c,Variant &r_dst);
static void interpolate(const Variant& a, const Variant& b, float c,Variant &r_dst);
struct CallError {

View File

@@ -3431,6 +3431,59 @@ Variant Variant::iter_get(const Variant& r_iter,bool &r_valid) const {
}
void Variant::blend(const Variant& a, const Variant& b, float c, Variant &r_dst) {
if (a.type!=b.type) {
if(a.is_num() && b.is_num()) {
real_t va=a;
real_t vb=b;
r_dst=va + vb * c;
} else {
r_dst=a;
}
return;
}
switch(a.type) {
case NIL: { r_dst=Variant(); } return;
case INT:{
int va=a._data._int;
int vb=b._data._int;
r_dst=int(va + vb * c + 0.5);
} return;
case REAL:{
double ra=a._data._real;
double rb=b._data._real;
r_dst=ra + rb * c;
} return;
case VECTOR2:{ r_dst=*reinterpret_cast<const Vector2*>(a._data._mem)+*reinterpret_cast<const Vector2*>(b._data._mem)*c; } return;
case RECT2:{
const Rect2 *ra = reinterpret_cast<const Rect2*>(a._data._mem);
const Rect2 *rb = reinterpret_cast<const Rect2*>(b._data._mem);
r_dst=Rect2(ra->pos + rb->pos * c, ra->size + rb->size * c);
} return;
case VECTOR3:{ r_dst=*reinterpret_cast<const Vector2*>(a._data._mem)+*reinterpret_cast<const Vector2*>(b._data._mem)*c; } return;
case _AABB:{
const AABB *ra = reinterpret_cast<const AABB*>(a._data._mem);
const AABB *rb = reinterpret_cast<const AABB*>(b._data._mem);
r_dst=AABB(ra->pos + rb->pos * c, ra->size + rb->size * c);
} return;
case COLOR:{
const Color *ca = reinterpret_cast<const Color*>(a._data._mem);
const Color *cb = reinterpret_cast<const Color*>(b._data._mem);
float r = ca->r + cb->r * c;
float g = ca->g + cb->g * c;
float b = ca->b + cb->b * c;
float a = ca->a + cb->a * c;
r = r > 1.0 ? 1.0 : r;
g = g > 1.0 ? 1.0 : g;
b = b > 1.0 ? 1.0 : b;
a = a > 1.0 ? 1.0 : a;
r_dst=Color(r, g, b, a);
} return;
default:{ r_dst = c<0.5 ? a : b; } return;
}
}
void Variant::interpolate(const Variant& a, const Variant& b, float c,Variant &r_dst) {
if (a.type!=b.type) {

View File

@@ -68,11 +68,26 @@ class Vector {
return reinterpret_cast<T*>(_ptr);
}
_FORCE_INLINE_ int _get_alloc_size(int p_elements) const {
return nearest_power_of_2(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int));
}
_FORCE_INLINE_ size_t _get_alloc_size(size_t p_elements) const {
return nearest_power_of_2_templated(p_elements*sizeof(T)+sizeof(SafeRefCount)+sizeof(int));
}
_FORCE_INLINE_ bool _get_alloc_size_checked(size_t p_elements, size_t *out) const {
#if defined(_add_overflow) && defined(_mul_overflow)
size_t o;
size_t p;
if (_mul_overflow(p_elements, sizeof(T), &o)) return false;
if (_add_overflow(o, sizeof(SafeRefCount)+sizeof(int), &p)) return false;
*out = nearest_power_of_2_templated(p);
return true;
#else
// Speed is more important than correctness here, do the operations unchecked
// and hope the best
*out = _get_alloc_size(p_elements);
return true;
#endif
}
void _unref(void *p_data);
@@ -257,19 +272,21 @@ Error Vector<T>::resize(int p_size) {
// possibly changing size, copy on write
_copy_on_write();
size_t alloc_size;
ERR_FAIL_COND_V(!_get_alloc_size_checked(p_size, &alloc_size), ERR_OUT_OF_MEMORY);
if (p_size>size()) {
if (size()==0) {
// alloc from scratch
void* ptr=memalloc(_get_alloc_size(p_size));
void* ptr=memalloc(alloc_size);
ERR_FAIL_COND_V( !ptr ,ERR_OUT_OF_MEMORY);
_ptr=(T*)((uint8_t*)ptr+sizeof(int)+sizeof(SafeRefCount));
_get_refcount()->init(); // init refcount
*_get_size()=0; // init size (currently, none)
} else {
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount),_get_alloc_size(p_size));
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount), alloc_size);
ERR_FAIL_COND_V( !_ptrnew ,ERR_OUT_OF_MEMORY);
_ptr=(T*)((uint8_t*)_ptrnew+sizeof(int)+sizeof(SafeRefCount));
}
@@ -293,7 +310,7 @@ Error Vector<T>::resize(int p_size) {
t->~T();
}
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount),_get_alloc_size(p_size));
void *_ptrnew = (T*)memrealloc((uint8_t*)_ptr-sizeof(int)-sizeof(SafeRefCount), alloc_size);
ERR_FAIL_COND_V( !_ptrnew ,ERR_OUT_OF_MEMORY);
_ptr=(T*)((uint8_t*)_ptrnew+sizeof(int)+sizeof(SafeRefCount));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 KiB

After

Width:  |  Height:  |  Size: 302 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 KiB

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 952 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 906 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -6,7 +6,7 @@ icon="res://icon.png"
[display]
width=780
width=800
height=600
stretch_mode="2d"
stretch_aspect="keep"

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -292,8 +292,11 @@ Error DirAccessUnix::rename(String p_path,String p_new_path) {
}
Error DirAccessUnix::remove(String p_path) {
p_path=fix_path(p_path);
if (p_path.is_rel_path())
p_path=get_current_dir().plus_file(p_path);
else
p_path=fix_path(p_path);
struct stat flags;
if ((stat(p_path.utf8().get_data(),&flags)!=0))
return FAILED;

View File

@@ -48,7 +48,12 @@ void* MemoryPoolStaticMalloc::alloc(size_t p_bytes,const char *p_description) {
#else
int total = p_bytes + DEFAULT_ALIGNMENT;
size_t total;
#if defined(_add_overflow)
if (_add_overflow(p_bytes, DEFAULT_ALIGNMENT, &total)) return NULL;
#else
total = p_bytes + DEFAULT_ALIGNMENT;
#endif
uint8_t* ptr = (uint8_t*)_alloc(total, p_description);
ERR_FAIL_COND_V( !ptr, ptr );
int ofs = (DEFAULT_ALIGNMENT - ((uintptr_t)ptr & (DEFAULT_ALIGNMENT - 1)));
@@ -64,11 +69,18 @@ void* MemoryPoolStaticMalloc::_alloc(size_t p_bytes,const char *p_description) {
MutexLock lock(mutex);
#ifdef DEBUG_MEMORY_ENABLED
void *mem=malloc(p_bytes+sizeof(RingPtr)); /// add for size and ringlist
size_t total;
#if defined(_add_overflow)
if (_add_overflow(p_bytes, sizeof(RingPtr), &total)) return NULL;
#else
total = p_bytes + sizeof(RingPtr);
#endif
void *mem=malloc(total); /// add for size and ringlist
if (!mem) {
printf("**ERROR: out of memory while allocating %i bytes by %s?\n",(int) p_bytes, p_description);
printf("**ERROR: memory usage is %i\n", (int)get_total_usage());
printf("**ERROR: out of memory while allocating %lu bytes by %s?\n", (unsigned long) p_bytes, p_description);
printf("**ERROR: memory usage is %lu\n", (unsigned long) get_total_usage());
};
ERR_FAIL_COND_V(!mem,0); //out of memory, or unreasonable request
@@ -129,7 +141,12 @@ void* MemoryPoolStaticMalloc::realloc(void *p_memory,size_t p_bytes) {
if (!p_memory)
return alloc(p_bytes);
int total = p_bytes + DEFAULT_ALIGNMENT;
size_t total;
#if defined(_add_overflow)
if (_add_overflow(p_bytes, DEFAULT_ALIGNMENT, &total)) return NULL;
#else
total = p_bytes + DEFAULT_ALIGNMENT;
#endif
uint8_t* mem = (uint8_t*)p_memory;
int ofs = *(mem-1);
mem = mem - ofs;

View File

@@ -310,8 +310,11 @@ Error DirAccessWindows::rename(String p_path,String p_new_path) {
Error DirAccessWindows::remove(String p_path) {
p_path=fix_path(p_path);
if (p_path.is_rel_path())
p_path=get_current_dir().plus_file(p_path);
else
p_path=fix_path(p_path);
printf("erasing %s\n",p_path.utf8().get_data());
//WIN32_FILE_ATTRIBUTE_DATA fileInfo;
//DWORD fileAttr = GetFileAttributesExW(p_path.c_str(), GetFileExInfoStandard, &fileInfo);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,133 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1024"
height="1024"
id="svg3030"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="godot_icon.svg">
<defs
id="defs3032" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.24748737"
inkscape:cx="340.91041"
inkscape:cy="224.06536"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1366"
inkscape:window-height="748"
inkscape:window-x="-2"
inkscape:window-y="-3"
inkscape:window-maximized="1" />
<metadata
id="metadata3035">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-28.362183)">
<rect
style="fill:#a39f9f;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="rect4009"
width="990"
height="990"
x="20"
y="47.362183"
ry="187.81349" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:none"
d="m 116.99388,715.36604 43.13957,-74.51381 75.99672,-171.42666 271.088,-13.63746 282.06373,14.1696 138.45065,255.56931 -25.0756,66.96734 -376.12685,53.39482 -367.70391,-40.32222 z"
id="path3239"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccc" />
<g
id="g3412"
transform="matrix(12.995388,0,0,-12.995388,898.37246,704.73082)">
<path
inkscape:connector-curvature="0"
d="m 0,0 0,-3.942 c 0,-0.39 -0.25,-0.734 -0.621,-0.852 L -6.835,-6.8 c -0.273,-0.091 -0.57,-0.042 -0.8,0.128 -0.232,0.168 -0.37,0.437 -0.37,0.721 l 0,4.305 -5.818,-1.108 0,-4.381 c 0,-0.447 -0.332,-0.824 -0.775,-0.885 l -8.41,-1.152 c -0.039,-0.003 -0.081,-0.008 -0.121,-0.008 -0.214,0 -0.424,0.078 -0.588,0.22 -0.195,0.172 -0.306,0.416 -0.306,0.676 l 0,4.638 -4.341,-0.018 0,-10e-4 -0.318,10e-4 -0.319,-10e-4 0,10e-4 -4.34,0.018 0,-4.638 c 0,-0.26 -0.112,-0.504 -0.307,-0.676 -0.164,-0.142 -0.374,-0.22 -0.587,-0.22 -0.041,0 -0.082,0.005 -0.123,0.008 l -8.41,1.152 c -0.442,0.061 -0.774,0.438 -0.774,0.885 l 0,4.381 -5.819,1.108 0,-4.305 c 0,-0.284 -0.137,-0.553 -0.368,-0.721 -0.232,-0.17 -0.529,-0.219 -0.802,-0.128 l -6.215,2.006 c -0.369,0.118 -0.619,0.462 -0.619,0.852 l 0,3.942 -3.837,1.29 c -0.19,-0.811 -0.295,-1.642 -0.295,-2.481 0,-10.301 14.512,-18.252 32.448,-18.309 l 0.022,0 0.023,0 c 17.936,0.057 32.448,8.008 32.448,18.309 0,0.766 -0.088,1.521 -0.247,2.266 L 0,0 z"
style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path3414" />
</g>
<g
id="g3416"
transform="matrix(12.995388,0,0,-12.995388,140.10982,467.34929)">
<path
inkscape:connector-curvature="0"
d="m 0,0 0,-16.047 2.163,-0.729 c 0.364,-0.122 0.61,-0.462 0.61,-0.847 l 0,-3.936 4.426,-1.428 0,4.154 c 0,0.27 0.118,0.52 0.323,0.689 0.206,0.172 0.474,0.241 0.739,0.192 l 7.608,-1.452 c 0.422,-0.079 0.728,-0.448 0.728,-0.877 l 0,-4.338 6.62,-0.904 0,4.509 c 0,0.241 0.096,0.467 0.264,0.635 0.167,0.166 0.394,0.259 0.633,0.259 l 0.002,0 5.551,-0.022 5.549,0.022 c 0.245,-10e-4 0.468,-0.093 0.635,-0.259 0.169,-0.168 0.264,-0.394 0.264,-0.635 l 0,-4.509 6.621,0.904 0,4.338 c 0,0.429 0.304,0.798 0.726,0.877 l 7.609,1.452 c 0.262,0.049 0.533,-0.02 0.738,-0.192 0.205,-0.169 0.325,-0.419 0.325,-0.689 l 0,-4.154 4.425,1.428 0,3.936 c 0,0.385 0.245,0.725 0.609,0.847 l 1.475,0.497 0,16.279 0.04,0 c 1.437,1.834 2.767,3.767 4.042,5.828 -1.694,2.883 -3.768,5.459 -5.986,7.846 -2.057,-1.035 -4.055,-2.208 -5.942,-3.456 -0.944,0.938 -2.008,1.706 -3.052,2.509 -1.027,0.824 -2.183,1.428 -3.281,2.132 0.327,2.433 0.489,4.828 0.554,7.327 -2.831,1.424 -5.85,2.369 -8.903,3.047 -1.219,-2.048 -2.334,-4.267 -3.304,-6.436 -1.152,0.192 -2.309,0.264 -3.467,0.277 l 0,0.002 c -0.008,0 -0.015,-0.002 -0.022,-0.002 -0.008,0 -0.015,0.002 -0.022,0.002 l 0,-0.002 c -1.16,-0.013 -2.316,-0.085 -3.468,-0.277 -0.97,2.169 -2.084,4.388 -3.305,6.436 C 19.475,24.555 16.456,23.61 13.626,22.186 13.69,19.687 13.852,17.292 14.18,14.859 13.081,14.155 11.925,13.551 10.898,12.727 9.855,11.924 8.79,11.156 7.846,10.218 5.958,11.466 3.961,12.639 1.904,13.674 -0.314,11.287 -2.388,8.711 -4.082,5.828 -2.807,3.767 -1.477,1.834 -0.04,0 L 0,0 z"
style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path3418" />
</g>
<g
id="g3420"
transform="matrix(12.995388,0,0,-12.995388,411.4457,567.42812)">
<path
inkscape:connector-curvature="0"
d="m 0,0 c 0,-3.611 -2.926,-6.537 -6.537,-6.537 -3.608,0 -6.535,2.926 -6.535,6.537 0,3.609 2.927,6.533 6.535,6.533 C -2.926,6.533 0,3.609 0,0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path3422" />
</g>
<g
id="g3424"
transform="matrix(12.995388,0,0,-12.995388,391.00655,572.46636)">
<path
inkscape:connector-curvature="0"
d="m 0,0 c 0,-2.396 -1.941,-4.337 -4.339,-4.337 -2.396,0 -4.339,1.941 -4.339,4.337 0,2.396 1.943,4.339 4.339,4.339 C -1.941,4.339 0,2.396 0,0"
style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path3426" />
</g>
<g
id="g3428"
transform="matrix(12.995388,0,0,-12.995388,526.30933,660.10985)">
<path
inkscape:connector-curvature="0"
d="m 0,0 c -1.162,0 -2.104,0.856 -2.104,1.912 l 0,6.018 c 0,1.054 0.942,1.912 2.104,1.912 1.162,0 2.106,-0.858 2.106,-1.912 l 0,-6.018 C 2.106,0.856 1.162,0 0,0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path3430" />
</g>
<g
id="g3432"
transform="matrix(12.995388,0,0,-12.995388,641.18731,567.42812)">
<path
inkscape:connector-curvature="0"
d="m 0,0 c 0,-3.611 2.926,-6.537 6.537,-6.537 3.609,0 6.535,2.926 6.535,6.537 0,3.609 -2.926,6.533 -6.535,6.533 C 2.926,6.533 0,3.609 0,0"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path3434" />
</g>
<g
id="g3436"
transform="matrix(12.995388,0,0,-12.995388,661.63165,572.46636)">
<path
inkscape:connector-curvature="0"
d="m 0,0 c 0,-2.396 1.941,-4.337 4.336,-4.337 2.398,0 4.339,1.941 4.339,4.337 0,2.396 -1.941,4.339 -4.339,4.339 C 1.941,4.339 0,2.396 0,0"
style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path3438" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.1 KiB

BIN
icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

132
icon.svg Normal file
View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1024"
height="1024"
id="svg3030"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="icon.svg"
inkscape:export-filename="/home/akien/Projects/godot/godot.git/icon.png"
inkscape:export-xdpi="22.5"
inkscape:export-ydpi="22.5">
<defs
id="defs3032" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="-560.15123"
inkscape:cy="190.62119"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1015"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata3035">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-28.362183)">
<g
id="g4149"
transform="matrix(1.0688992,0,0,1.1334985,-45.061194,-81.689066)">
<path
sodipodi:nodetypes="cccccccccc"
inkscape:connector-curvature="0"
id="path3239"
d="m 116.99388,715.36604 43.13957,-74.51381 75.99672,-171.42666 271.088,-13.63746 282.06373,14.1696 138.45065,255.56931 -25.0756,66.96734 -376.12685,53.39482 -367.70391,-40.32222 z"
style="fill:#ffffff;fill-opacity:1;stroke:none" />
<g
transform="matrix(12.995388,0,0,-12.995388,898.37246,704.73082)"
id="g3412">
<path
id="path3414"
style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 0,-3.942 c 0,-0.39 -0.25,-0.734 -0.621,-0.852 L -6.835,-6.8 c -0.273,-0.091 -0.57,-0.042 -0.8,0.128 -0.232,0.168 -0.37,0.437 -0.37,0.721 l 0,4.305 -5.818,-1.108 0,-4.381 c 0,-0.447 -0.332,-0.824 -0.775,-0.885 l -8.41,-1.152 c -0.039,-0.003 -0.081,-0.008 -0.121,-0.008 -0.214,0 -0.424,0.078 -0.588,0.22 -0.195,0.172 -0.306,0.416 -0.306,0.676 l 0,4.638 -4.341,-0.018 0,-10e-4 -0.318,10e-4 -0.319,-10e-4 0,10e-4 -4.34,0.018 0,-4.638 c 0,-0.26 -0.112,-0.504 -0.307,-0.676 -0.164,-0.142 -0.374,-0.22 -0.587,-0.22 -0.041,0 -0.082,0.005 -0.123,0.008 l -8.41,1.152 c -0.442,0.061 -0.774,0.438 -0.774,0.885 l 0,4.381 -5.819,1.108 0,-4.305 c 0,-0.284 -0.137,-0.553 -0.368,-0.721 -0.232,-0.17 -0.529,-0.219 -0.802,-0.128 l -6.215,2.006 c -0.369,0.118 -0.619,0.462 -0.619,0.852 l 0,3.942 -3.837,1.29 c -0.19,-0.811 -0.295,-1.642 -0.295,-2.481 0,-10.301 14.512,-18.252 32.448,-18.309 l 0.022,0 0.023,0 c 17.936,0.057 32.448,8.008 32.448,18.309 0,0.766 -0.088,1.521 -0.247,2.266 L 0,0 Z"
inkscape:connector-curvature="0" />
</g>
<g
transform="matrix(12.995388,0,0,-12.995388,140.10982,467.34929)"
id="g3416">
<path
id="path3418"
style="fill:#478cbf;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 0,-16.047 2.163,-0.729 c 0.364,-0.122 0.61,-0.462 0.61,-0.847 l 0,-3.936 4.426,-1.428 0,4.154 c 0,0.27 0.118,0.52 0.323,0.689 0.206,0.172 0.474,0.241 0.739,0.192 l 7.608,-1.452 c 0.422,-0.079 0.728,-0.448 0.728,-0.877 l 0,-4.338 6.62,-0.904 0,4.509 c 0,0.241 0.096,0.467 0.264,0.635 0.167,0.166 0.394,0.259 0.633,0.259 l 0.002,0 5.551,-0.022 5.549,0.022 c 0.245,-10e-4 0.468,-0.093 0.635,-0.259 0.169,-0.168 0.264,-0.394 0.264,-0.635 l 0,-4.509 6.621,0.904 0,4.338 c 0,0.429 0.304,0.798 0.726,0.877 l 7.609,1.452 c 0.262,0.049 0.533,-0.02 0.738,-0.192 0.205,-0.169 0.325,-0.419 0.325,-0.689 l 0,-4.154 4.425,1.428 0,3.936 c 0,0.385 0.245,0.725 0.609,0.847 l 1.475,0.497 0,16.279 0.04,0 c 1.437,1.834 2.767,3.767 4.042,5.828 -1.694,2.883 -3.768,5.459 -5.986,7.846 -2.057,-1.035 -4.055,-2.208 -5.942,-3.456 -0.944,0.938 -2.008,1.706 -3.052,2.509 -1.027,0.824 -2.183,1.428 -3.281,2.132 0.327,2.433 0.489,4.828 0.554,7.327 -2.831,1.424 -5.85,2.369 -8.903,3.047 -1.219,-2.048 -2.334,-4.267 -3.304,-6.436 -1.152,0.192 -2.309,0.264 -3.467,0.277 l 0,0.002 c -0.008,0 -0.015,-0.002 -0.022,-0.002 -0.008,0 -0.015,0.002 -0.022,0.002 l 0,-0.002 c -1.16,-0.013 -2.316,-0.085 -3.468,-0.277 -0.97,2.169 -2.084,4.388 -3.305,6.436 C 19.475,24.555 16.456,23.61 13.626,22.186 13.69,19.687 13.852,17.292 14.18,14.859 13.081,14.155 11.925,13.551 10.898,12.727 9.855,11.924 8.79,11.156 7.846,10.218 5.958,11.466 3.961,12.639 1.904,13.674 -0.314,11.287 -2.388,8.711 -4.082,5.828 -2.807,3.767 -1.477,1.834 -0.04,0 L 0,0 Z"
inkscape:connector-curvature="0" />
</g>
<g
transform="matrix(12.995388,0,0,-12.995388,411.4457,567.42812)"
id="g3420">
<path
id="path3422"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,-3.611 -2.926,-6.537 -6.537,-6.537 -3.608,0 -6.535,2.926 -6.535,6.537 0,3.609 2.927,6.533 6.535,6.533 C -2.926,6.533 0,3.609 0,0"
inkscape:connector-curvature="0" />
</g>
<g
transform="matrix(12.995388,0,0,-12.995388,391.00655,572.46636)"
id="g3424">
<path
id="path3426"
style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,-2.396 -1.941,-4.337 -4.339,-4.337 -2.396,0 -4.339,1.941 -4.339,4.337 0,2.396 1.943,4.339 4.339,4.339 C -1.941,4.339 0,2.396 0,0"
inkscape:connector-curvature="0" />
</g>
<g
transform="matrix(12.995388,0,0,-12.995388,526.30933,660.10985)"
id="g3428">
<path
id="path3430"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c -1.162,0 -2.104,0.856 -2.104,1.912 l 0,6.018 c 0,1.054 0.942,1.912 2.104,1.912 1.162,0 2.106,-0.858 2.106,-1.912 l 0,-6.018 C 2.106,0.856 1.162,0 0,0"
inkscape:connector-curvature="0" />
</g>
<g
transform="matrix(12.995388,0,0,-12.995388,641.18731,567.42812)"
id="g3432">
<path
id="path3434"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,-3.611 2.926,-6.537 6.537,-6.537 3.609,0 6.535,2.926 6.535,6.537 0,3.609 -2.926,6.533 -6.535,6.533 C 2.926,6.533 0,3.609 0,0"
inkscape:connector-curvature="0" />
</g>
<g
transform="matrix(12.995388,0,0,-12.995388,661.63165,572.46636)"
id="g3436">
<path
id="path3438"
style="fill:#414042;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 0,0 c 0,-2.396 1.941,-4.337 4.336,-4.337 2.398,0 4.339,1.941 4.339,4.337 0,2.396 -1.941,4.339 -4.339,4.339 C 1.941,4.339 0,2.396 0,0"
inkscape:connector-curvature="0" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -173,6 +173,7 @@ void InputDefault::joy_connection_changed(int p_idx, bool p_connected, String p_
for (int i=0; i < map_db.size(); i++) {
if (js.uid == map_db[i].uid) {
mapping = i;
js.name = map_db[i].name;
//printf("found mapping\n");
};
};
@@ -487,6 +488,7 @@ static const char *s_ControllerMappings [] =
"030000006f0e00001304000000010000,Generic X-Box pad,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,",
"030000006f0e00001e01000011010000,Rock Candy Gamepad for PS3,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,guide:b12,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,",
"030000006f0e00001f01000000010000,Generic X-Box pad,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,",
"030000006f0e00002801000011010000,PDP Rock Candy Wireless Controller for PS3,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b11,rightshoulder:b5,rightx:a2,start:b9,righty:a3,dpleft:h0.8,lefttrigger:b6,x:b0,dpup:h0.1,back:b8,leftstick:b10,leftshoulder:b4,y:b3,a:b1,dpright:h0.2,righttrigger:b7,b:b2,",
"030000006f0e00003001000001010000,EA Sports PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
"03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4,",
"03000000790000001100000010010000,RetroLink Saturn Classic Controller,x:b3,a:b0,b:b1,y:b4,back:b5,guide:b2,start:b8,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,",
@@ -501,9 +503,11 @@ static const char *s_ControllerMappings [] =
"03000000c9110000f055000011010000,HJC Game GAMEPAD,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b4,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
"03000000de280000ff11000001000000,Valve Streaming Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
"03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,",
"03000000fd0500002a26000000010000,3dfx InterAct HammerHead FX,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b5,rightshoulder:b7,rightx:a2,start:b11,righty:a3,dpleft:h0.8,lefttrigger:b8,x:b0,dpup:h0.1,back:b10,leftstick:b2,leftshoulder:b6,y:b1,a:b3,dpright:h0.2,righttrigger:b9,b:b4,",
"03000000ff1100003133000010010000,PC Game Controller,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,",
"05000000362800000100000002010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,",
"05000000362800000100000003010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2,",
"05000000362800000100000002010000,OUYA Game Controller,leftx:a0,lefty:a1,dpdown:b9,rightstick:b7,rightshoulder:b5,rightx:a3,start:b16,righty:a4,dpleft:b10,lefttrigger:b12,x:b1,dpup:b8,back:b14,leftstick:b6,leftshoulder:b4,y:b2,a:b0,dpright:b11,righttrigger:b13,b:b3,",
"05000000362800000100000003010000,OUYA Game Controller,leftx:a0,lefty:a1,dpdown:b9,rightstick:b7,rightshoulder:b5,rightx:a3,start:b16,righty:a4,dpleft:b10,lefttrigger:b12,x:b1,dpup:b8,back:b14,leftstick:b6,leftshoulder:b4,y:b2,a:b0,dpright:b11,righttrigger:b13,b:b3,",
"05000000362800000100000004010000,OUYA Game Controller,leftx:a0,lefty:a1,dpdown:b9,rightstick:b7,rightshoulder:b5,rightx:a3,start:b16,righty:a4,dpleft:b10,lefttrigger:b12,x:b1,dpup:b8,back:b14,leftstick:b6,leftshoulder:b4,y:b2,a:b0,dpright:b11,righttrigger:b13,b:b3,",
"0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,",
"050000004c050000c405000000010000,PS4 Controller (Bluetooth),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
"050000007e0500003003000001000000,Nintendo Wii U Pro Controller,a:b0,b:b1,x:b3,y:b2,back:b8,start:b9,guide:b10,leftshoulder:b4,rightshoulder:b5,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:b13,dpleft:b15,dpdown:b14,dpright:b16,",
@@ -513,7 +517,12 @@ static const char *s_ControllerMappings [] =
#if defined(__ANDROID__)
"Default Android Gamepad,Default Controller,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b8,rightshoulder:b10,rightx:a2,start:b6,righty:a3,dpleft:h0.8,lefttrigger:a4,x:b2,dpup:h0.1,back:b4,leftstick:b7,leftshoulder:b9,y:b3,a:b0,dpright:h0.2,righttrigger:a5,b:b1,",
"47656e6572696320582d426f78207061,Logitech F-310,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b8,rightshoulder:b10,rightx:a2,start:b6,righty:a3,dpleft:h0.8,lefttrigger:a5,x:b2,dpup:h0.1,leftstick:b7,leftshoulder:b9,y:b3,a:b0,dpright:h0.2,righttrigger:a4,b:b1,",
"484f524920434f2e2c4c544420205041,Hori Gem Pad 3,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b6,rightshoulder:b18,rightx:a2,start:b16,righty:a3,dpleft:h0.8,lefttrigger:b9,x:b0,dpup:h0.1,back:b15,leftstick:b4,leftshoulder:b3,y:b2,a:b1,dpright:h0.2,righttrigger:b10,b:b17,",
"4d6963726f736f667420582d426f7820,Microsoft X-Box 360 pad,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b8,rightshoulder:b10,rightx:a2,start:b6,righty:a3,dpleft:h0.8,lefttrigger:a4,x:b2,dpup:h0.1,leftstick:b7,leftshoulder:b9,y:b3,a:b0,dpright:h0.2,righttrigger:a5,b:b1,",
"4e564944494120436f72706f72617469,NVIDIA Controller,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b9,leftstick:b7,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b8,righttrigger:a5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,",
"532e542e442e20496e74657261637420,3dfx InterAct HammerHead FX,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b25,rightshoulder:b27,rightx:a2,start:b31,righty:a3,dpleft:h0.8,lefttrigger:b28,x:b20,dpup:h0.1,back:b30,leftstick:b22,leftshoulder:b26,y:b21,a:b23,dpright:h0.2,righttrigger:b29,b:b24,",
"506572666f726d616e63652044657369,PDP Rock Candy Wireless Controller for PS3,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b6,rightshoulder:b18,rightx:a2,start:b16,righty:a3,dpleft:h0.8,lefttrigger:b9,x:b0,dpup:h0.1,back:h0.2,leftstick:b4,leftshoulder:b3,y:b2,a:b1,dpright:h0.2,righttrigger:b10,b:b17,",
#endif
#ifdef JAVASCRIPT_ENABLED
@@ -818,6 +827,7 @@ void InputDefault::parse_mapping(String p_mapping) {
uid.resize(17);
mapping.uid = entry[0];
mapping.name = entry[1];
int idx = 1;
while (++idx < entry.size()) {

View File

@@ -102,6 +102,7 @@ private:
struct JoyDeviceMapping {
String uid;
String name;
Map<int,JoyEvent> buttons;
Map<int,JoyEvent> axis;
JoyEvent hat[HAT_MAX];

View File

@@ -1011,6 +1011,7 @@ bool Main::start() {
bool noquit=false;
bool convert_old=false;
bool export_debug=false;
bool project_manager_request = false;
List<String> args = OS::get_singleton()->get_cmdline_args();
for (int i=0;i<args.size();i++) {
//parameters that do not have an argument to the right
@@ -1022,6 +1023,8 @@ bool Main::start() {
convert_old=true;
} else if (args[i]=="-editor" || args[i]=="-e") {
editor=true;
} else if (args[i] == "-pm" || args[i] == "-project_manager") {
project_manager_request = true;
} else if (args[i].length() && args[i][0] != '-' && game_path == "") {
game_path=args[i];
}
@@ -1255,7 +1258,7 @@ bool Main::start() {
}
if (game_path!="") {
if (game_path!="" && !project_manager_request) {
String local_game_path=game_path.replace("\\","/");
@@ -1462,7 +1465,7 @@ bool Main::start() {
};
}
*/
if (script=="" && test=="" && game_path=="" && !editor) {
if (project_manager_request || (script=="" && test=="" && game_path=="" && !editor)) {
ProjectManager *pmanager = memnew( ProjectManager );
sml->get_root()->add_child(pmanager);

View File

@@ -1096,6 +1096,8 @@ def update_version():
f.write("#define VERSION_NAME "+str(version.name)+"\n")
f.write("#define VERSION_MAJOR "+str(version.major)+"\n")
f.write("#define VERSION_MINOR "+str(version.minor)+"\n")
if (hasattr(version, 'patch')):
f.write("#define VERSION_PATCH "+str(version.patch)+"\n")
f.write("#define VERSION_REVISION "+str(rev)+"\n")
f.write("#define VERSION_STATUS "+str(version.status)+"\n")
import datetime

View File

@@ -1790,7 +1790,7 @@ void GDParser::_parse_block(BlockNode *p_block,bool p_static) {
p_block->sub_blocks.push_back(cf_for->body);
if (!_enter_indent_block(cf_for->body)) {
_set_error("Expected indented block after 'while'");
_set_error("Expected indented block after 'for'");
p_block->end_line=tokenizer->get_token_line();
return;
}

View File

@@ -59,7 +59,7 @@ for x in env.android_dependencies:
gradle_java_dirs_text=""
for x in env.android_java_dirs:
gradle_java_dirs_text+=",'"+x+"'"
gradle_java_dirs_text+=",'"+x.replace("\\","/")+"'"
gradle_res_dirs_text=""

View File

@@ -1493,6 +1493,16 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
OS::get_singleton()->delay_usec(3000000);
}
if (EditorSettings::get_singleton()->get("android/shutdown_adb_on_exit")) {
String adb=EditorSettings::get_singleton()->get("android/adb");
if (!FileAccess::exists(adb)) {
return; //adb not configured
}
List<String> args;
args.push_back("kill-server");
OS::get_singleton()->execute(adb,args,true);
};
}
Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {

View File

@@ -183,12 +183,12 @@ size_t DirAccessFlash::get_space_left() {
Error DirAccessFlash::rename(String p_from, String p_to) {
return FAILED;
ERR_FAIL_V(ERR_UNAVAILABLE);
};
Error DirAccessFlash::remove(String p_name) {
return FAILED;
ERR_FAIL_V(ERR_UNAVAILABLE);
};
extern char* psp_drive;

View File

@@ -74,6 +74,15 @@ static void _glut_skey(bool pressed,int key) {
case GLUT_KEY_INSERT: ev.key.scancode=KEY_INSERT; break;
}
if (pressed) {
if (os->skey_pressed[key])
ev.key.echo = true;
else
os->skey_pressed[key] = true;
}
else {
os->skey_pressed[key] = false;
}
uint32_t m = glutGetModifiers();
ev.key.mod.alt=(m&GLUT_ACTIVE_ALT)!=0;
@@ -107,6 +116,16 @@ static void _glut_key(bool pressed,unsigned char key) {
default: {
ev.key.unicode=key;
}
if (pressed) {
if (os->key_pressed[key])
ev.key.echo = true;
else
os->key_pressed[key] = true;
}
else {
os->key_pressed[key] = false;
}
}

View File

@@ -693,7 +693,11 @@ OS_JavaScript::OS_JavaScript(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, Ope
time_to_save_sync=-1;
for (int i = 0; i < 256; i++) {
key_pressed[i] = false;
if (i < 121)
skey_pressed[i] = false;
}
}
OS_JavaScript::~OS_JavaScript() {

View File

@@ -56,10 +56,12 @@ public:
Point2 pos;
};
bool skey_pressed[121];
bool key_pressed[256];
private:
Vector<TouchPos> touch;
Point2 last_mouse;
unsigned int last_id;
GFXInitFunc gfx_init_func;

View File

@@ -297,8 +297,11 @@ Error DirAccessOSX::rename(String p_path,String p_new_path) {
}
Error DirAccessOSX::remove(String p_path) {
p_path=fix_path(p_path);
if (p_path.is_rel_path())
p_path=get_current_dir().plus_file(p_path);
else
p_path=fix_path(p_path);
struct stat flags;
if ((stat(p_path.utf8().get_data(),&flags)!=0))
return FAILED;

View File

@@ -28,7 +28,6 @@ def get_flags():
return [
('builtin_zlib', 'no'),
('theora','no'), #use builtin openssl
]

View File

@@ -49,13 +49,11 @@ private:
JOYSTICKS_MAX = 16,
MAX_ABS = 63,
MAX_KEY = 767, // Hack because <linux/input.h> can't be included here
BT_MISC = 256,
HAT_MAX = 4,
};
struct Joystick {
InputDefault::JoyAxis curr_axis[MAX_ABS];
int key_map[MAX_KEY - BT_MISC];
int key_map[MAX_KEY];
int abs_map[MAX_ABS];
int dpad;
int fd;

View File

@@ -188,13 +188,15 @@ bool Sprite::is_region() const{
void Sprite::set_region_rect(const Rect2& p_region_rect) {
bool changed=region_rect!=p_region_rect;
if (region_rect==p_region_rect)
return;
region_rect=p_region_rect;
if (region && changed) {
update();
if (region)
item_rect_changed();
_change_notify("region_rect");
}
_change_notify("region_rect");
}
Rect2 Sprite::get_region_rect() const {

View File

@@ -607,20 +607,21 @@ float AnimationTreePlayer::_process_node(const StringName& p_node,AnimationNode
Blend3Node *bn = static_cast<Blend3Node*>(nb);
float rem;
if (bn->value==0) {
rem = _process_node(bn->inputs[1].node,r_prev_anim,p_weight,p_time,switched,p_seek,p_filter,p_reverse_weight);
} else if (bn->value>0) {
rem = _process_node(bn->inputs[1].node,r_prev_anim,p_weight*(1.0-bn->value),p_time,switched,p_seek,p_filter,p_reverse_weight*(1.0-bn->value));
_process_node(bn->inputs[2].node,r_prev_anim,p_weight*bn->value,p_time,switched,p_seek,p_filter,p_reverse_weight*bn->value);
float blend, lower_blend, upper_blend;
if (bn->value < 0) {
lower_blend = -bn->value;
blend = 1.0 - lower_blend;
upper_blend = 0;
} else {
rem = _process_node(bn->inputs[1].node,r_prev_anim,p_weight*(1.0+bn->value),p_time,switched,p_seek,p_filter,p_reverse_weight*(1.0+bn->value));
_process_node(bn->inputs[0].node,r_prev_anim,p_weight*-bn->value,p_time,switched,p_seek,p_filter,p_reverse_weight*-bn->value);
lower_blend = 0;
blend = 1.0 - bn->value;
upper_blend = bn->value;
}
rem = _process_node(bn->inputs[1].node,r_prev_anim,p_weight*blend,p_time,switched,p_seek,p_filter,p_reverse_weight*blend);
_process_node(bn->inputs[2].node,r_prev_anim,p_weight*upper_blend,p_time,switched,p_seek,p_filter,p_reverse_weight*upper_blend);
_process_node(bn->inputs[0].node,r_prev_anim,p_weight*lower_blend,p_time,switched,p_seek,p_filter,p_reverse_weight*lower_blend);
return rem;
} break;
case NODE_BLEND4: {
@@ -768,6 +769,10 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
t.scale.x=0;
t.scale.y=0;
t.scale.z=0;
Variant value = t.node->get(t.property);
value.zero();
t.node->set(t.property, value);
}
@@ -777,11 +782,9 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
Quat empty_rot;
int total = 0;
while(anim_list) {
if (!anim_list->animation.is_null() && !anim_list->skip) {
++total;
//check if animation is meaningful
Animation *a = anim_list->animation.operator->();
@@ -816,8 +819,9 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
case Animation::TYPE_VALUE: { ///< Set a value in a property, can be interpolated.
if (a->value_track_is_continuous(tr.local_track)) {
Variant value = a->value_track_interpolate(tr.local_track,anim_list->time);
tr.track->node->set(tr.track->property,value);
Variant blended, value = a->value_track_interpolate(tr.local_track,anim_list->time);
Variant::blend(tr.track->node->get(tr.track->property),value,blend,blended);
tr.track->node->set(tr.track->property,blended);
} else {
List<int> indices;

View File

@@ -847,7 +847,7 @@ void TextEdit::_notification(int p_what) {
}
}
bool completion_below = false;
if (completion_active) {
// code completion box
Ref<StyleBox> csb = get_stylebox("completion");
@@ -878,11 +878,12 @@ void TextEdit::_notification(int p_what) {
}
int th = h + csb->get_minimum_size().y;
if (cursor_pos.y+get_row_height()+th > get_size().height) {
completion_rect.pos.y=cursor_pos.y-th;
} else {
completion_rect.pos.y=cursor_pos.y+get_row_height()+csb->get_offset().y;
completion_below = true;
}
if (cursor_pos.x-nofs+w+scrollw > get_size().width) {
@@ -930,8 +931,24 @@ void TextEdit::_notification(int p_what) {
completion_line_ofs=line_from;
}
// check to see if the hint should be drawn
bool show_hint = false;
if (completion_hint!="") {
if (completion_active) {
if (completion_below && !callhint_below) {
show_hint = true;
}
else if (!completion_below && callhint_below) {
show_hint = true;
}
}
else {
show_hint = true;
}
}
if (show_hint) {
Ref<StyleBox> sb = get_stylebox("panel","TooltipPanel");
Ref<Font> font = cache.font;
@@ -967,7 +984,15 @@ void TextEdit::_notification(int p_what) {
}
Point2 hint_ofs = Vector2(completion_hint_offset,cursor_pos.y-minsize.y);
Point2 hint_ofs = Vector2(completion_hint_offset,cursor_pos.y) + callhint_offset;
if (callhint_below) {
hint_ofs.y += get_row_height() + sb->get_offset().y;
}
else {
hint_ofs.y -= minsize.y + sb->get_offset().y;
}
draw_style_box(sb,Rect2(hint_ofs,minsize));
spacing=0;

View File

@@ -231,6 +231,9 @@ class TextEdit : public Control {
bool next_operation_is_complex;
bool callhint_below;
Vector2 callhint_offset;
int get_visible_rows() const;
int get_char_count();
@@ -326,6 +329,10 @@ public:
brace_matching_enabled=p_enabled;
update();
}
inline void set_callhint_settings(bool below, Vector2 offset) {
callhint_below = below;
callhint_offset = offset;
}
void set_auto_indent(bool p_auto_indent);
void cursor_set_column(int p_col, bool p_adjust_viewport=true);

View File

@@ -1803,6 +1803,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
}
if (gui.drag_data.get_type()==Variant::NIL && over && !gui.modal_stack.empty()) {
Control *top = gui.modal_stack.back()->get();
@@ -1836,7 +1837,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
}
Matrix32 localizer = over->get_canvas_transform().affine_inverse();
Matrix32 localizer = over->get_global_transform_with_canvas().affine_inverse();
Size2 pos = localizer.xform(mpos);
Vector2 speed = localizer.basis_xform(Point2(p_event.mouse_motion.speed_x,p_event.mouse_motion.speed_y));
Vector2 rel = localizer.basis_xform(Point2(p_event.mouse_motion.relative_x,p_event.mouse_motion.relative_y));
@@ -1871,7 +1872,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
}
pos = gui.focus_inv_xform.xform(pos);
//pos = gui.focus_inv_xform.xform(pos);
p_event.mouse_motion.x = pos.x;

View File

@@ -568,6 +568,12 @@ void CodeTextEditor::_on_settings_change() {
);
enable_complete_timer = EDITOR_DEF("text_editor/enable_code_completion_delay",true);
// call hint settings
text_editor->set_callhint_settings(
EDITOR_DEF("text_editor/put_callhint_tooltip_below_current_line", true),
EDITOR_DEF("text_editor/callhint_tooltip_offset", Vector2())
);
}
void CodeTextEditor::_text_changed_idle_timeout() {

View File

@@ -405,29 +405,98 @@ void EditorHelpIndex::select_class(const String& p_class) {
class_list->ensure_cursor_is_visible();
}
void EditorHelpIndex::popup() {
popup_centered_ratio(0.6);
search_box->set_text("");
_update_class_list();
}
void EditorHelpIndex::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
class_list->clear();
tree_item_map.clear();
TreeItem *root = class_list->create_item();
class_list->set_hide_root(true);
_update_class_list();
connect("confirmed",this,"_tree_item_selected");
} else if (p_what==NOTIFICATION_POST_POPUP) {
for(Map<String,DocData::ClassDoc>::Element *E=EditorHelp::get_doc_data()->class_list.front();E;E=E->next()) {
search_box->call_deferred("grab_focus");
}
}
void EditorHelpIndex::_text_changed(const String& p_text) {
_update_class_list();
}
void EditorHelpIndex::_update_class_list() {
class_list->clear();
tree_item_map.clear();
TreeItem *root = class_list->create_item();
class_list->set_hide_root(true);
String filter = search_box->get_text().strip_edges();
String to_select = "";
for(Map<String,DocData::ClassDoc>::Element *E=EditorHelp::get_doc_data()->class_list.front();E;E=E->next()) {
if (filter == "") {
add_type(E->key(),tree_item_map,root);
}
} else {
bool found = false;
String type = E->key();
while(type != "") {
if (type.findn(filter)!=-1) {
if (to_select.empty()) {
to_select = type;
}
found=true;
break;
}
type = EditorHelp::get_doc_data()->class_list[type].inherits;
}
if (found) {
add_type(E->key(),tree_item_map,root);
}
}
}
if (tree_item_map.has(filter)) {
select_class(filter);
} else if (to_select != "") {
select_class(to_select);
}
}
void EditorHelpIndex::_sbox_input(const InputEvent& p_ie) {
if (p_ie.type==InputEvent::KEY && (
p_ie.key.scancode == KEY_UP ||
p_ie.key.scancode == KEY_DOWN ||
p_ie.key.scancode == KEY_PAGEUP ||
p_ie.key.scancode == KEY_PAGEDOWN ) ) {
class_list->call("_input_event",p_ie);
search_box->accept_event();
}
}
void EditorHelpIndex::_bind_methods() {
ObjectTypeDB::bind_method("_tree_item_selected",&EditorHelpIndex::_tree_item_selected);
ObjectTypeDB::bind_method("_text_changed",&EditorHelpIndex::_text_changed);
ObjectTypeDB::bind_method("_sbox_input",&EditorHelpIndex::_sbox_input);
ObjectTypeDB::bind_method("select_class",&EditorHelpIndex::select_class);
ADD_SIGNAL( MethodInfo("open_class"));
}
@@ -436,19 +505,25 @@ void EditorHelpIndex::_bind_methods() {
EditorHelpIndex::EditorHelpIndex() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child("Search:", search_box);
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
register_text_enter(search_box);
search_box->connect("text_changed", this, "_text_changed");
search_box->connect("input_event", this, "_sbox_input");
class_list = memnew( Tree );
vbc->add_margin_child("Class List: ",class_list,true);
vbc->add_margin_child("Class List: ", class_list, true);
class_list->set_v_size_flags(SIZE_EXPAND_FILL);
class_list->connect("item_activated",this,"_tree_item_selected");
get_ok()->set_text("Open");
}
@@ -650,14 +725,64 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->add_text("Inherits: ");
class_desc->pop();
class_desc->pop();
String inherits = cd.inherits;
class_desc->push_font(doc_font);
_add_type(cd.inherits);
while (inherits != "") {
_add_type(inherits);
inherits = doc->class_list[inherits].inherits;
if (inherits != "") {
class_desc->add_text(" , ");
}
}
class_desc->pop();
class_desc->add_newline();
class_desc->add_newline();
}
if (ObjectTypeDB::type_exists(cd.name)) {
bool found = false;
bool prev = false;
for (Map<String,DocData::ClassDoc>::Element *E=doc->class_list.front();E;E=E->next()) {
if (E->get().inherits == cd.name) {
if (!found) {
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text("Inherited by: ");
class_desc->pop();
class_desc->pop();
found = true;
class_desc->push_font(doc_font);
}
if (prev) {
class_desc->add_text(" , ");
prev = false;
}
_add_type(E->get().name);
prev = true;
}
}
if (found)
class_desc->pop();
class_desc->add_newline();
}
class_desc->add_newline();
if (cd.brief_description!="") {
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));

View File

@@ -77,11 +77,16 @@ public:
class EditorHelpIndex : public ConfirmationDialog {
OBJ_TYPE( EditorHelpIndex, ConfirmationDialog );
LineEdit *search_box;
Tree *class_list;
HashMap<String,TreeItem*> tree_item_map;
void _tree_item_selected();
void _text_changed(const String& p_text);
void _sbox_input(const InputEvent& p_ie);
void _update_class_list();
void add_type(const String& p_type,HashMap<String,TreeItem*>& p_types,TreeItem *p_root);
protected:
@@ -92,6 +97,8 @@ public:
void select_class(const String& p_class);
void popup();
EditorHelpIndex();
};

View File

@@ -980,11 +980,6 @@ void EditorNode::_save_scene(String p_file) {
editor_data.apply_changes_in_editors();
if (editor_plugin_screen) {
scene->set_meta("__editor_plugin_screen__",editor_plugin_screen->get_name());
}
_set_scene_metadata(p_file);
@@ -2671,8 +2666,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
String exec = OS::get_singleton()->get_executable_path();
List<String> args;
args.push_back ( "-path" );
args.push_back (exec.get_base_dir() );
//args.push_back ( "-path" );
//args.push_back (exec.get_base_dir() );
args.push_back("-pm");
OS::ProcessID pid=0;
Error err = OS::get_singleton()->execute(exec,args,false,&pid);
@@ -3597,26 +3593,12 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
*/
editor_data.set_edited_scene_import_metadata( sdata->get_import_metadata() );
// editor_data.get_undo_redo().clear_history();
saved_version=editor_data.get_undo_redo().get_version();
_update_title();
_update_scene_tabs();
_add_to_recent_scenes(lpath);
if (new_scene->has_meta("__editor_plugin_screen__")) {
String editor = new_scene->get_meta("__editor_plugin_screen__");
for(int i=0;i<editor_table.size();i++) {
if (editor_table[i]->get_name()==editor) {
_editor_select(i);
break;
}
}
}
prev_scene->set_disabled(previous_scenes.size()==0);
opening_prev=false;
@@ -4539,7 +4521,7 @@ void EditorNode::_scene_tab_closed(int p_tab) {
}
else {
_remove_scene(p_tab);
//_update_scene_tabs();
_update_scene_tabs();
}
}

View File

@@ -564,13 +564,29 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("resources/save_compressed_resources",true);
set("resources/auto_reload_modified_images",true);
if (p_extra_config.is_valid() && p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
if (p_extra_config.is_valid()) {
Vector<String> list = p_extra_config->get_value("init_projects", "list");
for (int i=0; i<list.size(); i++) {
if (p_extra_config->has_section("init_projects") && p_extra_config->has_section_key("init_projects", "list")) {
String name = list[i].replace("/", "::");
set("projects/"+name, list[i]);
Vector<String> list = p_extra_config->get_value("init_projects", "list");
for (int i=0; i<list.size(); i++) {
String name = list[i].replace("/", "::");
set("projects/"+name, list[i]);
};
};
if (p_extra_config->has_section("presets")) {
List<String> keys;
p_extra_config->get_section_keys("presets", &keys);
for (List<String>::Element *E=keys.front();E;E=E->next()) {
String key = E->get();
Variant val = p_extra_config->get_value("presets", key);
set(key, val);
};
};
};

View File

@@ -971,7 +971,7 @@ void ScriptEditor::_menu_option(int p_option) {
}
}
help_index->popup_centered_ratio(0.6);
help_index->popup();
if (current!="") {
help_index->call_deferred("select_class",current);
@@ -1928,6 +1928,9 @@ void ScriptEditor::edit(const Ref<Script>& p_script) {
ste->set_edited_script(p_script);
ste->get_text_edit()->set_tooltip_request_func(this,"_get_debug_tooltip",ste);
ste->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete"));
ste->get_text_edit()->set_callhint_settings(
EditorSettings::get_singleton()->get("text_editor/put_callhint_tooltip_below_current_line"),
EditorSettings::get_singleton()->get("text_editor/callhint_tooltip_offset"));
tab_container->add_child(ste);
_go_to_tab(tab_container->get_tab_count()-1);

View File

@@ -60,6 +60,8 @@ void ProjectSettings::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
globals_editor->edit(Globals::get_singleton());
search_button->set_icon(get_icon("Zoom","EditorIcons"));
clear_button->set_icon(get_icon("Close","EditorIcons"));
@@ -566,8 +568,7 @@ void ProjectSettings::popup_project_settings() {
//popup_centered(Size2(500,400));
popup_centered_ratio();
globals_editor->edit(NULL);
globals_editor->edit(Globals::get_singleton());
globals_editor->update_category_list();
_update_translations();
_update_autoload();
}
@@ -604,37 +605,45 @@ void ProjectSettings::_item_add() {
case 3: value=""; break;
}
String catname = category->get_text();
String catname = category->get_text().strip_edges();
/*if (!catname.is_valid_identifier()) {
message->set_text("Invalid Category.\nValid characters: a-z,A-Z,0-9 or _");
message->popup_centered(Size2(300,100));
return;
}*/
String propname = property->get_text();
String propname = property->get_text().strip_edges();
/*if (!propname.is_valid_identifier()) {
message->set_text("Invalid Property.\nValid characters: a-z,A-Z,0-9 or _");
message->popup_centered(Size2(300,100));
return;
}*/
String name = catname+"/"+propname;
String name = catname!="" ? catname+"/"+propname : propname;
Globals::get_singleton()->set(name,value);
globals_editor->edit(NULL);
globals_editor->edit(Globals::get_singleton());
globals_editor->set_current_section(catname);
globals_editor->update_category_list();
_settings_changed();
}
void ProjectSettings::_item_del() {
String catname = category->get_text();
String catname = category->get_text().strip_edges();
//ERR_FAIL_COND(!catname.is_valid_identifier());
String propname = property->get_text();
String propname = property->get_text().strip_edges();
//ERR_FAIL_COND(!propname.is_valid_identifier());
String name = catname+"/"+propname;
Globals::get_singleton()->set(name,Variant());
globals_editor->get_property_editor()->update_tree();
String name = catname!="" ? catname+"/"+propname : propname;
Globals::get_singleton()->set(name,Variant());
globals_editor->set_current_section(catname);
globals_editor->update_category_list();
_settings_changed();
}
void ProjectSettings::_action_adds(String) {

View File

@@ -3840,14 +3840,34 @@ void SectionedPropertyEditor::_section_selected(int p_which) {
filter->set_section( sections->get_item_metadata(p_which) );
}
void SectionedPropertyEditor::set_current_section(const String& p_section) {
int section_idx = sections->find_metadata(p_section);
if (section_idx==sections->get_current())
return;
if (section_idx!=-1) {
sections->select(section_idx);
_section_selected(section_idx);
} else if (sections->get_item_count()) {
sections->select(0);
_section_selected(0);
}
}
String SectionedPropertyEditor::get_current_section() const {
return sections->get_item_metadata( sections->get_current() );
if (sections->get_current()!=-1)
return sections->get_item_metadata( sections->get_current() );
else
return "";
}
String SectionedPropertyEditor::get_full_item_path(const String& p_item) {
String base = sections->get_item_metadata( sections->get_current() );
String base = get_current_section();
if (base!="")
return base+"/"+p_item;
else
@@ -3856,17 +3876,44 @@ String SectionedPropertyEditor::get_full_item_path(const String& p_item) {
void SectionedPropertyEditor::edit(Object* p_object) {
List<PropertyInfo> pinfo;
if (p_object)
p_object->get_property_list(&pinfo);
if (p_object) {
obj=p_object->get_instance_ID();
update_category_list();
} else {
sections->clear();
}
filter->set_edited(p_object);
editor->edit(filter);
sections->select(0);
_section_selected(0);
}
void SectionedPropertyEditor::update_category_list() {
String selected_category=get_current_section();
sections->clear();
Object *o = ObjectDB::get_instance(obj);
if (!o)
return;
List<PropertyInfo> pinfo;
o->get_property_list(&pinfo);
Set<String> existing_sections;
for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) {
PropertyInfo pi=E->get();
if (pi.usage&PROPERTY_USAGE_CATEGORY)
continue;
else if ( !(pi.usage&PROPERTY_USAGE_EDITOR) )
continue;
if (pi.name.find(":")!=-1 || pi.name=="script/script")
continue;
int sp = pi.name.find("/");
@@ -3885,19 +3932,9 @@ void SectionedPropertyEditor::edit(Object* p_object) {
sections->set_item_metadata(sections->get_item_count()-1,"");
}
}
}
//sections->sort_items_by_text();
filter->set_edited(p_object);
editor->edit(filter);
sections->select(0);
_section_selected(0);
set_current_section(selected_category);
}
PropertyEditor *SectionedPropertyEditor::get_property_editor() {

View File

@@ -257,6 +257,9 @@ class SectionedPropertyEditor : public HBoxContainer {
OBJ_TYPE(SectionedPropertyEditor,HBoxContainer);
ObjectID obj;
ItemList *sections;
SectionedPropertyEditorFilter *filter;
PropertyEditor *editor;
@@ -270,8 +273,12 @@ public:
PropertyEditor *get_property_editor();
void edit(Object* p_object);
String get_full_item_path(const String& p_item);
void set_current_section(const String& p_section);
String get_current_section() const;
void update_category_list();
SectionedPropertyEditor();
~SectionedPropertyEditor();
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,7 +1,5 @@
convert -resize 32x32 ../../godot_icon.svg icon32.ico
convert -resize 32x32 ../../godot_icon.svg icon32.icns
for s in 16 24 32 64 96 128 256; do convert -resize ${s}x$s ../../godot_icon.svg icon$s.png; done
convert -resize 32x32 ../../icon.svg icon32.ico
convert -resize 32x32 ../../icon.svg icon32.icns
for s in 16 24 32 64 96 128 256; do convert -resize ${s}x$s ../../icon.svg icon$s.png; done
zip icons.zip icon*.png
rm icon*.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -2,7 +2,5 @@ short_name="godot"
name="Godot Engine"
major=2
minor=0
patch=1
status="stable"