Merge branch 'master' of https://github.com/okamstudio/godot
This commit is contained in:
commit
4b6225586c
46
SConstruct
46
SConstruct
@ -123,6 +123,7 @@ opts.Add('disable_3d', 'Disable 3D nodes for smaller executable (yes/no)', "no")
|
|||||||
opts.Add('disable_advanced_gui', 'Disable advance 3D gui nodes and behaviors (yes/no)', "no")
|
opts.Add('disable_advanced_gui', 'Disable advance 3D gui nodes and behaviors (yes/no)', "no")
|
||||||
opts.Add('colored', 'Enable colored output for the compilation (yes/no)', 'no')
|
opts.Add('colored', 'Enable colored output for the compilation (yes/no)', 'no')
|
||||||
opts.Add('extra_suffix', 'Custom extra suffix added to the base filename of all generated binary files.', '')
|
opts.Add('extra_suffix', 'Custom extra suffix added to the base filename of all generated binary files.', '')
|
||||||
|
opts.Add('vsproj', 'Generate Visual Studio Project. (yes/no)', 'no')
|
||||||
|
|
||||||
# add platform specific options
|
# add platform specific options
|
||||||
|
|
||||||
@ -177,6 +178,25 @@ if selected_platform in platform_list:
|
|||||||
else:
|
else:
|
||||||
env = env_base.Clone()
|
env = env_base.Clone()
|
||||||
|
|
||||||
|
if env['vsproj']=="yes":
|
||||||
|
env.vs_incs = []
|
||||||
|
env.vs_srcs = []
|
||||||
|
|
||||||
|
def AddToVSProject( sources ):
|
||||||
|
for x in sources:
|
||||||
|
if type(x) == type(""):
|
||||||
|
fname = env.File(x).path
|
||||||
|
else:
|
||||||
|
fname = env.File(x)[0].path
|
||||||
|
pieces = fname.split(".")
|
||||||
|
if len(pieces)>0:
|
||||||
|
basename = pieces[0]
|
||||||
|
basename = basename.replace('\\\\','/')
|
||||||
|
env.vs_srcs = env.vs_srcs + [basename + ".cpp"]
|
||||||
|
env.vs_incs = env.vs_incs + [basename + ".h"]
|
||||||
|
#print basename
|
||||||
|
env.AddToVSProject = AddToVSProject
|
||||||
|
|
||||||
env.extra_suffix=""
|
env.extra_suffix=""
|
||||||
|
|
||||||
if env["extra_suffix"] != '' :
|
if env["extra_suffix"] != '' :
|
||||||
@ -331,6 +351,32 @@ if selected_platform in platform_list:
|
|||||||
|
|
||||||
SConscript("platform/"+selected_platform+"/SCsub"); # build selected platform
|
SConscript("platform/"+selected_platform+"/SCsub"); # build selected platform
|
||||||
|
|
||||||
|
# Microsoft Visual Studio Project Generation
|
||||||
|
if (env['vsproj'])=="yes":
|
||||||
|
|
||||||
|
AddToVSProject(env.core_sources)
|
||||||
|
AddToVSProject(env.main_sources)
|
||||||
|
AddToVSProject(env.modules_sources)
|
||||||
|
AddToVSProject(env.scene_sources)
|
||||||
|
AddToVSProject(env.servers_sources)
|
||||||
|
AddToVSProject(env.tool_sources)
|
||||||
|
|
||||||
|
debug_variants = ['Debug|Win32']+['Debug|x64']
|
||||||
|
release_variants = ['Release|Win32']+['Release|x64']
|
||||||
|
release_debug_variants = ['Release_Debug|Win32']+['Release_Debug|x64']
|
||||||
|
variants = debug_variants + release_variants + release_debug_variants
|
||||||
|
debug_targets = ['Debug']+['Debug']
|
||||||
|
release_targets = ['Release']+['Release']
|
||||||
|
release_debug_targets = ['ReleaseDebug']+['ReleaseDebug']
|
||||||
|
targets = debug_targets + release_targets + release_debug_targets
|
||||||
|
msvproj = env.MSVSProject(target = ['#godot' + env['MSVSPROJECTSUFFIX'] ],
|
||||||
|
incs = env.vs_incs,
|
||||||
|
srcs = env.vs_srcs,
|
||||||
|
runfile = targets,
|
||||||
|
buildtarget = targets,
|
||||||
|
auto_build_solution=1,
|
||||||
|
variant = variants)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
print("No valid target platform selected.")
|
print("No valid target platform selected.")
|
||||||
|
@ -39,7 +39,7 @@ void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
|
|||||||
|
|
||||||
if (!files) {
|
if (!files) {
|
||||||
files = memnew((Map<String, Vector<uint8_t> >));
|
files = memnew((Map<String, Vector<uint8_t> >));
|
||||||
};
|
}
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
if (Globals::get_singleton())
|
if (Globals::get_singleton())
|
||||||
@ -49,7 +49,7 @@ void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
|
|||||||
name = DirAccess::normalize_path(name);
|
name = DirAccess::normalize_path(name);
|
||||||
|
|
||||||
(*files)[name] = p_data;
|
(*files)[name] = p_data;
|
||||||
};
|
}
|
||||||
|
|
||||||
void FileAccessMemory::cleanup() {
|
void FileAccessMemory::cleanup() {
|
||||||
|
|
||||||
@ -57,13 +57,13 @@ void FileAccessMemory::cleanup() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
memdelete(files);
|
memdelete(files);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
FileAccess* FileAccessMemory::create() {
|
FileAccess* FileAccessMemory::create() {
|
||||||
|
|
||||||
return memnew(FileAccessMemory);
|
return memnew(FileAccessMemory);
|
||||||
};
|
}
|
||||||
|
|
||||||
bool FileAccessMemory::file_exists(const String& p_name) {
|
bool FileAccessMemory::file_exists(const String& p_name) {
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ bool FileAccessMemory::file_exists(const String& p_name) {
|
|||||||
name = DirAccess::normalize_path(name);
|
name = DirAccess::normalize_path(name);
|
||||||
|
|
||||||
return files && (files->find(name) != NULL);
|
return files && (files->find(name) != NULL);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
|
Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
|
||||||
@ -89,57 +89,57 @@ Error FileAccessMemory::_open(const String& p_path, int p_mode_flags) {
|
|||||||
pos = 0;
|
pos = 0;
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
void FileAccessMemory::close() {
|
void FileAccessMemory::close() {
|
||||||
|
|
||||||
data = NULL;
|
data = NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
bool FileAccessMemory::is_open() const {
|
bool FileAccessMemory::is_open() const {
|
||||||
|
|
||||||
return data != NULL;
|
return data != NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
void FileAccessMemory::seek(size_t p_position) {
|
void FileAccessMemory::seek(size_t p_position) {
|
||||||
|
|
||||||
ERR_FAIL_COND(!data);
|
ERR_FAIL_COND(!data);
|
||||||
pos = p_position;
|
pos = p_position;
|
||||||
};
|
}
|
||||||
|
|
||||||
void FileAccessMemory::seek_end(int64_t p_position) {
|
void FileAccessMemory::seek_end(int64_t p_position) {
|
||||||
|
|
||||||
ERR_FAIL_COND(!data);
|
ERR_FAIL_COND(!data);
|
||||||
pos = length + p_position;
|
pos = length + p_position;
|
||||||
};
|
}
|
||||||
|
|
||||||
size_t FileAccessMemory::get_pos() const {
|
size_t FileAccessMemory::get_pos() const {
|
||||||
|
|
||||||
ERR_FAIL_COND_V(!data, 0);
|
ERR_FAIL_COND_V(!data, 0);
|
||||||
return pos;
|
return pos;
|
||||||
};
|
}
|
||||||
|
|
||||||
size_t FileAccessMemory::get_len() const {
|
size_t FileAccessMemory::get_len() const {
|
||||||
|
|
||||||
ERR_FAIL_COND_V(!data, 0);
|
ERR_FAIL_COND_V(!data, 0);
|
||||||
return length;
|
return length;
|
||||||
};
|
}
|
||||||
|
|
||||||
bool FileAccessMemory::eof_reached() const {
|
bool FileAccessMemory::eof_reached() const {
|
||||||
|
|
||||||
return pos >= length;
|
return pos >= length;
|
||||||
};
|
}
|
||||||
|
|
||||||
uint8_t FileAccessMemory::get_8() const {
|
uint8_t FileAccessMemory::get_8() const {
|
||||||
|
|
||||||
uint8_t ret;
|
uint8_t ret = 0;
|
||||||
if (pos < length) {
|
if (pos < length) {
|
||||||
ret = data[pos];
|
ret = data[pos];
|
||||||
};
|
}
|
||||||
++pos;
|
++pos;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
};
|
}
|
||||||
|
|
||||||
int FileAccessMemory::get_buffer(uint8_t *p_dst,int p_length) const {
|
int FileAccessMemory::get_buffer(uint8_t *p_dst,int p_length) const {
|
||||||
|
|
||||||
@ -156,19 +156,19 @@ int FileAccessMemory::get_buffer(uint8_t *p_dst,int p_length) const {
|
|||||||
pos += p_length;
|
pos += p_length;
|
||||||
|
|
||||||
return read;
|
return read;
|
||||||
};
|
}
|
||||||
|
|
||||||
Error FileAccessMemory::get_error() const {
|
Error FileAccessMemory::get_error() const {
|
||||||
|
|
||||||
return pos >= length ? ERR_FILE_EOF : OK;
|
return pos >= length ? ERR_FILE_EOF : OK;
|
||||||
};
|
}
|
||||||
|
|
||||||
void FileAccessMemory::store_8(uint8_t p_byte) {
|
void FileAccessMemory::store_8(uint8_t p_byte) {
|
||||||
|
|
||||||
ERR_FAIL_COND(!data);
|
ERR_FAIL_COND(!data);
|
||||||
ERR_FAIL_COND(pos >= length);
|
ERR_FAIL_COND(pos >= length);
|
||||||
data[pos++] = p_byte;
|
data[pos++] = p_byte;
|
||||||
};
|
}
|
||||||
|
|
||||||
void FileAccessMemory::store_buffer(const uint8_t *p_src,int p_length) {
|
void FileAccessMemory::store_buffer(const uint8_t *p_src,int p_length) {
|
||||||
|
|
||||||
@ -176,11 +176,11 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src,int p_length) {
|
|||||||
int write = MIN(p_length, left);
|
int write = MIN(p_length, left);
|
||||||
if (write < p_length) {
|
if (write < p_length) {
|
||||||
WARN_PRINT("Writing less data than requested");
|
WARN_PRINT("Writing less data than requested");
|
||||||
};
|
}
|
||||||
|
|
||||||
copymem(&data[pos], p_src, write);
|
copymem(&data[pos], p_src, write);
|
||||||
pos += p_length;
|
pos += p_length;
|
||||||
};
|
}
|
||||||
|
|
||||||
FileAccessMemory::FileAccessMemory() {
|
FileAccessMemory::FileAccessMemory() {
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
|
name="Isometric 2D + Lighting"
|
||||||
main_scene="res://map.scn"
|
main_scene="res://map.scn"
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
|
name="Truck Town"
|
||||||
main_scene="res://car_select.scn"
|
main_scene="res://car_select.scn"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
|
name="Rich Text Label (BBCode)"
|
||||||
main_scene="res://rich_text_bbcode.scn"
|
main_scene="res://rich_text_bbcode.scn"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
name="window_management"
|
name="Window Management"
|
||||||
main_scene="res://window_management.scn"
|
main_scene="res://window_management.scn"
|
||||||
icon="icon.png"
|
icon="icon.png"
|
||||||
|
|
||||||
|
@ -58,6 +58,9 @@ lib_list = []
|
|||||||
|
|
||||||
import string
|
import string
|
||||||
|
|
||||||
|
if env['vsproj']=="yes":
|
||||||
|
env.AddToVSProject(env.drivers_sources)
|
||||||
|
|
||||||
for f in env.drivers_sources:
|
for f in env.drivers_sources:
|
||||||
fname = ""
|
fname = ""
|
||||||
if type(f) == type(""):
|
if type(f) == type(""):
|
||||||
|
@ -233,7 +233,7 @@ int CPPlayer::get_channel_voice(int p_channel) {
|
|||||||
|
|
||||||
const char* CPPlayer::get_voice_sample_name(int p_voice) {
|
const char* CPPlayer::get_voice_sample_name(int p_voice) {
|
||||||
|
|
||||||
const char *name;
|
const char *name = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ const char * CPPlayer::get_voice_instrument_name(int p_voice) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const char *name;
|
const char *name = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -970,6 +970,7 @@ int32 DecomposeConvex(b2Polygon* p, b2Polygon* results, int32 maxPolys) {
|
|||||||
}
|
}
|
||||||
if (nTri < 1) {
|
if (nTri < 1) {
|
||||||
//Still no luck? Oh well...
|
//Still no luck? Oh well...
|
||||||
|
delete[] triangulated;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
int32 nPolys = PolygonizeTriangles(triangulated, nTri, results, maxPolys);
|
int32 nPolys = PolygonizeTriangles(triangulated, nTri, results, maxPolys);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
* Copyright (C) 2010 The Android Open Source Project
|
/* Copyright (C) 2010 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -12,3 +12,9 @@ common_win=[
|
|||||||
]
|
]
|
||||||
|
|
||||||
env.Program('#bin/godot',['godot_win.cpp']+common_win,PROGSUFFIX=env["PROGSUFFIX"])
|
env.Program('#bin/godot',['godot_win.cpp']+common_win,PROGSUFFIX=env["PROGSUFFIX"])
|
||||||
|
|
||||||
|
# Microsoft Visual Studio Project Generation
|
||||||
|
if (env['vsproj'])=="yes":
|
||||||
|
env.vs_srcs = env.vs_srcs + ["platform/windows/godot_win.cpp"]
|
||||||
|
for x in common_win:
|
||||||
|
env.vs_srcs = env.vs_srcs + ["platform/windows/" + x]
|
||||||
|
@ -292,7 +292,7 @@ SpriteBase3D::SpriteBase3D() {
|
|||||||
parent_sprite=NULL;
|
parent_sprite=NULL;
|
||||||
pI=NULL;
|
pI=NULL;
|
||||||
|
|
||||||
for(int i=0;i<4;i++)
|
for(int i=0;i<FLAG_MAX;i++)
|
||||||
flags[i]=i==FLAG_TRANSPARENT;
|
flags[i]=i==FLAG_TRANSPARENT;
|
||||||
|
|
||||||
axis=Vector3::AXIS_Z;
|
axis=Vector3::AXIS_Z;
|
||||||
|
@ -136,10 +136,9 @@ void Label::_notification(int p_what) {
|
|||||||
if (!wc)
|
if (!wc)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int c = 0;
|
||||||
int line=0;
|
int line=0;
|
||||||
while(wc) {
|
while(wc) {
|
||||||
|
|
||||||
/* handle lines not meant to be drawn quickly */
|
/* handle lines not meant to be drawn quickly */
|
||||||
if (line>line_to)
|
if (line>line_to)
|
||||||
break;
|
break;
|
||||||
@ -170,8 +169,8 @@ void Label::_notification(int p_what) {
|
|||||||
while(to && to->char_pos>=0) {
|
while(to && to->char_pos>=0) {
|
||||||
|
|
||||||
taken+=to->pixel_width;
|
taken+=to->pixel_width;
|
||||||
if (to!=from) {
|
if (to!=from && to->space_count) {
|
||||||
spaces++;
|
spaces+=to->space_count;
|
||||||
}
|
}
|
||||||
to=to->next;
|
to=to->next;
|
||||||
}
|
}
|
||||||
@ -212,9 +211,9 @@ void Label::_notification(int p_what) {
|
|||||||
ERR_PRINT("BUG");
|
ERR_PRINT("BUG");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (from!=wc) {
|
if (from->space_count) {
|
||||||
/* spacing */
|
/* spacing */
|
||||||
x_ofs+=space_w;
|
x_ofs+=space_w*from->space_count;
|
||||||
if (can_fill && align==ALIGN_FILL && spaces) {
|
if (can_fill && align==ALIGN_FILL && spaces) {
|
||||||
|
|
||||||
x_ofs+=int((size.width-(taken+space_w*spaces))/spaces);
|
x_ofs+=int((size.width-(taken+space_w*spaces))/spaces);
|
||||||
@ -365,7 +364,8 @@ void Label::regenerate_word_cache() {
|
|||||||
int current_word_size=0;
|
int current_word_size=0;
|
||||||
int word_pos=0;
|
int word_pos=0;
|
||||||
int line_width=0;
|
int line_width=0;
|
||||||
int last_width=0;
|
int space_count=0;
|
||||||
|
int space_width=font->get_char_size(' ').width;
|
||||||
line_count=1;
|
line_count=1;
|
||||||
total_char_cache=0;
|
total_char_cache=0;
|
||||||
|
|
||||||
@ -378,12 +378,13 @@ void Label::regenerate_word_cache() {
|
|||||||
if (uppercase)
|
if (uppercase)
|
||||||
current=String::char_uppercase(current);
|
current=String::char_uppercase(current);
|
||||||
|
|
||||||
|
bool not_latin = current>=33 && (current < 65||current >90) && (current<97||current>122) && (current<48||current>57);
|
||||||
bool insert_newline=false;
|
bool insert_newline=false;
|
||||||
|
int char_width;
|
||||||
|
|
||||||
if (current<33) {
|
if (current<33) {
|
||||||
|
|
||||||
if (current_word_size>0) {
|
if (current_word_size>0) {
|
||||||
|
|
||||||
WordCache *wc = memnew( WordCache );
|
WordCache *wc = memnew( WordCache );
|
||||||
if (word_cache) {
|
if (word_cache) {
|
||||||
last->next=wc;
|
last->next=wc;
|
||||||
@ -395,7 +396,9 @@ void Label::regenerate_word_cache() {
|
|||||||
wc->pixel_width=current_word_size;
|
wc->pixel_width=current_word_size;
|
||||||
wc->char_pos=word_pos;
|
wc->char_pos=word_pos;
|
||||||
wc->word_len=i-word_pos;
|
wc->word_len=i-word_pos;
|
||||||
|
wc->space_count = space_count;
|
||||||
current_word_size=0;
|
current_word_size=0;
|
||||||
|
space_count=0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,25 +411,48 @@ void Label::regenerate_word_cache() {
|
|||||||
|
|
||||||
if (i<text.length() && text[i] == ' ') {
|
if (i<text.length() && text[i] == ' ') {
|
||||||
total_char_cache--; // do not count spaces
|
total_char_cache--; // do not count spaces
|
||||||
|
if (line_width > 0 || last==NULL || last->char_pos!=WordCache::CHAR_WRAPLINE) {
|
||||||
|
space_count++;
|
||||||
|
line_width+=space_width;
|
||||||
|
}else {
|
||||||
|
space_count=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// latin characters
|
||||||
if (current_word_size==0) {
|
if (current_word_size==0) {
|
||||||
if (line_width>0) // add a space before the new word if a word existed before
|
|
||||||
line_width+=font->get_char_size(' ').width;
|
|
||||||
word_pos=i;
|
word_pos=i;
|
||||||
}
|
}
|
||||||
|
|
||||||
int char_width=font->get_char_size(current).width;
|
char_width=font->get_char_size(current).width;
|
||||||
current_word_size+=char_width;
|
current_word_size+=char_width;
|
||||||
line_width+=char_width;
|
line_width+=char_width;
|
||||||
total_char_cache++;
|
total_char_cache++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((autowrap && line_width>=width && last_width<width) || insert_newline) {
|
if ((autowrap && line_width>=width && (last && last->char_pos >= 0 || not_latin)) || insert_newline) {
|
||||||
|
if (not_latin) {
|
||||||
|
if (current_word_size>0) {
|
||||||
|
WordCache *wc = memnew( WordCache );
|
||||||
|
if (word_cache) {
|
||||||
|
last->next=wc;
|
||||||
|
} else {
|
||||||
|
word_cache=wc;
|
||||||
|
}
|
||||||
|
last=wc;
|
||||||
|
|
||||||
|
wc->pixel_width=current_word_size-char_width;
|
||||||
|
wc->char_pos=word_pos;
|
||||||
|
wc->word_len=i-word_pos;
|
||||||
|
wc->space_count = space_count;
|
||||||
|
current_word_size=char_width;
|
||||||
|
space_count=0;
|
||||||
|
word_pos=i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WordCache *wc = memnew( WordCache );
|
WordCache *wc = memnew( WordCache );
|
||||||
if (word_cache) {
|
if (word_cache) {
|
||||||
@ -441,12 +467,10 @@ void Label::regenerate_word_cache() {
|
|||||||
|
|
||||||
line_width=current_word_size;
|
line_width=current_word_size;
|
||||||
line_count++;
|
line_count++;
|
||||||
|
space_count=0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
last_width=line_width;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//total_char_cache -= line_count + 1; // do not count new lines (including the first one)
|
//total_char_cache -= line_count + 1; // do not count new lines (including the first one)
|
||||||
|
@ -75,8 +75,9 @@ private:
|
|||||||
int char_pos; // if -1, then newline
|
int char_pos; // if -1, then newline
|
||||||
int word_len;
|
int word_len;
|
||||||
int pixel_width;
|
int pixel_width;
|
||||||
|
int space_count;
|
||||||
WordCache *next;
|
WordCache *next;
|
||||||
WordCache() { char_pos=0; word_len=0; pixel_width=0; next=0; }
|
WordCache() { char_pos=0; word_len=0; pixel_width=0; next=0; space_count=0;}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool word_cache_dirty;
|
bool word_cache_dirty;
|
||||||
|
@ -1249,7 +1249,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!mb.doubleclick && (OS::get_singleton()->get_ticks_msec()-last_dblclk)<600) {
|
if (!mb.doubleclick && (OS::get_singleton()->get_ticks_msec()-last_dblclk)<600 && cursor.line==prev_line) {
|
||||||
//tripleclick select line
|
//tripleclick select line
|
||||||
select(cursor.line,0,cursor.line,text[cursor.line].length());
|
select(cursor.line,0,cursor.line,text[cursor.line].length());
|
||||||
last_dblclk=0;
|
last_dblclk=0;
|
||||||
|
@ -1217,7 +1217,7 @@ T Animation::_interpolate( const Vector< TKey<T> >& p_keys, float p_time, Inter
|
|||||||
if (p_ok)
|
if (p_ok)
|
||||||
*p_ok=true;
|
*p_ok=true;
|
||||||
|
|
||||||
int next;
|
int next=0;
|
||||||
float c=0;
|
float c=0;
|
||||||
// prepare for all cases of interpolation
|
// prepare for all cases of interpolation
|
||||||
|
|
||||||
|
@ -3509,6 +3509,7 @@ EditorNode::EditorNode() {
|
|||||||
p=file_menu->get_popup();
|
p=file_menu->get_popup();
|
||||||
p->add_item("New Scene",FILE_NEW_SCENE);
|
p->add_item("New Scene",FILE_NEW_SCENE);
|
||||||
p->add_item("Open Scene..",FILE_OPEN_SCENE,KEY_MASK_CMD+KEY_O);
|
p->add_item("Open Scene..",FILE_OPEN_SCENE,KEY_MASK_CMD+KEY_O);
|
||||||
|
p->add_separator();
|
||||||
p->add_item("Save Scene",FILE_SAVE_SCENE,KEY_MASK_CMD+KEY_S);
|
p->add_item("Save Scene",FILE_SAVE_SCENE,KEY_MASK_CMD+KEY_S);
|
||||||
p->add_item("Save Scene As..",FILE_SAVE_AS_SCENE,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_S);
|
p->add_item("Save Scene As..",FILE_SAVE_AS_SCENE,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_S);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
|
Loading…
Reference in New Issue
Block a user