Merge branch 'master' of https://github.com/okamstudio/godot
This commit is contained in:
@@ -732,6 +732,11 @@ int _OS::find_scancode_from_string(const String& p_code) const {
|
||||
return find_keycode(p_code);
|
||||
}
|
||||
|
||||
void _OS::alert(const String& p_alert,const String& p_title) {
|
||||
|
||||
OS::get_singleton()->alert(p_alert,p_title);
|
||||
}
|
||||
|
||||
_OS *_OS::singleton=NULL;
|
||||
|
||||
void _OS::_bind_methods() {
|
||||
@@ -859,6 +864,7 @@ void _OS::_bind_methods() {
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("set_use_file_access_save_and_swap","enabled"),&_OS::set_use_file_access_save_and_swap);
|
||||
|
||||
ObjectTypeDB::bind_method(_MD("alert","text","title"),&_OS::alert,DEFVAL("Alert!"));
|
||||
|
||||
|
||||
BIND_CONSTANT( DAY_SUNDAY );
|
||||
|
||||
@@ -256,6 +256,9 @@ public:
|
||||
|
||||
String get_data_dir() const;
|
||||
|
||||
void alert(const String& p_alert,const String& p_title="ALERT!");
|
||||
|
||||
|
||||
void set_screen_orientation(ScreenOrientation p_orientation);
|
||||
ScreenOrientation get_screen_orientation() const;
|
||||
|
||||
|
||||
+4
-4
@@ -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]==';') {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user