This commit is contained in:
SandPoot
2021-10-17 23:04:24 -03:00
parent 45ef0fe5ca
commit 8adf4606d7
3 changed files with 16 additions and 3 deletions
+10
View File
@@ -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.
+4 -2
View File
@@ -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>
+2 -1
View File
@@ -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)} />