CnCNet / WorldAlteringEditor

Map editor for C&C: Red Alert 2, C&C: Tiberian Sun and Dawn of the Tiberium Age.
Other
76 stars 25 forks source link

Transform AI Trigger Object Type field into a popup picker #197

Closed Shushishtok closed 1 month ago

Shushishtok commented 1 month ago

Currently, if a user wants to make an AI Trigger that has a condition which relies on an object (e.g. "enemy has more or equal to 3 AGTs"), the user must write the ININame of the object manually in a text box, which is inconvenient, non-human readable and error prone.

This PR aims to transform the text box into a popup picker, which is already used in many other places such as Triggers and Team Types. This allows the user to utilize the powerful popup picker's capabilities, such as listing all units and structures, picking them from a list, and searching them from a list.

Since most of the logic for this selection window already existed, only minor changes were needed to apply it. Includes handling of loading and saving properly into files.

Example screenshot: image