PixelFrame¶
from acron.hud import PixelFrame
- class PixelFrame(base, *, authored_height: float = 1080.0, scale: float = 1.0, name: str = 'hud')¶
Bases:
objectAn authored pixel space on
aspect2d, anchored to a window corner.Layout is in pixels of the authored design, y growing DOWN — the coordinate system HUDs are drawn in — and the frame converts. The origin is the anchor corner, so a panel pinned to the bottom-right keeps its margin when the window resizes rather than sliding away from it.
authored_heightis the design’s reference height: a HUD drawn for a 1080-tall screen passes 1080 and its numbers are that design’s numbers.scaleis the game’s HUD-size setting, applied on top.Inheritance diagram
digraph inheritance53d47158dc { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "PixelFrame" [URL="acron.hud.PixelFrame.html#acron.hud.PixelFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="An authored pixel space on ``aspect2d``, anchored to a window corner."]; }- CORNERS = {'bc': 'a2dBottomCenter', 'bl': 'a2dBottomLeft', 'br': 'a2dBottomRight', 'c': 'aspect2d', 'lc': 'a2dLeftCenter', 'rc': 'a2dRightCenter', 'tc': 'a2dTopCenter', 'tl': 'a2dTopLeft', 'tr': 'a2dTopRight'}¶
ShowBase’s corner nodes, by the two-letter names used here.