Forráskód Böngészése

Custom ROS2 category added to components (#225)

Signed-off-by: Paweł Lech <[email protected]>
Paweł Lech 2 éve
szülő
commit
ac88a4d21a

+ 1 - 0
Gems/ROS2/Code/Source/Camera/ROS2CameraSensorComponent.cpp

@@ -62,6 +62,7 @@ namespace ROS2
             {
                 ec->Class<ROS2CameraSensorComponent>("ROS2 Camera Sensor", "[Camera component]")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
                     ->DataElement(
                         AZ::Edit::UIHandlers::Default, &ROS2CameraSensorComponent::m_cameraName, "Camera Name", "This is the camera name.")

+ 1 - 0
Gems/ROS2/Code/Source/Frame/ROS2FrameComponent.cpp

@@ -155,6 +155,7 @@ namespace ROS2
             {
                 ec->Class<ROS2FrameComponent>("ROS2 Frame", "[ROS2 Frame component]")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
                     ->DataElement(
                         AZ::Edit::UIHandlers::Default,

+ 1 - 0
Gems/ROS2/Code/Source/GNSS/ROS2GNSSSensorComponent.cpp

@@ -39,6 +39,7 @@ namespace ROS2
             {
                 ec->Class<ROS2GNSSSensorComponent>("ROS2 GNSS Sensor", "GNSS sensor component")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
                     ->DataElement(
                         AZ::Edit::UIHandlers::Default,

+ 1 - 0
Gems/ROS2/Code/Source/Imu/ROS2ImuSensorComponent.cpp

@@ -35,6 +35,7 @@ namespace ROS2
             {
                 ec->Class<ROS2ImuSensorComponent>("ROS2 Imu Sensor", "Imu sensor component")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"));
             }
         }

+ 1 - 0
Gems/ROS2/Code/Source/Lidar/ROS2LidarSensorComponent.cpp

@@ -41,6 +41,7 @@ namespace ROS2
             {
                 ec->Class<ROS2LidarSensorComponent>("ROS2 Lidar Sensor", "Lidar sensor component")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game"))
                     ->DataElement(AZ::Edit::UIHandlers::ComboBox, &ROS2LidarSensorComponent::m_lidarModel, "Lidar Model", "Lidar model")
                     ->Attribute(AZ::Edit::Attributes::ChangeNotify, &ROS2LidarSensorComponent::OnLidarModelSelected)

+ 1 - 0
Gems/ROS2/Code/Source/ROS2SystemComponent.cpp

@@ -32,6 +32,7 @@ namespace ROS2
                 ec->Class<ROS2SystemComponent>("ROS2 System Component", "[Description of functionality provided by this System Component]")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AutoExpand, true);
             }
         }

+ 1 - 0
Gems/ROS2/Code/Source/RobotControl/ROS2RobotControlComponent.cpp

@@ -59,6 +59,7 @@ namespace ROS2
             {
                 ec->Class<ROS2RobotControlComponent>("ROS2 Robot control", "[Customizable robot control component]")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game")) // TODO - "Simulation"?
                     ->DataElement(
                         AZ::Edit::UIHandlers::Default,

+ 1 - 0
Gems/ROS2/Code/Source/RobotImporter/ROS2RobotImporterSystemComponent.cpp

@@ -25,6 +25,7 @@ namespace ROS2
                       "Robot Importer", "Use this component to import robot definition from supported formats")
                     ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
                     ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->Attribute(AZ::Edit::Attributes::AutoExpand, true);
             }
         }

+ 1 - 0
Gems/ROS2/Code/Source/Sensor/ROS2SensorComponent.cpp

@@ -39,6 +39,7 @@ namespace ROS2
             if (AZ::EditContext* ec = serialize->GetEditContext())
             {
                 ec->Class<ROS2SensorComponent>("ROS2 Sensor", "Base component for sensors")
+                    ->Attribute(AZ::Edit::Attributes::Category, "ROS2")
                     ->DataElement(
                         AZ::Edit::UIHandlers::Default,
                         &ROS2SensorComponent::m_sensorConfiguration,