Adding a custom button to an existing console #102
-
I've been trying to figure out how to add a button to the comms console that's separate from the existing widgets. Using this, I can get the button to appear on the server, but I haven't figured out how to put it on the comms console instead. clients = sbs.get_client_ID_list()
for c in clients:
type = sbs.get_type_of_client(c)
if type == "normal_comm":
gui_section(style="area: 75,100-50px, 100,100;")
on gui_message(gui_button("Incoming Message")):
comms_broadcast(c,"testing)
await gui() What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 5 replies
-
You probably want something like the below. //gui is for extending a console. You don't want to call await gui() that replaces the whole gui But I should warn that Engineering and Comms are quite dense. Finding the screen real estate to place a button is difficult.
Most consoles are laid out here Likely to accomplish what you are trying you'd need to override this....which would probably need the priority/ordering that was recently to other things, but probably not in //gui |
Beta Was this translation helpful? Give feedback.
-
You could use a region. Like this snippet from the console select screen,
|
Beta Was this translation helpful? Give feedback.
You probably want something like the below.
//gui is for extending a console.
You don't want to call await gui() that replaces the whole gui
But I should warn that Engineering and Comms are quite dense. Finding the screen real estate to place a button is difficult.
Comms engineering have also changed in the current development (v1.0.7 at the time this was written). Some of it is to allow for more things in an already complex UI. It is not completed
Most consoles are laid out here
Likely to accomplish what you are trying you'd need …