Lopdo

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. per-object rounding of pixels? https://github.com/photonstorm/phaser/issues/2370
  2. I have gallery of images representing player's avatars that can be unlocked. Avatar is simple Phaser.Image with transparency. Locked avatars are displayed as darkened version of normal avatars. To avoid duplicate graphics, I would like to use some sort of overlay, but I can't figure it out. I tried to use overlay semi-transparent black rectangle with multiply blend mode in hopes that it would cover only non-transparent parts of avatar, but it just shows semi-transparent black rectangle on top. It is quite possible that I am using it wrong, I can't find any useful examples how to use blend modes and documentation is rather sparse. On more generic term, is there any way how to use image with transparent background as a alpha mask for another image/sprite? From what I understand, you can only use Graphics object as a mask, but is there some hack? It can be slow, it will be used only on a screen with 5 such images and performance is not an issue in this case.
  3. Wow, thanks, I don't know how I could miss that! there is even addFontStyle and addFontWeight, neat! I think I was too focused on setXY methods (habit from other frameworks)
  4. Hey there, I would like to have a single text object with multicolored text and various styles. I want to use it for chat, where name of user who posted message is highlighted with different color. This would be rather easy for single line or if the multiline text could be in separate "column", but since my space is very limited, I need to have the user's name as a part of the text so that new line starts where the name starts. You can see clearly what I mean in following screenshot (the part on the right side): Ideally I would like to be able to achieve the thing on the left as well (multiple styles wherever) The Text object supports only one style AFAIK, is there any workaround I could use (for example rendering DOM element into texture, I could use css to style my text and then render it to texture that would be displayed instead of the Text object)?