sdl3/examples/container_label_debug.php
2025-11-14 16:37:59 +01:00

28 lines
691 B
PHP

<?php
declare(strict_types=1);
require_once __DIR__ . '/../vendor/autoload.php';
use PHPNative\Framework\Application;
use PHPNative\Ui\Widget\Container;
use PHPNative\Ui\Widget\Label;
use PHPNative\Ui\Window;
$app = new Application();
$window = new Window('Container Label Debug', 600, 400);
// Root with neutral background
$root = new Container('flex items-center justify-center bg-gray-100');
// Simple box with border and a single label
$box = new Container('bg-white border border-black rounded-lg p-4');
$box->addComponent(new Label('DEBUG: Label im Container', 'text-lg text-black'));
$root->addComponent($box);
$window->setRoot($root);
$app->addWindow($window);
$app->run();