sdl/events: add GetText() method back for TextEditingEvent and TextInputEvent
@@ -435,6 +435,11 @@ func (e TextEditingEvent) GetTimestamp() uint32 {
return e.Timestamp
}
+// GetText returns the text as string
+func (e TextEditingEvent) GetText() string {
+ return e.Text
+}
+
// TextInputEvent contains keyboard text input event information.
// (https://wiki.libsdl.org/SDL_TextInputEvent)
type TextInputEvent struct {
@@ -455,6 +460,11 @@ func (e TextInputEvent) GetTimestamp() uint32 {
return e.Timestamp
}
+// GetText returns the text as string
+func (e TextInputEvent) GetText() string {
+ return e.Text
+}
+
// MouseMotionEvent contains mouse motion event information.
// (https://wiki.libsdl.org/SDL_MouseMotionEvent)
type MouseMotionEvent struct {
