UIElement
Methods
click
public
Click UIElement.
Usage
ok_button = ui.find(By.path('Object path'))
gamium.wait(Until.element_interactable(ok_button))
ok_button.click()
Arguments
- options
ActionClickOptions
Return
drag
public
Drag the UIElement.
Usage
handle = await ui.find(By.path('Object path'))
gamium.wait(Until.element_interactable(handle))
handle.drag(Vector2(handle.info.screen_position.x - 30, handle.info.screen_position.y), ActionDragOptions(1000, 100))
Arguments
options
ActionDragOptions
Return
get_text
public
Import text if it is a UIElement that has text.
Usage
quest_object = await ui.find(By.path('Object path'))
progress = quest_object.get_text()
Return
is_interactable
public
Verify that UIElement is interactive. To return to true, you must pass a number of conditions. Option allows you to override some conditions.
Usage
ok_button = await ui.find(By.path('Object path'))
is_interactable = await ok_button.is_interactable()
Arguments
- options
QueryObjectInteractableOptions
Return
refresh
public
Updates the information that the object has.
Usage
ok_button = await ui.find(By.path('Object path'))
ok_button.refresh()
scroll
public
Scroll by delta from UIElement.
Usage
dragger = ui.find(By.path('Object path'))
gamium.wait(Until.element_interactable(dragger))
dragger.scroll(Vector2(0, -0.5), ActionScrollOptions(2000))
Arguments
delta
Vector2
options
ActionScrollOptions
set_text
public
Enter text in UIElement.
Usage
text1 = ui.find(By.path('Object path'))
text1.set_text('Hello World').perform()
Arguments
text
str
options
SetTextOptions
try_is_interactable
public
Arguments
- options
QueryObjectInteractableOptions
Return
TryResult
[bool
]
try_wait_interactable
public
Arguments
- options
QueryObjectInteractableOptions
Return
TryResult
[None
]
wait_interactable
public
Wait for UIElement to interact..
Usage
okButton = ui.find(By.path('Object path'))
okButton.wait_interactable()
Arguments
- options
QueryObjectInteractableOptions