Project Progress

In our project we are going to use properties to select objects and highlight them by changing their material. Here's when we are going to utilize our mouse input handler, getObjectUnderMouseCursor and selectObject methods from previous sections.

First, we are going to inherit a property from the standard surface_base and add 2 parameters:

selected - to indicate if the object is currently selected and we must highlight it.

material - to store the name of material assigned to the surface of the object in order to reset it when selection changes.

So, please use the following code and save it as "my_property.prop" in the data folder of your application.