Book Image

CryEngine Game Development Blueprints

Book Image

CryEngine Game Development Blueprints

Overview of this book

Table of Contents (22 chapters)
CRYENGINE Game Development Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating UI elements


So, we created all the UI content needed for our game in Flash, exported it, and converted it to an optimized format for consumption by CRYENGINE. What's next? Well, we need to define UI elements. UI elements are CRYENGINE's representation of a Flash UI scene. CRYENGINE cannot directly consume Flash UI content and therefore needs an XML file that defines the entire UI as UI elements. So, in this section, we will be doing just that.

Let's get started:

  1. Create a UI element definition file in the CRYENGINE_CONTENT/Libs/UI/UIElements folder named GAS_UI.xml and open it.

  2. Define a UI element for each menu (the main menu and the end game menu):

    <!--Define A Group Of UI Elements Named Menus. This Allows Us To Specify Multiple UI Elements In One File And Group Them Together For Organization.-->
    <UIElements name="Menus">
    
      <!--Define A UI Element That Will Represent Our Main Menu Named "Main_Menu". This Will Be The Name That We Use To Retrieve The Main Menu In C++....