On hower

Moderators: TomKerekes, dynomotion

Post Reply
Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

On hower

Post by Tarasevih » Wed Mar 06, 2024 9:51 pm

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.

User avatar
TomKerekes
Posts: 2559
Joined: Mon Dec 04, 2017 1:49 am

Re: On hower

Post by TomKerekes » Thu Mar 07, 2024 1:12 am

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.
Regards,

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: On hower

Post by Tarasevih » Thu Mar 07, 2024 4:55 am

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.

User avatar
TomKerekes
Posts: 2559
Joined: Mon Dec 04, 2017 1:49 am

Re: On hower

Post by TomKerekes » Thu Mar 07, 2024 3:07 pm

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
Regards,

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: On hower

Post by Tarasevih » Fri Mar 08, 2024 5:26 am

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.

User avatar
TomKerekes
Posts: 2559
Joined: Mon Dec 04, 2017 1:49 am

Re: On hower

Post by TomKerekes » Fri Mar 08, 2024 4:52 pm

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.
Regards,

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: On hower

Post by Tarasevih » Sat Mar 09, 2024 6:31 am

Hi Tom.
Yes, I understand that this is not easy.
Can I get more information about the chip?

Regards,
Taras.

User avatar
TomKerekes
Posts: 2559
Joined: Mon Dec 04, 2017 1:49 am

Re: On hower

Post by TomKerekes » Sat Mar 09, 2024 3:41 pm

Hi Taras,

Did you watch the video? Read the manuals? Look at the code? That’s all we have.
Regards,

Tom Kerekes
Dynomotion, Inc.

Tarasevih
Posts: 101
Joined: Fri Jul 09, 2021 11:26 am

Re: On hower

Post by Tarasevih » Sat Mar 09, 2024 3:52 pm

Hi Tom.
Where can you increase the range of numbers entered into the table of instruments ?
It is currently limited to 999.
Regards,
Taras.
Attachments
Screenshot_2.png

User avatar
TomKerekes
Posts: 2559
Joined: Mon Dec 04, 2017 1:49 am

Re: On hower

Post by TomKerekes » Sat Mar 09, 2024 5:19 pm

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);
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply