Page 7 of 8

Re: PureMondrian

Posted: Fri Jul 26, 2024 2:10 pm
by jacdelad
Ok, ok. That's again a lot of changes for a game that should already be finished. I'll do some stuff and report when it's done.

Re: PureMondrian

Posted: Fri Jul 26, 2024 2:28 pm
by AZJIO
The grid is not visible in the black theme
For white theme

Code: Select all

    VectorSourceColor(RGBA(32,32,32,255))
    DotPath(1, 3)
For black theme

Code: Select all

    VectorSourceColor(RGBA(255,255,255,255))
    DotPath(1, 1)
On Linux, the line generated a warning and did not close when I clicked the "Close" button.

Code: Select all

WinThread=CreateThread(@Animation(),WinAnim)
I made a package for Linux (arch). Includes package sources.

Re: PureMondrian

Posted: Fri Jul 26, 2024 4:18 pm
by jacdelad
Thanks AZJIO,
I'll take a look at that. Time to set up a Linux machine, so I can test it myself.

Re: PureMondrian

Posted: Fri Jul 26, 2024 4:44 pm
by moulder61
@jacdelad

Version 1.4.2 is looking a lot better now and works OK in Linux. I see you kept the ClipMouse but only for Windows. Clever. :)
As AZJIO said, the grid still doesn't show up in the dark theme. I just changed line 116 to : VectorSourceColor(RGBA(127,127,127,255))
So it's more mid gray than dark gray. Works OK on a light theme too.

@AZJIO
I looked at the PB help on DotPath and don't really get it? Maybe that would be a solution but how does it detect which theme you are using?
Changing the colour to mid gray as I said above does the trick. Unless you have a mid gray theme obviously!
I'm not getting any issues with the WinAnim. I'm using PB 6.04 LTS on Void Linux.

Moulder.

Re: PureMondrian

Posted: Fri Jul 26, 2024 5:18 pm
by AZJIO
Download
zst (x64 Arch)
deb (x64-Mint, x86-MX)
rpm (x64 Fedora)

Package sources included (PKGBUILD, control, SPEC)

Re: PureMondrian

Posted: Fri Jul 26, 2024 5:43 pm
by moulder61
@jacdelad

I've been fiddling with the code a bit to try to get 3 buttons on a line. I managed to get the width of the button 1/3 the size, but with 44 puzzles you would need a list height that fits at least 15 lines and it was showing 14 1/2. So I removed the title "Puzzle" from the header but there was still a blank header. So I moved the header up a bit, but it overlapped the top buttons. So I rearranged the order that the buttons and list are drawn and made the list length a bit longer! Do you really need a header to tell you it's a list of puzzles?
No, I don't have anything better to do, thanks for asking. :)
Anyway, it looks like this now. You might be able to see the section of code I modified. I'm guessing maybe it needs something like #List1, #List2 and #List3 but I don't know how that works? I'll keep trying to work something out because it's an interesting learning experience. ;)
Maybe there will be 2 or 3 versions if one version doesn't cover multiple OS's?

Moulder.

Image

Re: PureMondrian

Posted: Fri Jul 26, 2024 8:24 pm
by jacdelad
I use a built-in PureBasic constant after creating the list. Internally it calls a Windows API, which sets how the gadget is viewed. I never thought about how it would or would not work on Linux. Maybe a Linux expert can shed light on this. #PB_ListIcon_DisplayMode is onl available on Windows, according to the help. Todn know whether the other OSes support something similar at all.

Re: PureMondrian

Posted: Fri Jul 26, 2024 8:45 pm
by moulder61
I messed about for a while trying to work around it. I ended up creating an array List(2) for three column lists(instead of #List) but that meant chopping a lot of existing code about to get it to fit. I seemed to be making some progress, strangely, but then I ended up with an error trying to draw to the canvas?
I figured I was going about it the wrong way so started again, having looked at the PB help and thought maybe AddGadgetColumn might be the way to go instead? I couldn't get that to work either. :( Most examples on the forum seem to be for Windows(typically) so don't work on my machine.
I'm an engineer, not a programmer, so there's only so far I can get with a screwdriver and hammer. ;) HELP!!!!!

Moulder.

Re: PureMondrian

Posted: Fri Jul 26, 2024 8:56 pm
by jacdelad
AddGadgetColumn adds a column in report mode (which is available on all platforms). Selecting an item would mean selecting all columns in this line. This wouldn't work, unfortunately. For now, I would leave it as it is. On the other hand, I could use report mode and add best times to each puzzle.
Here's how it looks on Windows right now:
Image

Re: PureMondrian

Posted: Fri Jul 26, 2024 8:58 pm
by moulder61
After you mentioned #PB_ListIcon_DisplayMode I fiddled about some more and although removing that line didn't make any difference, eventually, I managed to get it looking like this. No idea how you get to populate the other columns though?

Moulder.

Image

Re: PureMondrian

Posted: Fri Jul 26, 2024 9:04 pm
by moulder61
You replied as I was writing the last post so I only just saw it. You're right, you can only select all columns at once. :(
Maybe leaving it as it is would be best. I'm never satisfied though, so I'll keep messing about with it. :)
You have done more than enough on this project already. Have a rest. :P
Thanks for your efforts and for sharing it.

Moulder.

Re: PureMondrian

Posted: Fri Jul 26, 2024 10:36 pm
by jacdelad
Nah, no rest for me. I'll have another week of nightshift next week, so plenty of time.
But I gotta do one thing after another. At the moment I'm tuning the dark mode and add some more options asked by AZJIO.

Re: PureMondrian

Posted: Fri Jul 26, 2024 10:38 pm
by jacdelad
AZJIO wrote: Fri Jul 26, 2024 2:28 pm The grid is not visible in the black theme
For white theme

Code: Select all

    VectorSourceColor(RGBA(32,32,32,255))
    DotPath(1, 3)
For black theme

Code: Select all

    VectorSourceColor(RGBA(255,255,255,255))
    DotPath(1, 1)
On Linux, the line generated a warning and did not close when I clicked the "Close" button.

Code: Select all

WinThread=CreateThread(@Animation(),WinAnim)
I made a package for Linux (arch). Includes package sources.
Hi AZJIO,
thanks for the packages, but I still have no Linux, so I cannot test it yet. What does the warning say?

Re: PureMondrian

Posted: Sat Jul 27, 2024 1:16 am
by jacdelad
@moulder61/@AZJIO: I updated the Git and added better darkmode compatibility (the black tiles now turn white on dark mode) and some preferences (round corners and gradient).

Re: PureMondrian

Posted: Sat Jul 27, 2024 1:08 pm
by moulder61
@jacdelad

The good news:
I like the new settings options.
Dark mode looks a bit better now.

The bad news:
The first settings option should say "no round corners".
I don't think the dark gradient on the tiles looks right in dark mode.

There was another issue I never mentioned before about dark mode. The difficulty level percentage in white on a green background is hard to read.
I feel bad complaining after all the work you've put in to it. :(

Moulder.