MXVK Vulkan Framework 0.35.0
C++20 Vulkan rendering framework for practical 2D and 3D application development with SDL3.
Loading...
Searching...
No Matches
mxvk_wrap.input.Joystick Class Reference

Public Member Functions

None __init__ (self, int index=0)
 An opened SDL joystick.
int axis (self, int index)
bool button (self, int index)
None close (self)
int count (cls)

Public Attributes

 native = mxvk.Joystick()
 Open joystick index.

Detailed Description

Definition at line 7 of file input.py.

Constructor & Destructor Documentation

◆ __init__()

None mxvk_wrap.input.Joystick.__init__ ( self,
int index = 0 )

An opened SDL joystick.

Definition at line 10 of file input.py.

10 def __init__(self, index: int = 0) -> None:
11 ## @brief Open joystick @p index.
12 self.native = mxvk.Joystick()
13 self.native.open(index)
14
RAII wrapper for a raw SDL_Joystick device.

Member Function Documentation

◆ axis()

int mxvk_wrap.input.Joystick.axis ( self,
int index )

Definition at line 24 of file input.py.

24 def axis(self, index: int) -> int:
25 ## @brief Return the signed raw value for axis @p index.
26 return self.native.axis(index)
27

◆ button()

bool mxvk_wrap.input.Joystick.button ( self,
int index )

Definition at line 20 of file input.py.

20 def button(self, index: int) -> bool:
21 ## @brief Return whether button @p index is pressed.
22 return self.native.button(index)
23

◆ close()

None mxvk_wrap.input.Joystick.close ( self)

Definition at line 28 of file input.py.

28 def close(self) -> None:
29 ## @brief Close the joystick handle.
30 if self.native is not None:
31 self.native.close()
32 self.native = None
33
34

◆ count()

int mxvk_wrap.input.Joystick.count ( cls)

Definition at line 16 of file input.py.

16 def count(cls) -> int:
17 ## @brief Return the number of connected joysticks.
18 return mxvk.Joystick.count()
19

Member Data Documentation

◆ native

mxvk_wrap.input.Joystick.native = mxvk.Joystick()

Open joystick index.

Definition at line 12 of file input.py.


The documentation for this class was generated from the following file: