GUI key logic

Discussion about Rocks'n'Diamonds, Boulder Dash, Supaplex, Emerald Mine and any other BD hybrid.

Moderators: Flumminator, Zomis

Post Reply
User avatar
Eizzoux
Posts: 571
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

GUI key logic

Post by Eizzoux »

I don't know for how long was this a thing, but only recently I found out that GUI key slots have been slightly changed. To be exact, they don't just show red, yellow, green and blue keys. They can sorta show all 9 keys, not all together, obviously. That GUI logic sorta confused me at first, but I think I figured it out.
  1. Keys 1-4 - major priority, once taken, they fully occupy their respective slots until they're taken out with CE,
  2. Keys 5-8 - minor priority, occupy the 1-4 slots respectively, but if the slot is already occupied by respective key of 1-4, then they go to first free slot,
  3. White key - lowest priority, fits into any free slot and gets pushed by all 1-8 keys, easily goes away once all four slots are filled with other keys.
Oh, and, by the way, will MM key ever get it's own GUI icon and counter, hopefully?
Also, funny idea, but... MM keys 1-4 and locks 1-4, possibly?

k1.png
k1.png (236.14 KiB) Viewed 5414 times

k2.png
k2.png (236 KiB) Viewed 5414 times

k3.png
k3.png (234.91 KiB) Viewed 5414 times

k4.png
k4.png (233.89 KiB) Viewed 5414 times

k5.png
k5.png (235.42 KiB) Viewed 5414 times

k6.png
k6.png (238.19 KiB) Viewed 5414 times



𒈟
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: GUI key logic

Post by Holger »

Yes, that's right -- it's this commit:

Code: Select all

commit 108ca72536761f0e52ccfa8a49d512210442b7f2
Date:   Wed Dec 16 00:44:14 2020 +0100

    added trying to show as many keys as possible in the default game panel
The idea behind this change was indeed to show keys in the limited default game panel if possible, not limiting it to the four default keys. (And as far as I can tell, you got the priority exactly right.)
Oh, and, by the way, will MM key ever get it's own GUI icon and counter, hopefully?
Also, funny idea, but... MM keys 1-4 and locks 1-4, possibly?
Extending the MM engine to four keys and four locks would be nice indeed, and also showing collected keys in the game panel. I am currently not sure if it is even possible to show a collected key in the MM engine on a custom game panel; if not, support for it should probably be added.
User avatar
Eizzoux
Posts: 571
Joined: Wed Oct 30, 2013 5:32 am
Location: Russia
Contact:

Re: GUI key logic

Post by Eizzoux »

Holger wrote: Fri Aug 04, 2023 10:43 am Extending the MM engine to four keys and four locks would be nice indeed, and also showing collected keys in the game panel. I am currently not sure if it is even possible to show a collected key in the MM engine on a custom game panel; if not, support for it should probably be added.
Well, maybe at least as two separate additions to the game panel? Both the MM key display and the MM key counter, pretty much like with key_white and key_white_count.
𒈟
User avatar
Holger
Site Admin
Posts: 4081
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: GUI key logic

Post by Holger »

Well, maybe at least as two separate additions to the game panel? Both the MM key display and the MM key counter, pretty much like with key_white and key_white_count.
Yes, exactly!
Post Reply