Zwiebelchen
Hosted Project GR
- Joined
- Sep 17, 2009
- Messages
- 7,236
So, has anyone found a good solution to get rid of DISBTNs yet?
As it's very annoying to have to import buttons as active and greyed-out variants in order to prevent the ugly green boxes and also wastes a lot of file space, I'm looking for a way to get rid of the DISBTNs, without looking ugly.
I know that you can actually name all your buttons the same, but place them in different folders, so that you can use a uniform DISBTN for all of them:
Example:
Active buttons:
"war3mapImported\Armors\001\BTNArmor.blp"
"war3mapImported\Armors\002\BTNArmor.blp"
"war3mapImported\Armors\003\BTNArmor.blp"
"war3mapImported\Armors\004\BTNArmor.blp"
And the shared disabled button for all of them:
"ReplaceableTextures\CommandButtonsDisabled\DISBTNArmor.blp"
However, this obviously comes with the caveat of all buttons looking the same when disabled. Now this is not a real problem if all you want is avoiding the green box. But it's definitely not the optimal solution either, especially if you have visible inventories for other players enabled (they will always show the disabled icon).
Is it possible to trick or fool WC3 into thinking your BTN is also a DISBTN at the same time by clever use of the file structure? So, for example, placing your button in "ReplaceableTextures\CommandButtonsDisabled\" by default, naming it DISBTN?
Active icon: "ReplaceableTextures\CommandButtonsDisabled\DISBTNArmor.blp"?
Disabled Icon: "ReplaceableTextures\CommandButtonsDisabled\DISBTNArmor.blp"
I suppose it will try to look for a "DISDISBTNArmor.blp", but I'm not sure on this one?
Another thought:
If it's only about filesize, will ZLib compression effectively remove the filesize footprint of a disabled button that is exactly the same icon as the enabled button? So my idea was to import the same icon for both paths; theoretically, the whole icon should be recognized as a "word" then, effectivly compressing the 6+6kb for both icons into 6kb for a single icon.
As it's very annoying to have to import buttons as active and greyed-out variants in order to prevent the ugly green boxes and also wastes a lot of file space, I'm looking for a way to get rid of the DISBTNs, without looking ugly.
I know that you can actually name all your buttons the same, but place them in different folders, so that you can use a uniform DISBTN for all of them:
Example:
Active buttons:
"war3mapImported\Armors\001\BTNArmor.blp"
"war3mapImported\Armors\002\BTNArmor.blp"
"war3mapImported\Armors\003\BTNArmor.blp"
"war3mapImported\Armors\004\BTNArmor.blp"
And the shared disabled button for all of them:
"ReplaceableTextures\CommandButtonsDisabled\DISBTNArmor.blp"
However, this obviously comes with the caveat of all buttons looking the same when disabled. Now this is not a real problem if all you want is avoiding the green box. But it's definitely not the optimal solution either, especially if you have visible inventories for other players enabled (they will always show the disabled icon).
Is it possible to trick or fool WC3 into thinking your BTN is also a DISBTN at the same time by clever use of the file structure? So, for example, placing your button in "ReplaceableTextures\CommandButtonsDisabled\" by default, naming it DISBTN?
Active icon: "ReplaceableTextures\CommandButtonsDisabled\DISBTNArmor.blp"?
Disabled Icon: "ReplaceableTextures\CommandButtonsDisabled\DISBTNArmor.blp"
I suppose it will try to look for a "DISDISBTNArmor.blp", but I'm not sure on this one?
Another thought:
If it's only about filesize, will ZLib compression effectively remove the filesize footprint of a disabled button that is exactly the same icon as the enabled button? So my idea was to import the same icon for both paths; theoretically, the whole icon should be recognized as a "word" then, effectivly compressing the 6+6kb for both icons into 6kb for a single icon.