[Solved] Transparant window on top of another window?

Discussion in 'Learning Javascript' started by SilverDash, Dec 17, 2015.

  1. SilverDash

    SilverDash Veteran Veteran

    Messages:
    349
    Likes Received:
    108
    [​IMG]

    In the screenshot above (click to enlarge) I have a window drawn on the left and right side. They work just fine until I draw another window draw in the top-right-corner which is the same size as the 'dark-rectangles' with an opacity of 0. As you can see, this causes the window underneath it also to become fully transparent?

    How do I Render a transparent Window_Selectable on top of another window?

    If this is a RPG Maker bug, is there a way to work around this? Like taking a screenshot (how is this even done?) and rendering it on the window that is on top?

    I also tried changing the window skin  (I made the background fully transparent) but that didn't help either.
     
    Last edited by a moderator: Dec 18, 2015
    #1
  2. Zalerinian

    Zalerinian Jack of all Errors Veteran

    Messages:
    4,695
    Likes Received:
    921
    Location:
    The Internet.
    First Language:
    English
    Primarily Uses:
    N/A
    This isn't a bug, this is by (incredibly stupid) design. You need to add the window as a separate layer from the rest, so don't use addWindow, just use addChild when adding the window to the scene.
     
    #2
    SilverDash likes this.
  3. SilverDash

    SilverDash Veteran Veteran

    Messages:
    349
    Likes Received:
    108
    But I also have to manually remove the window then but it works thanks. Wish they would add this stuff to the documentation.
     
    Last edited by a moderator: Dec 18, 2015
    #3
  4. Zalerinian

    Zalerinian Jack of all Errors Veteran

    Messages:
    4,695
    Likes Received:
    921
    Location:
    The Internet.
    First Language:
    English
    Primarily Uses:
    N/A
    What do you mean you have to remove the window then? Just add it directly with addChild instead of using addWindow.
     
    #4
  5. SilverDash

    SilverDash Veteran Veteran

    Messages:
    349
    Likes Received:
    108
    Nevermind I have to manually remove them anyway even when adding through addWindow(). And this 'removing' only applies to exceptional cases (like my minimap script). Forget about it.
     
    Last edited by a moderator: Dec 18, 2015
    #5
  6. Iavra

    Iavra Veteran Veteran

    Messages:
    1,797
    Likes Received:
    856
    First Language:
    German
    Windows are usually added once during create() and either hidden or shown, depending on whether they are needed. The update() function can conditionally be skipped, if a window isn't visible. If the window needs to be reinitialized a second time, consider a setup() method.
     
    #6

Share This Page