Page 2 of 3
Re: Game Counter - Odometer
Posted: Thu Mar 11, 2021 3:14 am
by Saki
Hi,
Code updated.
The bugs should all be removed now.
Under MacOS there is a unknown PB bug with the clipping.
From the background image only the alpha channel is clipped away and the background are shifted, not clipped.
The DrawText output is not clipped at all.
This look at the first very strange and it damage the output completelly.
The clipping under MacOS is now disabled.
In different fonts, the position of the actual letters within its frame is often slightly different.
For example, in the "verdana" font, the letters are set a little lower and a little larger.
There are also fonts like "Georgia", where the numbers are even very different in size,
so you can't align them automatically, because a used clipping, you have to see how it fits and looks best.
Settings Font "verdana" :
Define v_adjust_odo.q=-3 ; Fine adjust the vertical char position
Define clip_output_yy_odo.d=-10 ; Clipping offset yy
I had forgotten:
Using Delay(1) is the usual way to lower the core load.
Using WindowEvent() here did not work off all the events, that then makes freeze problems.
You then do this with a sub loop to process all events.
I had forgotten to change it.
Tomorrow I look for further, please test again.
The next stepp is try make a procedure.
If this works, a module.
Re: Game Counter - Odometer [MODULE]
Posted: Thu Mar 11, 2021 7:39 pm
by Saki
Code Updated
Hi all,
The module is ready.
Re: Game Counter & Odometer - all OS - x64x86 [MODULE]
Posted: Thu Mar 11, 2021 7:46 pm
by Kwai chang caine
Works always also good, in better nice
Thanks for sharing

Re: Game Counter & Odometer - all OS - x64 x86 [MODULE]
Posted: Thu Mar 11, 2021 8:21 pm
by davido
@
Saki,
Just tried your latest Module version.
Looks fine to me.
Thank you for sharing this complicated code.
System: MacBookPro17,1 ; Apple M1 ;macOS 11.2.2 (20D80) ;Darwin 20.3.0
Re: Game Counter & Odometer - all OS - x64 x86 [MODULE]
Posted: Fri Mar 12, 2021 11:25 am
by Saki
Hi Kwai and davido.
Thank you very much.
@davido
On macOS I fixed another bug, please get the latest version.
I have reported the PB bug(s) I found on macOS.
If those are fixed by Fred you can re-enable the lines marked or commented out in the code.
Best Regards Saki
Re: Game Counter & Odometer - all OS - x64 x86 [MODULE]
Posted: Fri Mar 12, 2021 7:51 pm
by davido
@
Saki,
Thank you.
I've tested your updated code on my MacBook and find it not much different than before. I am happy with it.
I checked on a PC and can confirm that the PC shows graduated gold/yellow numbers whereas the Mac has plain yellow numbers.
Still fine for me, though.
Re: Game Counter & Odometer & Digitalclock - all OS - [Modu
Posted: Sat Mar 13, 2021 8:21 pm
by Saki
Many thanks davido.
Code updated - Main update
Counter now with System clock synchronisation available.
Digital clock with animation available.
Please look at the first posting.
Have fun
Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Sun Mar 14, 2021 2:06 pm
by Saki
Code updated
Little fixes and many enhancements.
Extra designs added for the digital clock,
looks pretty good.

Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Sun Mar 14, 2021 9:27 pm
by Saki
Bugfix
Scrolling up numbers are offset by 1 pixel
Only visible in Counter mode, not visible in Clock mode.
I hadn't noticed that on my 4K monitor with high scaling and DPI aware.
On standard monitors, however, you see it right away.
Also Padding yy adjustment because this issue.
I've reached the point where I want to say that fine tuning and DPI aware without a
4K monitor factually not possible.
This is all very very annoying and time consuming.
Please check in from time to time and download the latest code, as I can't announce everything.
The code is now also included in the GFX_Wizzard_BF archive and will be maintained there.
viewtopic.php?f=12&t=66927
Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Tue Mar 16, 2021 1:13 am
by Saki
Code enhanced and Little fixes
12h AM/PM mode added.
The clock can now be switched between 24hr and 12hr AM/PM at will,
even on demand during operation.
Many different designs selectable.

Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Wed Mar 17, 2021 9:32 am
by Saki
Code updated
Max Value - Min Value overflow fixed
Stop function fixed
These were regressions caused by the installation of the clock function and were only noticed now after intensive testing.
But it is important that they work.
The stop function is synchronized with the time (Second(Date()) based counter output and the clock output.
The PB Unix Date() function can also be replaced very simple by a DateEX() function if needed.
If they need two or more clocks, for example, then they simply duplicate the module.
You only have to change the name of the module and the names of the global procedures a little.
If you do not use "UseModule" it is enough to change only the name of the module.
This is only a minute of work.
Since this code is quite important, it is and will remain completely free, even if it is included in the GFX_Wizzard_BF archive.
viewtopic.php?f=12&t=66927
Remember that small code changes and optimizations are not announced.
Now all is final final.

Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Wed Mar 17, 2021 8:43 pm
by davido
@Saki,
Thank you for all the work you have done to get this working with MacOS.
Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Thu Mar 18, 2021 1:46 pm
by Saki
Thank you very much davido.
I also want to give you a special treat.
I think I can emulate the missing GradientColor function for the text under MacOS, as well as the missing clipping.
This may sound strange, but let's see.
I'll take a look at it today.
Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Thu Mar 18, 2021 6:46 pm
by Kwai chang caine
Works great here
Thanks for sharing all this versions more and more nice

Re: Game Counter & Odometer & Digital clock - all OS - [Mod
Posted: Thu Mar 18, 2021 8:05 pm
by davido
@Saki,
That'll be a neat trick!
Also most welcome. Thank you for attempting this.