ID:2095316
 
So I've been making this game that has a transparent chat (output) window, that you can drag around yet still see what is going on behind it.

But then I ran the game in the Web Player instead of DreamSeeker, and the chat window is NOT transparent, it has a solid black background. Is that normal? Why is that and how can I make it be transparent in the web player also?
Windows on the webclient don't support the transparent-color setting, which is meaningless there. What you'll want to do instead is either add a .winset or add some .dms styles that set the window (and probably also its output control) to transparent.

Something like this in a .dms:

<style>
#chatwindow, #chatoutput {
background: transparent;
}
</style>

You'd just want to change those IDs to the actual control IDs, but make sure you still have a # in front.
.dms
Uh oh. Well my game uses the old .dmf, which the web player then converts.
Will that code you just gave me for a .dms still work in regards to that? Thanks btw.
I'm not good with this css or html or whatever it is

I made a blank dms file and pasted this into it (nothing else but this in it)
<style>
#chat, #chat_box {
background: transparent;
}
</style>

Unsurprisingly it didn't work =)
I hate to be a total scrub, but what am I doing wrong?
My game uses a .dmf
And do Grid controls still not work in the Web Player?
You might want to try examining the HTML elements in your browser's developer console (in Chrome, you hit F12) and seeing which ones have color. There's probably more to it than the styles I mentioned, because I believe it's the output control's first child that takes on the color.

You'll probably need to do #chat .byond_pop_resize (assuming chat is the window), and #chat_box .byond_output_contents also, at the very least.

Probably you should check also that this style actually got applied. If it didn't, you can try changing your .dms into a dummy class for the webclient.

<byondclass name="nothing">
<style>
...
</style>
<script>
{}
</script>
</byondclass>
I've gotten slightly more of a grasp of this since your first reply, thanks to forum searches, I still have a long way to go though.

This is what I have now:
<body>

<div id = "chat" byondclass="window">
<div id = "chat_box" byondclass="output"></div>
</div>

</body>

<style>

#chat {
height: 50px;
width: 50px;
}

</style>

That just makes the game an entirely white screen. Is "window" not a valid byondclass? In the webclient reference there isn't a list of valid byondclass's that I could find. It's obvious some of them are "label" and "output" etc

Yes, "chat" is just a window by itself.
Ok. Off to F12 I go, thanks.
Oh I guess the screen goes white now because I need to define the other elements. Slowwwwly learning =)
I will renew my BYOND membership if I can get this working, just sayin'
What you're setting up now is actually a completely custom skin, and it won't use your .dmf skin at all. That's totally valid, since you may want one skin for the webclient and another for DS, but if you'd prefer to keep them more in sync, you probably want to avoid handling it this particular way.

In the webclient, "window" is not a valid class but "pane" is.
In response to Lummox JR
Lummox JR wrote:
What you're setting up now is actually a completely custom skin, and it won't use your .dmf skin at all.

Oh, I thought that code meant I was merely informing the webclient that those controls already exist in the dmf. I didn't know I was replacing them.

How can I make a reference in the dms to a control from the dmf so I can make changes to it from the dms? Can anyone post an example? Thanks

I thought it was merely this:
<style>
#chat, #chat_box {
background: transparent;
}
</style>

But having that alone in the dms with nothing else doesn't create any visible changes to the game inside the web player, so I assume I am missing something?
In response to Lummox JR
Basically I just want to override certain attributes of controls that already exist in the dmf when the player is using the webclient instead of dreamseeker.
As I mentioned in another post, you'll probably at least need to change #chat .byond_pop_resize and #chat_box .byond_output_contents as well. Without having your skin handy I can't just pop this into the webclient myself to look at, but if you open up the developer tools and inspect the elements on the page that are opaque that you want to be transparent, you should be able to find out which ones have a background color.
Ok so I think you are saying all I need to do is define styles for ALL of the appropriate elements. And that I don't need any of the other code. Thanks.
I don't believe you need the other code. IIRC, the styles should carry through properly.