# Generated by Django 5.2.8 on 2025-12-09 15:46

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("screens", "0002_characterscreen_pixelscreen_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="PyxelViewport",
            fields=[
                (
                    "pixelscreen_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="screens.pixelscreen",
                    ),
                ),
                (
                    "pyxel_script",
                    models.TextField(
                        help_text="Python code executed with a `pyxel` variable available. Define a `draw()` function (and optional `update()`) to populate the viewport."
                    ),
                ),
                (
                    "pyxel_fps",
                    models.PositiveSmallIntegerField(
                        default=20,
                        help_text="Frame rate passed to Pyxel when rendering this viewport.",
                    ),
                ),
            ],
            options={
                "verbose_name": "Pyxel viewport",
                "verbose_name_plural": "Pyxel viewports",
            },
            bases=("screens.pixelscreen",),
        ),
    ]
