X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fflexui%2Ffui_events.pas;h=919227aeb87f30f27a49c680b96f363286b61b20;hb=7817748b82c4e9ef6b16e1b6670d342db07a7e83;hp=a5fa38606137b0f938bf9fd09cdc9991faa28683;hpb=8b3c740d2889bd89082916097344a5c7ac7bc46d;p=d2df-sdl.git diff --git a/src/flexui/fui_events.pas b/src/flexui/fui_events.pas index a5fa386..919227a 100644 --- a/src/flexui/fui_events.pas +++ b/src/flexui/fui_events.pas @@ -86,7 +86,7 @@ type public kind: TKind; - scan: Word; // SDL_SCANCODE_XXX + scan: Word; // SDL_SCANCODE_XXX or 0 for character event //sym: LongWord; // SDLK_XXX ch: AnsiChar; // converted to 1251; can be #0 x, y: Integer; // current mouse position @@ -194,7 +194,7 @@ function THMouseEvent.motion (): Boolean; inline; begin result := (kind = TKind. procedure THMouseEvent.eat (); inline; begin mEaten := true; end; procedure THMouseEvent.cancel (); inline; begin mCancelled := true; end; -procedure THKeyEvent.intrInit (); inline; begin mEaten := false; mCancelled := false; end; +procedure THKeyEvent.intrInit (); inline; begin mEaten := false; mCancelled := false; ch := #0; scan := 0; end; function THKeyEvent.press (): Boolean; inline; begin result := (kind = TKind.Press); end; function THKeyEvent.release (): Boolean; inline; begin result := (kind = TKind.Release); end; procedure THKeyEvent.eat (); inline; begin mEaten := true; end;