Judian81 wrote: ↑August 15th, 2021, 10:55 pm
hmm no i can not figuer it out.
I would just not use TransformationMatrix with a Button meter. The trouble is that the points on the button image that the mouse reacts to is always based on the original size of the button image frame(s). When you scale up the meter with TransformationMatrix, that is ok for the appearence of the button, but causes a lot of really unfixable problems with the mouse.
I would not use a Button meter with anything but a 3-frame button image that is a set actual size. I would never do anything that scales the image.
I would use one image meter toggling three images, and just use various mouse actions on the meter to simulate the effect of a button. This image meter can be any size, and won't have any problem if you just scale it with W and H. I would not use TransformationMatrix though, as this will have the same problem with the mouse if you do.
Judian81 wrote: ↑August 16th, 2021, 12:22 am
oke thanks. your are my seviour.
Glad to help.
Truth be told, I just wouldn't use a Button meter, period. There is no huge advantage to them over the Image meter approach I described above, and this saves you the hassle of creating a 3-frame button bitmap image, and is really the only way to have a button that can be scaled in size.
The only issue with the Image meter approach, and it's not a trivial problem, is that the areas of the image that react the mouse are based on the entire size of the "meter". If you are using an image as a button that has areas of transparency, the mouse will be triggered any time the mouse is over any "solid" pixel in the image meter. However, if you have anything "behind" the image being used as a button, a solid skin background or some background image meter, that will cause the mouse to be detected everywhere on your image meter. This is a function of how the mouse is detected on most meter types. The exceptions are two... 1) An actual Button meter, which is designed to only react to the mouse on solid pixels of the button "image", not the "meter". 2) A Shape meter, which is designed in a similar way.
So at the end of the day you either have to live with this mouse behavior with an Image meter, use a Button meter but don't scale it, or use a Shape meter to "draw" your button.
Judian81 wrote: ↑August 16th, 2021, 12:55 am
hmm yeah. a shape is good i think. there not so hard anyway. and there good to look at. all i need is just some arrows and a some bars and a square.
but in this case a image meter is fine enoug. i do not realy care so much that it is possible to click on when there are transparrent.
maybe if the images are not so good looking then i will start with shaps
Fair enough... Images certainly don't "scale" as nicely as vector Shapes do.