text cursor in text editor & const in Rect2i

This commit is contained in:
jonyrock
2014-04-17 15:30:40 +04:00
parent ec4ef2d2e7
commit a49527540f
3 changed files with 14 additions and 5 deletions

View File

@ -47,7 +47,6 @@
#define TAB_PIXELS
static bool _is_text_char(CharType c) {
return (c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9') || c=='_';
@ -2038,6 +2037,14 @@ void TextEdit::insert_text_at_cursor(const String& p_text) {
}
Control::CursorShape TextEdit::get_cursor_shape(const Point2& p_pos) const {
if(completion_active && completion_rect.has_point(p_pos)) {
return CURSOR_ARROW;
}
return CURSOR_IBEAM;
}
void TextEdit::set_text(String p_text){
setting_text=true;