Skip to content

Commit

Permalink
gui.wxpython.nviz.wxnviz: Extra typing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Dec 28, 2024
1 parent edbfd6f commit 119a673
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions gui/wxpython/nviz/wxnviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,17 @@ def SetBgColor(self, color_str: str) -> None:
"""
Nviz_set_bgcolor(self.data, Nviz_color_from_str(color_str))

def SetLight(self, x, y, z, color, bright, ambient, w=0, lid=1) -> None:
def SetLight(
self,
x: float,
y: float,
z: float,
color,
bright: float,
ambient: float,
w: float = 0,
lid: int = 1,
) -> None:
"""Change lighting settings
:param x,y,z: position
Expand Down Expand Up @@ -2754,7 +2764,7 @@ def Draw(self) -> None:
self.coords[0], self.coords[1], self.width, self.height, self.textureId
)

def HitTest(self, x: int, y: int, radius) -> bool:
def HitTest(self, x: int, y: int, radius: int) -> bool:
copy = Rect(self.coords[0], self.coords[1], self.orig_width, self.orig_height)
copy.Inflate(radius, radius)
return copy.ContainsXY(x, y)
Expand Down

0 comments on commit 119a673

Please sign in to comment.