New and improved user interface controls:
New TCastleCheckbox shows a standard checkbox with a caption. It supports the standard properties and events, like
OnChangeand so on.
I also recommend TCastleCheckbox implementation as a demo of implementing a component by composing some other internal components. In this case,
TCastleCheckboxis realized as 2x
TCastleLabelinstances. This is much easier and more powerful than drawing everything in the component
A new UI control TCastleDesign allows to reference a
xxx.castle-user-interfacefile. This is especially useful inside the editor, to visually see one
xxx.castle-user-interfacefile embedded inside another
TCastleLabel is now by default black. This makes it consistent with other UI controls (that generally assume “dark text over light background”), and avoids a confusion when default
TCastleLabelisn’t visible over default
TCastleRectangleColor(as they were both pure white, in previous engine version).
On a related note, TCastleSceneManager no longer has pure black background, it has very dark gray (0.1, 0.1, 0.1, 1) background. This way pure black things are clearly visible over it. See Upgrading to Castle Game Engine 6.6 for detailed reasoning.
TCastleScrollView received a number of fixes.
You can now activate TCastleImageControl.DetectScaleFromUrl. This affects how the auto-scaling works, and detects special filenames like
[email protected]. If you load an image file called
[email protected]with size 20×20, and set
true, then the automatically calculated control size will be 10×10 (2x smaller than the actual image size).
This is a very useful trick to provide “upscaled” images that work with any UI scaling.
TCastleButton.CustomColorXxx allows to configure button look by a solid color.
The TCastleEdit has a number of new features: