|
PANEL* /TEXT* - target_map
#168671
11/21/07 12:23
11/21/07 12:23
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
http://www.conitec.net/beta/target_map.htmtarget_map Render target for panels and texts. If this parameter is set to a bitmap, the object renders into the bitmap instead of on the screen.Honestly, this is a really cool feature! Though, how useful is it? There are still question about it: - How does a RTT panel react with the mouse? If I use a panel on a model: will the mouse be evaulated correctly?
- This would make resolution indepent display-programming easier. Currently I run for each panel a callback which grabs specific layout information (position on a reference resolution) and calculates the scaled position and scaling for the panel. If I pass the panel to a bmap of a view entity - given that the mouse gets evaluated - the engine would do the main scaling stuff by itself. But most interfaces are build upon several panels and texts. How could I nest several panels with target_map into another so that I finally pass one composition of these to one view entity skin?
- Will this apply to TTF Texts as well?
- If the mouse is evaluated on skins and I want to develop code for a drag-and-drop operation - how would I do that if the panel is passed to an entity skin? In the current state I work with the difference vector from panel to mouse and the framewise movement vector of the mouse. How would I work on this?
I am really excited about this feature, so I apologize for my nagging questions [EDIT] Again about the nesting feature: Maybe you could add a new engine sort-of-collection datatype which holds several panels and text (added via engine commands... its basicalls a stack or a linked list) and has one target_map pointer? You can e.g. switch the collection's visibility off and all contained panels switch off, too. Or such things.. Cheers, Christian
Last edited by HeelX; 11/21/07 12:28.
|
|
|
Re: PANEL* /TEXT* - target_map
[Re: jcl]
#168673
11/21/07 15:39
11/21/07 15:39
|
Joined: Jul 2001
Posts: 6,904
HeelX
OP
Senior Expert
|
OP
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
If I would calculate the position of the cursor on the panel, you could maybe provide a sort of message function that takes the PANEL*, the cursor position on the panel and a flag covering the button state (none, click, rightclick). So when I write an on_click event for the entity/sprite/whatever, I would calculate the position on the panel (in panel coordinates!) and then execute the message function. Would this work? I guess you use as well a similar function in the engine that takes the mouse position and the button state and then you cycle through all visible panels!?
Do you think a nested panel-collection would be natively possible with target_map? If not, would you have fun to work on this?
Cheers, Christian
Last edited by HeelX; 11/21/07 15:39.
|
|
|
Re: PANEL* /TEXT* - target_map
[Re: HeelX]
#168679
03/08/08 16:08
03/08/08 16:08
|
Joined: Oct 2002
Posts: 361 Germany Cologne
hack-panther
Senior Member
|
Senior Member
Joined: Oct 2002
Posts: 361
Germany Cologne
|
Sorry, dass ich den recht alten Thread wieder aufwirble aber ich habe eine kleine Frage zu target_map und möchte kein neues Thema eröffnen: Ich habe die Version 7.07.5 und experimentiere gerade etwas mit target_map rum. Ich weiß, dass dieses feature offiziell erst ab 7.08 zur verfügung steht, aber es klappt soweit ganz gut. Nur als ich versucht habe eine TGA-Datei mit Alphachannel auf einem Sprite zu rendern, sind die schwarzen Kanten des Alphachannels nicht unsichtbar. Funktioniert es erst bei Version 7.08 oder funktioniert es generell nicht? Hoffe auf Antwort... Danke
|
|
|
|