Page 1 of 1
On hower
Posted: Wed Mar 06, 2024 9:51 pm
by Tarasevih
Hi Tom.
I wanted to change the interface a little but there is a problem.
I use an PNG image and assign a label style to the button, I get a beautiful button, but as soon as you hover the cursor over it, everything gets spoiled.
Everything on the emergency stop button works properly and beautifully.
Is it possible to fix this somehow?
[youtube]
https://www.youtube.com/watch?v=Rfi7xziI804[/youtube]
Regards,
Taras.
Re: On hower
Posted: Thu Mar 07, 2024 1:12 am
by TomKerekes
Hi Taras,
The Cycle Start/Halt button is forced to be of Style Dual Button which does the mouse hover effect.
Is it really that "spoiled"? Do you wish to have a hover effect?
The hover effect attempts to expand the contrast by 2X of the RGB image pixels with this algorithm:
Code: Select all
int CImageButton::HoverEffect(int i)
{
int r = (i - 128) * 2 + 128;
if (r < 0) r = 0;
if (r > 255) r = 255;
return r;
}
There is also a further effect on nearly full white pixels, which wouldn't be effected, to be made somewhat off white.
Code: Select all
if (bits[i] > 250 && bits[i + 1] > 250 && bits[i + 2] > 250)
{
bits[i] = 255;
bits[i + 1] = 255 *0.92;
bits[i + 2] = 255 *0.85;
}
If you are able to use Visual Studio 2022 you can modify this algorithm or defeat it.
Re: On hower
Posted: Thu Mar 07, 2024 4:55 am
by Tarasevih
Hi Tom.
Yes I can fix this in Visual Studio 2022.
But I want to use this on many of the cars we make.
I can't make an installer to install on other machines.
Is it possible to add this function to the screen editor?
Or is there a way to transfer this to other machines without using visual studio?
Regards,
Taras.
Re: On hower
Posted: Thu Mar 07, 2024 3:07 pm
by TomKerekes
Hi Taras,
I’m not sure I understand but after you change KMotionCNC and rebuild it you don’t need Visual Studio anymore. Just distribute the modified KMotionCNC.exe
Re: On hower
Posted: Fri Mar 08, 2024 5:26 am
by Tarasevih
Hi Tom.
Thanks Tom.
I saw somewhere on the forum that one of the users made his interface in visual basic.
Can you tell me where I can find this?
Regards,
Taras.
Re: On hower
Posted: Fri Mar 08, 2024 4:52 pm
by TomKerekes
Hi Taras,
Maybe you are referring to the Chip Program donated by Rick Caddell included as an example in 2020.
See the Release Notes
here.
It is included as the VB Example named Chip.
Note it is quite involved to configure/modify for different types of systems.
Re: On hower
Posted: Sat Mar 09, 2024 6:31 am
by Tarasevih
Hi Tom.
Yes, I understand that this is not easy.
Can I get more information about the chip?
Regards,
Taras.
Re: On hower
Posted: Sat Mar 09, 2024 3:41 pm
by TomKerekes
Hi Taras,
Did you watch the video? Read the manuals? Look at the code? That’s all we have.
Re: On hower
Posted: Sat Mar 09, 2024 3:52 pm
by Tarasevih
Hi Tom.
Where can you increase the range of numbers entered into the table of instruments ?
It is currently limited to 999.
Regards,
Taras.
Re: On hower
Posted: Sat Mar 09, 2024 5:19 pm
by TomKerekes
Hi Taras,
These lines and similar in EditToolFile.cpp
Code: Select all
DDX_Text_Blank(pDX, IDC_Length0, m_Length0);
DDV_MinMaxDouble_Blank(pDX, m_Length0, -999,999);