ID:2208184
 
(See the best response by Kaiochao.)
Code:
obj
chatbox
var
client/client

Box
icon = 'Chatbox.dmi'
layer = MOB_LAYER + 80

New(client/c)
..()
client = c
screen_loc = "21,1"
client.screen += src

chatcommands
icon = 'Chatbox_Icons.dmi'
var
selected = 0
original_iconstate = ""

say
icon_state = "say"
original_iconstate = "say"
layer = MOB_LAYER + 80

New(client/c)
..()
client = c
screen_loc = "21,7"
client.screen += src

Click(mob/user)
user = usr

if(selected = 0)
for(var/obj/chatbox/chatcommands/c in user.client.screen)
if(c.selected = 1)
c.selected = 0
c.icon_state = c.original_iconstate
icon_state = "say_s"
winset(usr, "mainwindow.input1", "command=Say")
selected = 1


Problem description:

So I'm trying to create buttons for on top of the chatbox that when you click them they change the input1's function for chat commands however this just isn't working in the slightest, it's not changing the icon and it's not changing the function, some help would be appreciated XD
Best response
// replace:
if(selected = 0)
if(c.selected = 1)

// with:
if(!selected)
if(c.selected)
In response to Kaiochao
Kaiochao wrote:
> // replace:
> if(selected = 0)
> if(c.selected = 1)
>
> // with:
> if(!selected)
> if(c.selected)
>


Okay o.o but that doesn't fix my problem at all >.< XD
In response to Kaiochao
Kaiochao wrote:
> // replace:
> if(selected = 0)
> if(c.selected = 1)
>
> // with:
> if(!selected)
> if(c.selected)
>


Turns out it works just fine I just can't use it and use a system to track my mouse with a crosshair :/ so idk
It sounds like what you want is to give this chat box and everything in it a mouse_opacity of 0. That will allow the mouse to go through it and reach whatever's underneath.