game prototype (3)

this->treeView2->Nodes->Add(( System::Windows::Forms::TreeNode^ ) treeView1->SelectedNode->Clone());

One line of code will add a copy of a building to the treelist on the right side, including all child nodes!

I somehow derived the idea not to write code for this functionality, but establish correlations using the Visual Studio Designer. It worked! In the end, buildings will be shown on the map, using the data from the treelist.

Here you see “clones” in the treelist on the right side.
They also contain all the individual properties (which are child nodes).

I want to try to program a map of 50×50 screens. Each screen also contains 50×50 squares. Millions of individual squares! But not all are populated of course.

Leave a Reply

Your email address will not be published. Required fields are marked *

*