def test_set_text_input_rect(self): # TODO: this test is a bit pointless coords = [(0, 0, 0, 0), (-10, -70, 3, 6), (10, 10, 10, 10)] for x, y, w, h in coords: r = rect.SDL_Rect(x, y, w, h) keyboard.set_text_input_rect(r) keyboard.set_text_input_rect(rect.SDL_Rect())
def activate(self, component): """Activates a control to receive input.""" if self._activecomponent and self._activecomponent != component: self.deactivate(self._activecomponent) if component.uitype & TEXTENTRY: area = SDL_Rect(component.x, component.y, component.size[0], component.size[1]) keyboard.set_text_input_rect(area) keyboard.start_text_input() self._activecomponent = component