Yes. There are still some issues with event handling and point calculation, but in general the task is not difficult and can be implemented in a day, taking into account searching the forum on related topics.
If you try hard, you can probably do it in a few hours.
I agree - considering that I'm not a programmer and I know nothing but mcl5 + I've never implemented such things - it took me 6-7 hours. 2-3 hours of them I was drawing buttons :) because Andrew put his only in the morning...
How does the button detect that the cursor is pointing at it? -> It checks if x and y of the current mouse position are in a rectangular area.
If you add to this check the alpha-channel check in the given place, you're done :)
Yes, that's exactly what I assumed. Thanks, all that's left is to find how to calculate the alpha channel on the object. Thanks. purely for myself. Interesting topic.
So there you go. No changes to the standard library. Self-sufficient buttons class. The button files should be placed in MQL5 directory .../Images. I have not done it through resources, so that I could always change the images. Although, in the future, no one forbids to implement buttons as resources.
So there you go. No changes to the standard library. Self-sufficient buttons class. The button files should be placed in MQL5 directory .../Images. I have not done it through resources, so that I could always change the images. Although in the future no one forbids introducing buttons as resources.
2015.03.01 21:26:10.583 Experts initializing of competition (EURUSD,M1) failed
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Yes. There are still some issues with event handling and point calculation, but in general the task is not difficult and can be implemented in a day, taking into account searching the forum on related topics.
If you try hard, you can probably do it in a few hours.
How does the button detect that the cursor is pointing at it? -> It checks if x and y of the current mouse position are in a rectangular area.
If you add to this check the alpha-channel check in the given place, you're done :)
How does the button detect that the cursor is pointing at it? -> It checks if x and y of the current mouse position are in a rectangular area.
If you add to this check the alpha-channel check in the given place, you're done :)
So there you go. No changes to the standard library. Self-sufficient buttons class. The button files should be placed in MQL5 directory .../Images. I have not done it through resources, so that I could always change the images. Although, in the future, no one forbids to implement buttons as resources.
So there you go. No changes to the standard library. Self-sufficient buttons class. The button files should be placed in MQL5 directory .../Images. I have not done it through resources, so that I could always change the images. Although in the future no one forbids introducing buttons as resources.
Added buttons. Something didn't work the first time it was uploaded.
Added buttons. Somehow, the first time it didn't work uploading.
Without resources, it's like this.