closes #15279
This commit is contained in:
@@ -5,6 +5,11 @@
|
||||
set hidden = TRUE
|
||||
set category = "IC"
|
||||
client?.last_activity = world.time
|
||||
for(var/datum/tgui/window in tgui_open_uis)
|
||||
if(istype(window.src_object, /datum/tgui_input_dialog))
|
||||
var/datum/tgui_input_dialog/say_box = window.src_object
|
||||
if(say_box.title == "say") // Yes, i am dead serious.
|
||||
return
|
||||
display_typing_indicator()
|
||||
var/message = tgui_input_text(usr, null, "say")
|
||||
// If they don't type anything just drop the message.
|
||||
@@ -32,6 +37,11 @@
|
||||
set hidden = TRUE
|
||||
set category = "IC"
|
||||
client?.last_activity = world.time
|
||||
for(var/datum/tgui/window in tgui_open_uis)
|
||||
if(istype(window.src_object, /datum/tgui_input_dialog))
|
||||
var/datum/tgui_input_dialog/emote_box = window.src_object
|
||||
if(emote_box.title == "me") // Yes, i am dead serious.
|
||||
return
|
||||
display_typing_indicator()
|
||||
var/message = tgui_input_message(usr, null, "me")
|
||||
// If they don't type anything just drop the message.
|
||||
|
||||
@@ -28,13 +28,14 @@ export const InputModal = (props, context) => {
|
||||
}
|
||||
};
|
||||
|
||||
let initialHeight, initialWidth;
|
||||
let initialHeight, initialWidth, canResize;
|
||||
let modalBody;
|
||||
switch (input_type) {
|
||||
case 'text':
|
||||
case 'num':
|
||||
initialWidth = 325;
|
||||
initialHeight = message ? Math.max(150, message.length) : 110;
|
||||
canResize = false;
|
||||
modalBody = (
|
||||
<Input
|
||||
value={initial}
|
||||
@@ -54,6 +55,7 @@ export const InputModal = (props, context) => {
|
||||
case 'message':
|
||||
initialWidth = 450;
|
||||
initialHeight = 350;
|
||||
canResize = true;
|
||||
modalBody = (
|
||||
<TextArea
|
||||
value={initial}
|
||||
@@ -71,7 +73,7 @@ export const InputModal = (props, context) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Window title={title} theme="abstract" width={initialWidth} height={initialHeight}>
|
||||
<Window title={title} theme="abstract" width={initialWidth} height={initialHeight} resizable={canResize}>
|
||||
{timeout !== undefined && <Loader value={timeout} />}
|
||||
<Window.Content>
|
||||
<Stack fill vertical>
|
||||
|
||||
@@ -62,6 +62,7 @@ export class Window extends Component {
|
||||
theme,
|
||||
title,
|
||||
children,
|
||||
resizable,
|
||||
} = this.props;
|
||||
const {
|
||||
config,
|
||||
@@ -101,7 +102,7 @@ export class Window extends Component {
|
||||
<div className="Window__dimmer" />
|
||||
)}
|
||||
</div>
|
||||
{fancy && (
|
||||
{fancy && resizable && (
|
||||
<>
|
||||
<div className="Window__resizeHandle__e"
|
||||
onMousedown={resizeStartHandler(1, 0)} />
|
||||
|
||||
Reference in New Issue
Block a user