コード例 #1
0
        protected override void WidgetUnclicked(LauncherWidget widget)
        {
            LauncherInputWidget input = widget as LauncherInputWidget;

            if (input == null)
            {
                return;
            }
            using ( drawer ) {
                drawer.SetBitmap(game.Framebuffer);
                input.Active = false;
                input.Redraw(drawer, lastInput.Text, inputFont, inputHintFont);
            }
            lastInput = null;
            Dirty     = true;
        }
コード例 #2
0
        protected virtual void InputClick(int mouseX, int mouseY)
        {
            LauncherInputWidget input = (LauncherInputWidget)selectedWidget;

            using ( drawer ) {
                drawer.SetBitmap(game.Framebuffer);
                if (lastInput != null)
                {
                    lastInput.Active = false;
                    lastInput.Redraw(drawer, lastInput.Text, inputFont, inputHintFont);
                }

                input.Active   = true;
                widgetOpenTime = DateTime.UtcNow;
                lastCaretFlash = false;
                input.SetCaretToCursor(mouseX, mouseY, drawer, inputFont);
                input.Redraw(drawer, input.Text, inputFont, inputHintFont);
            }
            lastInput = input;
            Dirty     = true;
        }