|
@@ -1025,49 +1025,49 @@ void QueryString::DrawEditBox(Window *w,
|
|
|
wi->top + 1,
|
|
|
wi->right - wi->left - 4,
|
|
|
wi->bottom - wi->top - 1)) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
DrawPixelInfo *old_dpi = _cur_dpi;
|
|
|
_cur_dpi = &dpi;
|
|
|
|
|
|
/* We will take the current widget length as maximum width, with a small
|
|
|
* space reserved at the end for the caret to show */
|
|
|
const Textbuf *tb = &this->text;
|
|
|
|
|
|
delta = (wi->right - wi->left) - tb->width - 10;
|
|
|
if (delta > 0) delta = 0;
|
|
|
|
|
|
if (tb->caretxoffs + delta < 0) delta = -tb->caretxoffs;
|
|
|
|
|
|
DoDrawString(tb->buf, delta, 0, TC_YELLOW);
|
|
|
if (tb->caret) DoDrawString("_", tb->caretxoffs + delta, 0, TC_WHITE);
|
|
|
|
|
|
_cur_dpi = old_dpi;
|
|
|
}
|
|
|
|
|
|
int QueryStringBaseWindow::HandleEditBoxKey(int wid, uint16 key, uint16 keycode, EventState &state)
|
|
|
HandleEditBoxResult QueryStringBaseWindow::HandleEditBoxKey(int wid, uint16 key, uint16 keycode, EventState &state)
|
|
|
{
|
|
|
return this->QueryString::HandleEditBoxKey(this, wid, key, keycode, state);
|
|
|
}
|
|
|
|
|
|
void QueryStringBaseWindow::HandleEditBox(int wid)
|
|
|
{
|
|
|
this->QueryString::HandleEditBox(this, wid);
|
|
|
}
|
|
|
|
|
|
void QueryStringBaseWindow::DrawEditBox(int wid)
|
|
|
{
|
|
|
this->QueryString::DrawEditBox(this, wid);
|
|
|
}
|
|
|
|
|
|
void QueryStringBaseWindow::OnOpenOSKWindow(int wid)
|
|
|
{
|
|
|
ShowOnScreenKeyboard(this, wid, 0, 0);
|
|
|
}
|
|
|
|
|
|
enum QueryStringWidgets {
|
|
|
QUERY_STR_WIDGET_TEXT = 3,
|
|
|
QUERY_STR_WIDGET_DEFAULT,
|
|
|
QUERY_STR_WIDGET_CANCEL,
|
|
|
QUERY_STR_WIDGET_OK
|