Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 900 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
PANEL* /TEXT* - target_map #168671
11/21/07 12:23
11/21/07 12:23
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
http://www.conitec.net/beta/target_map.htm

target_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: HeelX] #168672
11/21/07 15:11
11/21/07 15:11
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I'm afraid I have to dampen the enthusiasm: The panel does not know where in the level its render target is displayed (if at all), and thus can't react on the mouse. For reacting on the mouse within in the level you have to use an entity on_click event with the sprite or model the panel is rendered to.

The feature is intended mainly for displays or texts on level surfaces. TTF fonts should work.

Re: PANEL* /TEXT* - target_map [Re: jcl] #168673
11/21/07 15:39
11/21/07 15:39
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

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] #168674
11/21/07 22:22
11/21/07 22:22
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
to your first question: it's indeed possible, best solution for that is a transformation matrix which calculates view space into "panel space". i've done this once (without a matrix, though) for passing events to a rendered window control.

Re: PANEL* /TEXT* - target_map [Re: Joey] #168675
11/21/07 22:58
11/21/07 22:58
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I will ask you when I'm dealing with that, thanks for that info.

Re: PANEL* /TEXT* - target_map [Re: HeelX] #168676
11/22/07 09:54
11/22/07 09:54
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
For calculating the 2D click position within the panel you'll need the 3D position of the mouse hit point. The mouse event does not give you the hit point, but you could use c_trace instead.

Re: PANEL* /TEXT* - target_map [Re: jcl] #168677
11/22/07 19:06
11/22/07 19:06
Joined: Apr 2006
Posts: 28
LB, CA, USA
WINBERRY Offline
Newbie
WINBERRY  Offline
Newbie

Joined: Apr 2006
Posts: 28
LB, CA, USA
by any chance is there a way to place a VIDEO , *.AVI onto a panel? I'm trying to make a video screen that appears to be talking to the PLAYER through the control panel (cockpit)

thanks

Re: PANEL* /TEXT* - target_map [Re: WINBERRY] #168678
11/22/07 20:09
11/22/07 20:09
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
This is already possible by setting the panel's bmap pointer in the media_play instruction.

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 Offline
Senior Member
hack-panther  Offline
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

Re: PANEL* /TEXT* - target_map [Re: hack-panther] #168680
03/09/08 08:49
03/09/08 08:49
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
I think this is intended. Nevertheless -

@JCL: how could one overcome this?

Page 1 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1