It could be useful to have a parameter in GetAttribute() or a command that returns all defined Displays, this could be handy for external libraries and applets.
Example:
I make a library that open a display an do stuff, when finished in must close and free the resources, including closing & freeing its display.
What display should I restore before I free the library own display? So it could be really useful to have a complete dump of the defined displays, at least with the id, open/close state and active/inactive state.
All defined displays...
All defined displays...
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: All defined displays...
Something like this might come in a future version because Hollywood 5.0 already keeps this information in handy places for the GetObjectData() and SetObjectData() functions. It should be quite an easy task to create a new function which returns all objects of a certain type (e.g. #BRUSH, #MUSIC, #DISPLAY) that are currently in memory... I'll take a note and check this again when I've time for it.
Re: All defined displays...
Great, thank you
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: All defined displays...
Code: Select all
- New: GetObjects() allows you to query Hollywood's object manager for all objects of the type specified
in argument 1 (e.g. #BRUSH); it will then return a table containing the identifiers of all loaded objects
of that type and the object count in the second return value (requested by Fabio Falcucci)
Re: All defined displays...
great!
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆