About Store Forum Documentation Contact
Donations:
140$/mo



Post Reply 
Custom control
Author Message
Impz0r Offline
Member

Post: #1
Custom control
Hey there,

I'm right now coding a custom control and was wondering how I'm be able to check if the left/right mouse button has been pressed and if the mouse is over the control.

Furthermore I wanted to know if there is way to renderer a specific control into a texture to use it afterwards as a skin to another control. (I was thinking of building my very own text formater and therefore I wanted to build the text once and render it to a texture and use this texture afterwards to increase rendering time a bit.)

PS: I've got a question more while I was adding buttons to the custom control as children, they are went to un-click'able. They do not respond to any mouse input. What do I have to do to get them aware of mouse input once again?

Thanks in advance.

Imp
(This post was last modified: 08-10-2010 05:07 AM by Impz0r.)
08-09-2010 05:59 PM
Find all posts by this user Quote this message in a reply
Impz0r Offline
Member

Post: #2
RE: Custom control
Well since no one knows I had to find it out the hard way. Atleast the issue of non click'able buttons.

Quote:PS: I've got a question more while I was adding buttons to the custom control as children, they are went to un-click'able. They do not respond to any mouse input. What do I have to do to get them aware of mouse input once again?
This is fixed while overwriting the "test()" method of the base ui control and re-routing it to the child controls.

Hopefully there will be solutions for the other "problems" I mentioned.

Imp
08-11-2010 05:15 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #3
RE: Custom control
(08-09-2010 05:59 PM)Impz0r Wrote:  Hey there,

I'm right now coding a custom control and was wondering how I'm be able to check if the left/right mouse button has been pressed

if(Ms.bp(0)) for left mouse button adn if(Ms.bp(1)) for right wink
08-11-2010 06:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Impz0r Offline
Member

Post: #4
RE: Custom control
Thanks Harry. Thats one part smile

I wondering how I check if the Mouse is over a control. I tried to use the controls rect with the Ms.test() method, but that dosn't worked at all, mybe wrong coordinate system?

Imp
08-12-2010 12:33 AM
Find all posts by this user Quote this message in a reply
Gajet Offline
Member

Post: #5
RE: Custom control
i've encountered another problem,

i made a custom GUI and i needed to put a TextLine inside it but whatever i tried TextLine didn't show any response to keyboard or mouse input. i overwrote test, update and draw functions but there is still no luck.
08-16-2010 11:10 AM
Find all posts by this user Quote this message in a reply
Post Reply