Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Search for "MapSymbolDefinitions" in PZ directory for examples.
As you mentioned adding new colors in comment... you can, obviously, inject your own button into ui; there's already at least one mod which does exactly that.
However, you can also use few crayons-related functions, provided by ExtraMapSymbolsUI, made to allow other mods to add/remove their own colors without need for adding new buttons to UI in a first place.
Your script (media/lua/client/) could look something like this:
In case you add multiple colors, you might want to resize color picker size
In case you want to remove all default crayons colors, without going color by color, you can use:
Once you have your mod set, add this mod as dependency on Steam and in your mod.info:
Take a look at ExtraMapSymbolsUI.Crayons.lua in mod directory, which serves as a live example of adding crayons colors.
So why am i advertising using crayons "system" so hard?
Adding new color buttons, if done incorrectly, can and will lead to problems if N mods are trying to do that (which already happened in the past). On top of that, UI will be cluttered and start looking meh.
If you are using ExtraMapSymbolsUI anyway, crayons-related functions helps both of us:
You dont have to worry about hooking functions, creating button, and so on
I dont have to worry about mod conflicts, as both of us are using exactly same way to populate colors list. If my crayons script works, so will yours.
It sliiightly resizes near all symbols UI elements, to fit that one extra row of symbols, and allows to change the number of colums used for symbols, which helps with decreasing height of the whole thing at a price of increased width. Don't think i really can do more than that.