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