[added in 1.6] Suggestion : render to control

You can help us to improve Brume ! Post your contribs here and we will try to integrate them in next release for other users !

Moderator: Brume Dev Team

[added in 1.6] Suggestion : render to control

Postby MoDDiB on Sat Mar 24, 2007 6:41 pm

To make my map editor I had to get a normal winforms with menus and so on and a panel in which I used Brume.
But I wasn't able to do it without changing Brume sources : adding a new "ControlToRender" property I used atthis line
Code: Select all
device = new Direct3D.Device(0, Direct3D.DeviceType.Hardware, brume.ControlToRender.Handle, createFlags, pres);

in the DirectX9GraphicApi.cs.
I set it to brume object in the constructor to avoid problem for normal use and for my map editor I just have to add this
Code: Select all
game.ControlToRender = game.panelBrume;

Before
Code: Select all
                game.Play();


It ll be interesting I think if in the next release we would be able to do this without changing the brume DLL :)

One more time : thank you for all the work
MoDDiB
Brume user
 
Posts: 83
Joined: Mon Nov 20, 2006 5:05 pm

Postby rubbish on Sun Mar 25, 2007 5:44 am

Map editor??So cool~ :o
rubbish
Brume user
 
Posts: 183
Joined: Fri Nov 03, 2006 5:05 am

Postby Silmaryls on Mon Mar 26, 2007 7:22 pm

Hi MoDDiB !

This is a nice contribution. I will add it for next release.
(Moving the topic to contrib forum).

Thank you !
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France

Postby MoDDiB on Tue Mar 27, 2007 8:21 am

Sry for the wrong forum :)

You must be careful implementing it because there's a lot of time brume.width or Height like in the GetRayFromMouse() method.
Just replace with "brume.ControlToRender.Width".

Thank you too :)
MoDDiB
Brume user
 
Posts: 83
Joined: Mon Nov 20, 2006 5:05 pm

Postby Silmaryls on Tue Mar 27, 2007 4:53 pm

Ok I will be careful with that one. Thanks
User avatar
Silmaryls
Brume Team Member
 
Posts: 340
Joined: Tue Feb 21, 2006 10:09 pm
Location: Paris - France


Return to Contribs

Who is online

Users browsing this forum: No registered users and 1 guest

cron