pax-std 0.39.0

Standard library for Pax, including layouts, drawing primitives, and form controls
Documentation
<Group width=100% height=100%>
    if self._show_dots {
        <Group class="carousel_dots"
            x={self._dots_pos_x}
            y={self._dots_pos_y}
            anchor_x=50%
            anchor_y=50%
            width={(self._dots_pill_width)px}
            height={(self._dots_pill_height)px}
            _raycastable=false
        >
            for dot in self._dots {
                if dot.is_active {
                    <Ellipse class="carousel_dot_active"
                        x={50% + (dot.x_px)px}
                        y={50% + (dot.y_px)px}
                        width=10px
                        height=10px
                        anchor_x=50%
                        anchor_y=50%
                    />
                }
                if !dot.is_active {
                    <Ellipse class="carousel_dot"
                        x={50% + (dot.x_px)px}
                        y={50% + (dot.y_px)px}
                        width=10px
                        height=10px
                        anchor_x=50%
                        anchor_y=50%
                    />
                }
            }
            <Rectangle class="carousel_dots_pill"
                x=50%
                y=50%
                width=100%
                height=100%
                anchor_x=50%
                anchor_y=50%
            />
        </Group>
    }

    <Scroller
        width=100%
        height=100%
        scroll_width={self._scroll_width}
        scroll_height={self._scroll_height}
        scroll_pos_x=bind:scroll_pos_x
        scroll_pos_y=bind:scroll_pos_y
        snap_positions_x={self._snap_positions_x}
        snap_positions_y={self._snap_positions_y}
    >
        for (page, i) in self._pages {
            <Group
                x={(page.x_px)px}
                y={(page.y_px)px}
                width={(self._page_width_px)px}
                height={(self._page_height_px)px}
            >
                slot(i)
            </Group>
        }
    </Scroller>
</Group>

@settings {
    @mount: on_mount
    @key_down: key_down

    .carousel_dots {
        opacity: 0.95,
    }

    .carousel_dots_pill {
        fill: rgba(30, 30, 30, 180),
        corner_radius: 13.0,
    }

    .carousel_dot {
        fill: rgba(255, 255, 255, 110),
    }

    .carousel_dot_active {
        fill: rgba(255, 255, 255, 240),
    }
}