draconisPW / PWMAngband

A free, multi-player roguelike dungeon exploration game based on Angband
35 stars 11 forks source link

msg color #617

Open igroglaz opened 5 months ago

igroglaz commented 5 months ago

there was a new PWMA feature which introduced very useful formatted color.

it can be used not only for partial format coloring, but to color entire msg, eg like this: https://github.com/igroglaz/Tangaria/commit/a850edae01d9f894d76984480ba6cf917ed554b7

but to make it work I have to put space before formatted string (without space it doesn't work) and make string formatted

/rfe to add separate new function for simple output of colored messages without sound. so instead of msgt(p, MSG_GENERIC, " $v%s^v", "You've become as intangible as a wisp of cloud in the sky."); we will be able to use msgc(p, "$vYou've become as intangible as a wisp of cloud in the sky.^v"); or in case if we will wont more colors in the message: msgc(p, "$gYou've become as intangible^g $vas a wisp of cloud in the sky.^v");