mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-15 08:53:43 +08:00
aaac7a6733
Present saved configuration and live driving state through native Small and Big UI layouts. Support per-field tune resets, movable widgets, camera availability, and a unified speed card while preserving decision-bound actions.
12 lines
550 B
Python
12 lines
550 B
Python
"""Native geometry adjustments for the protected Home presentation."""
|
|
|
|
import pyray as rl
|
|
|
|
|
|
def outside_rounded_border(rect, roundness, segments, thickness, color):
|
|
# Raylib 6 offsets outline vertices by half a pixel. Keep the intended corner
|
|
# radius while compensating for that offset at both edges.
|
|
shortest = min(rect.width, rect.height)
|
|
expanded = rl.Rectangle(rect.x - 0.5, rect.y - 0.5, rect.width + 1, rect.height + 1)
|
|
rl.draw_rectangle_rounded_lines_ex(expanded, roundness * shortest / (shortest + 1), segments, thickness, color)
|