This weekend, we're proud to announce a lot of improvements to the Castle Game Engine ( http://castle-engine.sourceforge.net/engine.php
) --- around user interface
... and more! I want our engine to be the best game engine for cross-platform game development (for mobile and
standalone games), and it's really becoming a reality!:)
Here are the news (part one of three! More to come tommorrow and the day after tomorrow):
1. User interface improvements
- Hierarchy of 2D controls
. Each TUIControl has children (see Controls and ControlsCount properties, use methods like InsertFront / InsertBack to operate on them).
- Automatic anchors
. Use HasHorizontalAnchor, HorizontalAnchor, HorizontalAnchorDelta properties, and analogous for vertical, to declare an anchor. The Anchor() method is an easy shortcut to set anchors by code.
- Automatic scaling of all UI controls
. Activated using Container.UIScaling, may use reference sizes or explicit scaling factor.
- See examples/2d/controls_demo.lpr in the engine source code for a demo of some of these changes.
- New TCastleInspectorControl to inspect the hierarchy of UI under mouse. Useful to debug UI positions and sizes. In the future, it may become the basis of our UI editor.
- Sliders (integer, float) in CastleControls.
- TCastleImageControl allows Color tint.
- Large compatibility-breaking refactor of TCastleOnScreenMenu. It no longer manages the "accessory" list, or even string list, it completely depends now on TUIControl hierarchy to add items inside, and add accessiories to items.
TUIControl now has a Left/Bottom/Rect properties. This avoids useless complications.
2. Fonts improvements
- TCustomizedFont, to use underlying font but with different properties.
- TCastleFont is now a TComponent, to you can e.g. observe when it's freed by FreeNotification.
- OutlineHighQuality, to let you choose between max quality and max speed.
- Fix glyph size and position when extremely scaled.#android #gamedev