Most of the files are unchanged after creating the gem from the template. The only two files modified that are important to review are ShapeExampleWidget.cpp/h.
This simple tool finds all the registered components that provide the ShapeService, and then create buttons corresponding to all the shape components. When the user clicks one of the buttons, an entity is created and then the corresponding shape component is added to that entity. There is also a text input field for (optionally) setting a custom name when creating the entity, and a checkbox for appending a suffix of the name of the shape.
This is meant to introduce the user to some basic Qt concepts (e.g. buttons, text input, layouts), as well as how to listen to events using signals/slots (e.g. handling a button being clicked). This example also highlights some basic APIs for interacting with the Editor (e.g. creating an entity, adding a component).
Added the Day 1 example of a custom tool written in C++. This example gem was built from the
CustomTool
template, with the following command:Most of the files are unchanged after creating the gem from the template. The only two files modified that are important to review are
ShapeExampleWidget.cpp/h
.This simple tool finds all the registered components that provide the
ShapeService
, and then create buttons corresponding to all the shape components. When the user clicks one of the buttons, an entity is created and then the corresponding shape component is added to that entity. There is also a text input field for (optionally) setting a custom name when creating the entity, and a checkbox for appending a suffix of the name of the shape.This is meant to introduce the user to some basic Qt concepts (e.g. buttons, text input, layouts), as well as how to listen to events using signals/slots (e.g. handling a button being clicked). This example also highlights some basic APIs for interacting with the Editor (e.g. creating an entity, adding a component).
Signed-off-by: Chris Galvan chgalvan@amazon.com