mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
Input Fixes
This commit is contained in:
@@ -99,7 +99,11 @@ GENERAL_PROTECT_DATUM(/datum/managed_browser/feedback_form)
|
||||
if(href_list["feedback_edit_body"])
|
||||
// This is deliberately not sanitized here, and is instead checked when hitting the submission button,
|
||||
// as we want to give the user a chance to fix it without needing to rewrite the whole thing.
|
||||
feedback_body = tgui_input_text(my_client, "Please write your feedback here.", "Feedback Body", feedback_body, multiline = TRUE)
|
||||
<<<<<<< HEAD
|
||||
feedback_body = input(my_client, "Please write your feedback here.", "Feedback Body", feedback_body) as null|message
|
||||
=======
|
||||
feedback_body = tgui_input_text(my_client, "Please write your feedback here.", "Feedback Body", feedback_body, multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
display() // Refresh the window with new information.
|
||||
return
|
||||
|
||||
|
||||
@@ -180,7 +180,11 @@
|
||||
assigned_role = new_role
|
||||
|
||||
else if (href_list["memory_edit"])
|
||||
var/new_memo = sanitize(tgui_input_text(usr, "Write new memory", "Memory", memory, multiline = TRUE))
|
||||
<<<<<<< HEAD
|
||||
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
|
||||
=======
|
||||
var/new_memo = sanitize(tgui_input_text(usr, "Write new memory", "Memory", memory, multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
if (isnull(new_memo)) return
|
||||
memory = new_memo
|
||||
|
||||
@@ -188,7 +192,11 @@
|
||||
var/datum/mind/mind = locate(href_list["amb_edit"])
|
||||
if(!mind)
|
||||
return
|
||||
var/new_ambition = tgui_input_text(usr, "Enter a new ambition", "Memory", mind.ambitions, multiline = TRUE)
|
||||
<<<<<<< HEAD
|
||||
var/new_ambition = input("Enter a new ambition", "Memory", mind.ambitions) as null|message
|
||||
=======
|
||||
var/new_ambition = tgui_input_text(usr, "Enter a new ambition", "Memory", mind.ambitions, multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
if(isnull(new_ambition))
|
||||
return
|
||||
if(mind)
|
||||
|
||||
@@ -214,8 +214,13 @@ var/global/list/Holiday = list() //Holidays are lists now, so we can have more t
|
||||
|
||||
Holiday = list()
|
||||
|
||||
<<<<<<< HEAD
|
||||
var/H = input(src,"What holiday is it today?","Set Holiday") as text
|
||||
var/B = input(src,"Now explain what the holiday is about","Set Holiday") as message
|
||||
=======
|
||||
var/H = tgui_input_text(src,"What holiday is it today?","Set Holiday")
|
||||
var/B = tgui_input_text(src,"Now explain what the holiday is about","Set Holiday", multiline = TRUE)
|
||||
var/B = tgui_input_text(src,"Now explain what the holiday is about","Set Holiday", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
|
||||
|
||||
Holiday[H] = B
|
||||
|
||||
@@ -447,7 +447,11 @@ GLOBAL_LIST_BOILERPLATE(allCasters, /obj/machinery/newscaster)
|
||||
return TRUE
|
||||
|
||||
if("set_new_message")
|
||||
msg = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", multiline = TRUE))
|
||||
<<<<<<< HEAD
|
||||
msg = sanitize(tgui_input_message(usr, "Write your Feed story", "Network Channel Handler"))
|
||||
=======
|
||||
msg = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
return TRUE
|
||||
|
||||
if("set_new_title")
|
||||
|
||||
@@ -424,7 +424,11 @@
|
||||
selected_tab = params["switch_tab"]
|
||||
|
||||
if("edit")
|
||||
var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE)
|
||||
<<<<<<< HEAD
|
||||
var/n = input(usr, "Please enter message", name, notehtml) as message|null
|
||||
=======
|
||||
var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
n = sanitizeSafe(n, extra = 0)
|
||||
if(n)
|
||||
note = html_decode(n)
|
||||
|
||||
@@ -354,7 +354,11 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/device/paicard)
|
||||
if(2)
|
||||
radio.ToggleReception()
|
||||
if(href_list["setlaws"])
|
||||
var/newlaws = sanitize(tgui_input_text(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws, multiline = TRUE))
|
||||
<<<<<<< HEAD
|
||||
var/newlaws = sanitize(input(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
|
||||
=======
|
||||
var/newlaws = sanitize(tgui_input_text(usr, "Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws, multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
if(newlaws)
|
||||
pai.pai_laws = newlaws
|
||||
to_chat(pai, "Your supplemental directives have been updated. Your new directives are:")
|
||||
|
||||
@@ -617,7 +617,11 @@ var/global/floorIsLava = 0
|
||||
set desc="Announce your desires to the world"
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/message = tgui_input_text(usr, "Global message to send:", "Admin Announce", multiline = TRUE)
|
||||
<<<<<<< HEAD
|
||||
var/message = tgui_input_message(usr, "Global message to send:", "Admin Announce")
|
||||
=======
|
||||
var/message = tgui_input_text(usr, "Global message to send:", "Admin Announce", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
if(message)
|
||||
if(!check_rights(R_SERVER,0))
|
||||
message = sanitize(message, 500, extra = 0)
|
||||
@@ -642,8 +646,13 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
|
||||
if(sender) //They put a sender
|
||||
sender = sanitize(sender, 75, extra = 0)
|
||||
var/message = tgui_input_text(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.", multiline = TRUE)
|
||||
<<<<<<< HEAD
|
||||
var/message = input(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
|
||||
var/msgverb = input(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says") as null|text //VOREStation Addition
|
||||
=======
|
||||
var/message = tgui_input_text(usr, "Message content (max 500):", "Contents", "This is a test of the announcement system.", multiline = TRUE, prevent_enter = TRUE)
|
||||
var/msgverb = tgui_input_text(usr, "Name of verb (Such as 'states', 'says', 'asks', etc):", "Verb", "says")
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
if(message) //They put a message
|
||||
message = sanitize(message, 500, extra = 0)
|
||||
//VOREStation Edit Start
|
||||
@@ -681,7 +690,11 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
The above will result in those messages playing, with a 5 second gap between each. Maximum of 20 messages allowed.</span>")
|
||||
|
||||
var/list/decomposed
|
||||
var/message = tgui_input_text(usr,"See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "", multiline = TRUE)
|
||||
<<<<<<< HEAD
|
||||
var/message = input(usr,"See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "") as null|message
|
||||
=======
|
||||
var/message = tgui_input_text(usr,"See your chat box for instructions. Keep a copy elsewhere in case it is rejected when you click OK.", "Input Conversation", "", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
/client/proc/admin_memo_write()
|
||||
var/savefile/F = new(MEMOFILE)
|
||||
if(F)
|
||||
var/memo = sanitize(tgui_input_text(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null, multiline = TRUE), extra = 0)
|
||||
<<<<<<< HEAD
|
||||
var/memo = sanitize(input(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null) as null|message, extra = 0)
|
||||
=======
|
||||
var/memo = sanitize(tgui_input_text(src,"Type your memo\n(Leaving it blank will delete your current memo):","Write Memo",null, multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
switch(memo)
|
||||
if(null)
|
||||
return
|
||||
|
||||
@@ -174,7 +174,11 @@ world/New()
|
||||
if(!found)
|
||||
to_chat(src, "<b>* An error occured, sorry.</b>")
|
||||
|
||||
var/body = tgui_input_text(src.mob, "Enter a body for the news", "Body", multiline = TRUE)
|
||||
<<<<<<< HEAD
|
||||
var/body = input(src.mob, "Enter a body for the news", "Body") as null|message
|
||||
=======
|
||||
var/body = tgui_input_text(src.mob, "Enter a body for the news", "Body", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
if(!body) return
|
||||
|
||||
found.body = body
|
||||
|
||||
@@ -28,7 +28,15 @@
|
||||
var/new_body = sanitize(tgui_input_text(src,"Write the body of the news update here. Note: HTML is NOT supported, however paper markup is supported. \n\
|
||||
Hitting enter will automatically add a line break. \n\
|
||||
Valid markup includes: \[b\], \[i\], \[u\], \[large\], \[h1\], \[h2\], \[h3\]\ \[*\], \[hr\], \[small\], \[list\], \[table\], \[grid\], \
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
\[row\], \[cell\], \[logo\], \[sglogo\].","Write News", body, multiline = TRUE), extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
\[row\], \[cell\], \[logo\], \[sglogo\].","Write News", body) as null|message, extra = 0)
|
||||
=======
|
||||
\[row\], \[cell\], \[logo\], \[sglogo\].","Write News", body, multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
|
||||
new_body = paper_markup2html(new_body)
|
||||
|
||||
|
||||
@@ -846,7 +846,15 @@
|
||||
if (ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
return
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/reason = sanitize(tgui_input_text(usr, "Please enter reason.", multiline = TRUE))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/reason = sanitize(input(usr, "Please enter reason.") as null|message)
|
||||
=======
|
||||
var/reason = sanitize(tgui_input_text(usr, "Please enter reason.", multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!reason)
|
||||
return
|
||||
|
||||
@@ -1821,7 +1829,15 @@
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_set_new_message"])
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
src.admincaster_feed_message.body = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", "", multiline = TRUE))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
src.admincaster_feed_message.body = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", "") as message)
|
||||
=======
|
||||
src.admincaster_feed_message.body = sanitize(tgui_input_text(usr, "Write your Feed story", "Network Channel Handler", "", multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["ac_submit_new_message"])
|
||||
|
||||
@@ -627,8 +627,18 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!holder)
|
||||
return
|
||||
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/input = sanitize(tgui_input_text(usr, "Please enter anything you want. Anything. Serious.", "What?", "", multiline = TRUE), extra = 0)
|
||||
var/customname = sanitizeSafe(tgui_input_text(usr, "Pick a title for the report.", "Title"))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
|
||||
var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
|
||||
=======
|
||||
var/input = sanitize(tgui_input_text(usr, "Please enter anything you want. Anything. Serious.", "What?", "", multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
var/customname = sanitizeSafe(tgui_input_text(usr, "Pick a title for the report.", "Title"))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!input)
|
||||
return
|
||||
if(!customname)
|
||||
|
||||
@@ -140,7 +140,15 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["metadata"])
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_metadata = sanitize(tgui_input_text(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , html_decode(pref.metadata), multiline = TRUE), extra = 0) //VOREStation Edit
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_metadata = sanitize(tgui_input_message(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , html_decode(pref.metadata)), extra = 0) //VOREStation Edit
|
||||
=======
|
||||
var/new_metadata = sanitize(tgui_input_text(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , html_decode(pref.metadata), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_metadata && CanUseTopic(user))
|
||||
pref.metadata = new_metadata
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -115,19 +115,43 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_medical_records"])
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_medical = sanitize(tgui_input_text(user,"Enter medical information here.","Character Preference", html_decode(pref.med_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_medical = sanitize(input(user,"Enter medical information here.","Character Preference", html_decode(pref.med_record)) as message|null, MAX_RECORD_LENGTH, extra = 0)
|
||||
=======
|
||||
var/new_medical = sanitize(tgui_input_text(user,"Enter medical information here.","Character Preference", html_decode(pref.med_record), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH, extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!isnull(new_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
||||
pref.med_record = new_medical
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_general_records"])
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_general = sanitize(tgui_input_text(user,"Enter employment information here.","Character Preference", html_decode(pref.gen_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_general = sanitize(input(user,"Enter employment information here.","Character Preference", html_decode(pref.gen_record)) as message|null, MAX_RECORD_LENGTH, extra = 0)
|
||||
=======
|
||||
var/new_general = sanitize(tgui_input_text(user,"Enter employment information here.","Character Preference", html_decode(pref.gen_record), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH, extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!isnull(new_general) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
||||
pref.gen_record = new_general
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_security_records"])
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/sec_medical = sanitize(tgui_input_text(user,"Enter security information here.","Character Preference", html_decode(pref.sec_record), MAX_RECORD_LENGTH, TRUE), MAX_RECORD_LENGTH, extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/sec_medical = sanitize(input(user,"Enter security information here.","Character Preference", html_decode(pref.sec_record)) as message|null, MAX_RECORD_LENGTH, extra = 0)
|
||||
=======
|
||||
var/sec_medical = sanitize(tgui_input_text(user,"Enter security information here.","Character Preference", html_decode(pref.sec_record), MAX_RECORD_LENGTH, TRUE, prevent_enter = TRUE), MAX_RECORD_LENGTH, extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!isnull(sec_medical) && !jobban_isbanned(user, "Records") && CanUseTopic(user))
|
||||
pref.sec_record = sec_medical
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -59,11 +59,27 @@
|
||||
switch(href_list["flavor_text"])
|
||||
if("open")
|
||||
if("general")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/msg = sanitize(tgui_input_text(usr,"Give a general description of your character. This will be shown regardless of clothings.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
if(CanUseTopic(user))
|
||||
pref.flavor_texts[href_list["flavor_text"]] = msg
|
||||
else
|
||||
var/msg = sanitize(tgui_input_text(usr,"Set the flavor text for your [href_list["flavor_text"]].","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE), extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/msg = sanitize(input(usr,"Give a general description of your character. This will be shown regardless of clothings.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]])) as message, MAX_RECORD_LENGTH, extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
if(CanUseTopic(user))
|
||||
pref.flavor_texts[href_list["flavor_text"]] = msg
|
||||
else
|
||||
var/msg = sanitize(input(usr,"Set the flavor text for your [href_list["flavor_text"]].","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]])) as message, extra = 0)
|
||||
=======
|
||||
var/msg = sanitize(tgui_input_text(usr,"Give a general description of your character. This will be shown regardless of clothings.","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
if(CanUseTopic(user))
|
||||
pref.flavor_texts[href_list["flavor_text"]] = msg
|
||||
else
|
||||
var/msg = sanitize(tgui_input_text(usr,"Set the flavor text for your [href_list["flavor_text"]].","Flavor Text",html_decode(pref.flavor_texts[href_list["flavor_text"]]), multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(CanUseTopic(user))
|
||||
pref.flavor_texts[href_list["flavor_text"]] = msg
|
||||
SetFlavorText(user)
|
||||
@@ -73,11 +89,27 @@
|
||||
switch(href_list["flavour_text_robot"])
|
||||
if("open")
|
||||
if("Default")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/msg = sanitize(tgui_input_text(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"]), multiline = TRUE), extra = 0)
|
||||
if(CanUseTopic(user))
|
||||
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
||||
else
|
||||
var/msg = sanitize(tgui_input_text(usr,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]]), multiline = TRUE), extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/msg = sanitize(input(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"])) as message, extra = 0)
|
||||
if(CanUseTopic(user))
|
||||
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
||||
else
|
||||
var/msg = sanitize(input(usr,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]])) as message, extra = 0)
|
||||
=======
|
||||
var/msg = sanitize(tgui_input_text(usr,"Set the default flavour text for your robot. It will be used for any module without individual setting.","Flavour Text",html_decode(pref.flavour_texts_robot["Default"]), multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
if(CanUseTopic(user))
|
||||
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
||||
else
|
||||
var/msg = sanitize(tgui_input_text(usr,"Set the flavour text for your robot with [href_list["flavour_text_robot"]] module. If you leave this empty, default flavour text will be used for this module.","Flavour Text",html_decode(pref.flavour_texts_robot[href_list["flavour_text_robot"]]), multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(CanUseTopic(user))
|
||||
pref.flavour_texts_robot[href_list["flavour_text_robot"]] = msg
|
||||
SetFlavourTextRobot(user)
|
||||
|
||||
@@ -46,7 +46,15 @@
|
||||
if(t && CanUseTopic(user))
|
||||
candidate.name = t
|
||||
if("desc")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
t = tgui_input_text(user, "Enter a description for your pAI", "Global Preference", html_decode(candidate.description), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
t = input(user, "Enter a description for your pAI", "Global Preference", html_decode(candidate.description)) as message|null
|
||||
=======
|
||||
t = tgui_input_text(user, "Enter a description for your pAI", "Global Preference", html_decode(candidate.description), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!isnull(t) && CanUseTopic(user))
|
||||
candidate.description = sanitize(t)
|
||||
if("role")
|
||||
@@ -54,7 +62,15 @@
|
||||
if(!isnull(t) && CanUseTopic(user))
|
||||
candidate.role = sanitize(t)
|
||||
if("ooc")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
t = tgui_input_text(user, "Enter any OOC comments", "Global Preference", html_decode(candidate.comments), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
t = input(user, "Enter any OOC comments", "Global Preference", html_decode(candidate.comments)) as message
|
||||
=======
|
||||
t = tgui_input_text(user, "Enter any OOC comments", "Global Preference", html_decode(candidate.comments), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!isnull(t) && CanUseTopic(user))
|
||||
candidate.comments = sanitize(t)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -204,7 +204,15 @@ var/datum/gear_tweak/custom_desc/gear_tweak_free_desc = new()
|
||||
return
|
||||
if(valid_custom_desc)
|
||||
return tgui_input_list(user, "Choose an item description.", "Character Preference",valid_custom_desc, metadata)
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/san_input = sanitize(tgui_input_text(user, "Choose the item's description. Leave it blank to use the default description.", "Item Description", metadata, multiline = TRUE), extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/san_input = sanitize(input(user, "Choose the item's description. Leave it blank to use the default description.", "Item Description", metadata) as message|null, extra = 0)
|
||||
=======
|
||||
var/san_input = sanitize(tgui_input_text(user, "Choose the item's description. Leave it blank to use the default description.", "Item Description", metadata, multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
return san_input ? san_input : get_default()
|
||||
|
||||
/datum/gear_tweak/custom_desc/tweak_item(var/obj/item/I, var/metadata)
|
||||
|
||||
@@ -58,7 +58,15 @@
|
||||
pref.directory_erptag = new_erptag
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["directory_ad"])
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/msg = sanitize(tgui_input_text(user,"Write your advertisement here!", "Flavor Text", html_decode(pref.directory_ad), multiline = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/msg = sanitize(input(user,"Write your advertisement here!", "Flavor Text", html_decode(pref.directory_ad)) as message, extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
=======
|
||||
var/msg = sanitize(tgui_input_text(user,"Write your advertisement here!", "Flavor Text", html_decode(pref.directory_ad), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
pref.directory_ad = msg
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["toggle_sensor_setting"])
|
||||
|
||||
@@ -151,7 +151,15 @@ GLOBAL_DATUM(character_directory, /datum/character_directory)
|
||||
return
|
||||
|
||||
var/current_ad = usr.client.prefs.directory_ad
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_ad = sanitize(tgui_input_text(usr, "Change your character ad", "Character Ad", current_ad, multiline = TRUE), extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_ad = sanitize(input(usr, "Change your character ad", "Character Ad", current_ad) as message|null, extra = 0)
|
||||
=======
|
||||
var/new_ad = sanitize(tgui_input_text(usr, "Change your character ad", "Character Ad", current_ad, multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(isnull(new_ad))
|
||||
return
|
||||
usr.client.prefs.directory_ad = new_ad
|
||||
|
||||
@@ -439,7 +439,15 @@
|
||||
for (var/datum/data/record/R in data_core.security)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"security"))
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Sec. records", null, null, multiline = TRUE))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/t1 = sanitize(input(usr, "Add Comment:", "Sec. records", null, null) as message)
|
||||
=======
|
||||
var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Sec. records", null, null, multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
|
||||
return
|
||||
var/counter = 1
|
||||
@@ -556,7 +564,15 @@
|
||||
for (var/datum/data/record/R in data_core.medical)
|
||||
if (R.fields["id"] == E.fields["id"])
|
||||
if(hasHUD(usr,"medical"))
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Med. records", null, null, multiline = TRUE))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/t1 = sanitize(input(usr, "Add Comment:", "Med. records", null, null) as message)
|
||||
=======
|
||||
var/t1 = sanitize(tgui_input_text(usr, "Add Comment:", "Med. records", null, null, multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
|
||||
return
|
||||
var/counter = 1
|
||||
@@ -588,11 +604,27 @@
|
||||
src << browse(null, "window=flavor_changes")
|
||||
return
|
||||
if("general")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/msg = sanitize(tgui_input_text(usr,"Update the general description of your character. This will be shown regardless of clothing.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
flavor_texts[href_list["flavor_change"]] = msg
|
||||
return
|
||||
else
|
||||
var/msg = sanitize(tgui_input_text(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE), extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/msg = sanitize(input(usr,"Update the general description of your character. This will be shown regardless of clothing.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
flavor_texts[href_list["flavor_change"]] = msg
|
||||
return
|
||||
else
|
||||
var/msg = sanitize(input(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]])) as message, extra = 0)
|
||||
=======
|
||||
var/msg = sanitize(tgui_input_text(usr,"Update the general description of your character. This will be shown regardless of clothing.","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes
|
||||
flavor_texts[href_list["flavor_change"]] = msg
|
||||
return
|
||||
else
|
||||
var/msg = sanitize(tgui_input_text(usr,"Update the flavor text for your [href_list["flavor_change"]].","Flavor Text",html_decode(flavor_texts[href_list["flavor_change"]]), multiline = TRUE, prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
flavor_texts[href_list["flavor_change"]] = msg
|
||||
set_flavor()
|
||||
return
|
||||
|
||||
@@ -27,7 +27,15 @@
|
||||
set desc = "Sets OOC notes about yourself or your RP preferences or status."
|
||||
set category = "OOC"
|
||||
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_metadata = sanitize(tgui_input_text(usr, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently, only for this round.", "Game Preference" , html_decode(ooc_notes), multiline = TRUE), extra = 0)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_metadata = sanitize(input(usr, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently, only for this round.", "Game Preference" , html_decode(ooc_notes)) as message, extra = 0)
|
||||
=======
|
||||
var/new_metadata = sanitize(tgui_input_text(usr, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently, only for this round.", "Game Preference" , html_decode(ooc_notes), , prevent_enter = TRUE), extra = 0)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_metadata && CanUseTopic(usr))
|
||||
ooc_notes = new_metadata
|
||||
to_chat(usr, "OOC notes updated.")
|
||||
|
||||
@@ -73,7 +73,15 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if(t)
|
||||
candidate.name = t
|
||||
if("desc")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
t = tgui_input_text(usr, "Enter a description for your pAI", "pAI Description", candidate.description, multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
t = input(usr, "Enter a description for your pAI", "pAI Description", candidate.description) as message
|
||||
=======
|
||||
t = tgui_input_text(usr, "Enter a description for your pAI", "pAI Description", candidate.description, multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(t)
|
||||
candidate.description = sanitize(t)
|
||||
if("role")
|
||||
@@ -81,7 +89,15 @@ var/datum/paiController/paiController // Global handler for pAI candidates
|
||||
if(t)
|
||||
candidate.role = sanitize(t)
|
||||
if("ooc")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
t = tgui_input_text(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.comments, multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
t = input(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.comments) as message
|
||||
=======
|
||||
t = tgui_input_text(usr, "Enter any OOC comments", "pAI OOC Comments", candidate.comments, multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(t)
|
||||
candidate.comments = sanitize(t)
|
||||
if("save")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -263,7 +263,15 @@
|
||||
..(A,user,flag,params)
|
||||
|
||||
/obj/item/weapon/disk/nifsoft/compliance/attack_self(mob/user)
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/newlaws = tgui_input_text(user, "Please Input Laws", "Compliance Laws", laws, multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/newlaws = input(user,"Please Input Laws","Compliance Laws",laws) as message
|
||||
=======
|
||||
var/newlaws = tgui_input_text(user, "Please Input Laws", "Compliance Laws", laws, multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
newlaws = sanitize(newlaws,2048)
|
||||
if(newlaws)
|
||||
to_chat(user,"You set the laws to: <br><span class='notice'>[newlaws]</span>")
|
||||
|
||||
@@ -87,7 +87,15 @@
|
||||
to_chat(usr, "<span class='info'>There isn't enough space left on \the [src] to write anything.</span>")
|
||||
return
|
||||
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/raw_t = tgui_input_text(usr, "Enter what you want to write:", "Write", multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/raw_t = tgui_input_message(usr, "Enter what you want to write:", "Write")
|
||||
=======
|
||||
var/raw_t = tgui_input_text(usr, "Enter what you want to write:", "Write", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!raw_t)
|
||||
return
|
||||
var/t = sanitize(raw_t, free_space, extra = 0)
|
||||
|
||||
@@ -448,7 +448,15 @@
|
||||
to_chat(usr, "<span class='info'>There isn't enough space left on \the [src] to write anything.</span>")
|
||||
return
|
||||
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/raw = tgui_input_text(usr, "Enter what you want to write:", "Write", multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/raw = input(usr, "Enter what you want to write:", "Write") as null|message
|
||||
=======
|
||||
var/raw = tgui_input_text(usr, "Enter what you want to write:", "Write", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!raw)
|
||||
return
|
||||
|
||||
|
||||
@@ -62,7 +62,15 @@
|
||||
return TRUE
|
||||
switch(action)
|
||||
if("Edit")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/n = input(usr, "Please enter message", name, notehtml) as message
|
||||
=======
|
||||
var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(pda.loc == usr)
|
||||
note = adminscrub(n)
|
||||
notehtml = html_decode(note)
|
||||
|
||||
@@ -118,7 +118,11 @@
|
||||
|
||||
if("add_player_info")
|
||||
var/key = params["ckey"]
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/add = tgui_input_text(usr, "Write your comment below.", "Add Player Info", multiline = TRUE)
|
||||
=======
|
||||
var/add = tgui_input_text(usr, "Write your comment below.", "Add Player Info", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> Input Fixes
|
||||
if(!add) return
|
||||
|
||||
notes_add(key,add,usr)
|
||||
|
||||
@@ -260,7 +260,15 @@
|
||||
if(message_cooldown > world.time)
|
||||
to_chat(usr, "<span class='warning'>Please allow at least one minute to pass between announcements.</span>")
|
||||
return
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "Priority Announcement", multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement") as null|message
|
||||
=======
|
||||
var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "Priority Announcement", multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!input || message_cooldown > world.time || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
return
|
||||
if(length(input) < COMM_MSGLEN_MINIMUM)
|
||||
@@ -340,7 +348,15 @@
|
||||
var/input = sanitize(tgui_input_text(usr, "Please choose a message to transmit to [using_map.boss_short] via quantum entanglement. \
|
||||
Please be aware that this process is very expensive, and abuse will lead to... termination. \
|
||||
Transmission does not guarantee a response. \
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging", multiline = TRUE))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging") as null|message)
|
||||
=======
|
||||
There is a 30 second delay before you may send another message, be clear, full and concise.", "Central Command Quantum Messaging", multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
return
|
||||
if(length(input) < COMM_CCMSGLEN_MINIMUM)
|
||||
|
||||
@@ -180,17 +180,35 @@
|
||||
/datum/tgui/proc/send_full_update(custom_data, force)
|
||||
if(!user.client || !initialized || closing)
|
||||
return
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
if(!COOLDOWN_FINISHED(src, refresh_cooldown))
|
||||
refreshing = TRUE
|
||||
addtimer(CALLBACK(src, .proc/send_full_update), TGUI_REFRESH_FULL_UPDATE_COOLDOWN, TIMER_UNIQUE)
|
||||
return
|
||||
refreshing = FALSE
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
//if(!COOLDOWN_FINISHED(src, refresh_cooldown))
|
||||
//refreshing = TRUE
|
||||
//addtimer(CALLBACK(src, .proc/send_full_update), TGUI_REFRESH_FULL_UPDATE_COOLDOWN, TIMER_UNIQUE)
|
||||
//return
|
||||
//refreshing = FALSE
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
var/should_update_data = force || status >= STATUS_UPDATE
|
||||
window.send_message("update", get_payload(
|
||||
custom_data,
|
||||
with_data = should_update_data,
|
||||
with_static_data = TRUE))
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
COOLDOWN_START(src, refresh_cooldown, TGUI_REFRESH_FULL_UPDATE_COOLDOWN)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
//COOLDOWN_START(src, refresh_cooldown, TGUI_REFRESH_FULL_UPDATE_COOLDOWN)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
|
||||
/**
|
||||
* public
|
||||
|
||||
@@ -10,7 +10,15 @@
|
||||
* * timeout - The timeout of the alert, after which the modal will close and qdel itself. Set to zero for no timeout.
|
||||
* * autofocus - The bool that controls if this alert should grab window focus.
|
||||
*/
|
||||
<<<<<<< refs/remotes/Upstream/master:code/modules/tgui_input/alert.dm
|
||||
/proc/tgui_alert(mob/user, message = "", title, list/buttons = list("Ok"), timeout = 0, autofocus = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD:code/modules/tgui/tgui_alert.dm
|
||||
/proc/tgui_alert(mob/user, message = null, title = null, list/buttons = list("Ok"), timeout = 0)
|
||||
=======
|
||||
/proc/tgui_alert(mob/user, message = "", title, list/buttons = list("Ok"), timeout = 0, autofocus = TRUE, strict_byond = FALSE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix:code/modules/tgui_input/alert.dm
|
||||
>>>>>>> Input Fixes:code/modules/tgui/tgui_alert.dm
|
||||
if (istext(buttons))
|
||||
stack_trace("tgui_alert() received text for buttons instead of list")
|
||||
return
|
||||
@@ -25,19 +33,33 @@
|
||||
user = client.mob
|
||||
else
|
||||
return
|
||||
<<<<<<< refs/remotes/Upstream/master:code/modules/tgui_input/alert.dm
|
||||
=======
|
||||
<<<<<<< HEAD:code/modules/tgui/tgui_alert.dm
|
||||
var/datum/tgui_alert/alert = new(user, message, title, buttons, timeout)
|
||||
=======
|
||||
>>>>>>> Input Fixes:code/modules/tgui/tgui_alert.dm
|
||||
// A gentle nudge - you should not be using TGUI alert for anything other than a simple message.
|
||||
if(length(buttons) > 3)
|
||||
log_tgui(user, "Error: TGUI Alert initiated with too many buttons. Use a list.", "TguiAlert")
|
||||
return tgui_input_list(user, message, title, buttons, timeout, autofocus)
|
||||
|
||||
// Client does NOT have tgui_input on: Returns regular input
|
||||
<<<<<<< refs/remotes/Upstream/master:code/modules/tgui_input/alert.dm
|
||||
if(!usr.client.prefs.tgui_input_mode)
|
||||
=======
|
||||
if(!usr.client.prefs.tgui_input_mode || strict_byond)
|
||||
>>>>>>> Input Fixes:code/modules/tgui/tgui_alert.dm
|
||||
if(length(buttons) == 2)
|
||||
return alert(user, message, title, buttons[1], buttons[2])
|
||||
if(length(buttons) == 3)
|
||||
return alert(user, message, title, buttons[1], buttons[2], buttons[3])
|
||||
|
||||
var/datum/tgui_alert/alert = new(user, message, title, buttons, timeout, autofocus)
|
||||
<<<<<<< refs/remotes/Upstream/master:code/modules/tgui_input/alert.dm
|
||||
=======
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix:code/modules/tgui_input/alert.dm
|
||||
>>>>>>> Input Fixes:code/modules/tgui/tgui_alert.dm
|
||||
alert.tgui_interact(user)
|
||||
alert.wait()
|
||||
if (alert)
|
||||
|
||||
@@ -15,7 +15,11 @@
|
||||
* * timeout - The timeout of the number input, after which the modal will close and qdel itself. Set to zero for no timeout.
|
||||
* * round_value - whether the inputted number is rounded down into an integer.
|
||||
*/
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
/proc/tgui_input_number(mob/user, message, title = "Number Input", default = 0, max_value = 10000, min_value = 0, timeout = 0, round_value = TRUE)
|
||||
=======
|
||||
/proc/tgui_input_number(mob/user, message, title = "Number Input", default = 0, max_value = INFINITY, min_value = -INFINITY, timeout = 0, round_value = FALSE)
|
||||
>>>>>>> Input Fixes
|
||||
if (!user)
|
||||
user = usr
|
||||
if (!istype(user))
|
||||
@@ -135,7 +139,12 @@
|
||||
if("submit")
|
||||
if(!isnum(params["entry"]))
|
||||
CRASH("A non number was input into tgui input number by [usr]")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/choice = round_value ? round(params["entry"]) : params["entry"]
|
||||
=======
|
||||
//var/choice = round_value ? round(params["entry"]) : params["entry"]
|
||||
var/choice = params["entry"]
|
||||
>>>>>>> Input Fixes
|
||||
if(choice > max_value)
|
||||
CRASH("A number greater than the max value was input into tgui input number by [usr]")
|
||||
if(choice < min_value)
|
||||
@@ -163,8 +172,14 @@
|
||||
* * default - The default value pre-populated in the input box.
|
||||
* * callback - The callback to be invoked when a choice is made.
|
||||
* * timeout - The timeout of the input box, after which the menu will close and qdel itself. Set to zero for no timeout.
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
*/
|
||||
/proc/tgui_input_number_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS)
|
||||
=======
|
||||
* * round_value - whether the inputted number is rounded down into an integer.
|
||||
*/
|
||||
/proc/tgui_input_number_async(mob/user, message, title, default, datum/callback/callback, timeout = 60 SECONDS, round_value = FALSE)
|
||||
>>>>>>> Input Fixes
|
||||
if (istext(user))
|
||||
stack_trace("tgui_input_num_async() received text for user instead of mob")
|
||||
return
|
||||
@@ -176,7 +191,11 @@
|
||||
user = client.mob
|
||||
else
|
||||
return
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/datum/tgui_input_number/async/input = new(user, message, title, default, callback, timeout)
|
||||
=======
|
||||
var/datum/tgui_input_number/async/input = new(user, message, title, default, callback, timeout, round_value)
|
||||
>>>>>>> Input Fixes
|
||||
input.tgui_interact(user)
|
||||
|
||||
/**
|
||||
@@ -188,8 +207,13 @@
|
||||
/// The callback to be invoked by the tgui_text_input upon having a choice made.
|
||||
var/datum/callback/callback
|
||||
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
/datum/tgui_input_number/async/New(mob/user, message, title, default, callback, timeout)
|
||||
..(user, title, message, default, timeout)
|
||||
=======
|
||||
/datum/tgui_input_number/async/New(mob/user, message, title, default, callback, timeout, round_value)
|
||||
..(user, title, message, default, timeout, round_value)
|
||||
>>>>>>> Input Fixes
|
||||
src.callback = callback
|
||||
|
||||
/datum/tgui_input_number/async/Destroy(force, ...)
|
||||
|
||||
@@ -10,12 +10,20 @@
|
||||
* * message - The content of the text input, shown in the body of the TGUI window.
|
||||
* * title - The title of the text input modal, shown on the top of the TGUI window.
|
||||
* * default - The default (or current) value, shown as a placeholder.
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
* * max_length - Specifies a max length for input. MAX_MESSAGE_LEN is default (1024)
|
||||
=======
|
||||
* * max_length - Specifies a max length for input. MAX_MESSAGE_LEN is default (4096)
|
||||
>>>>>>> Input Fixes
|
||||
* * multiline - Bool that determines if the input box is much larger. Good for large messages, laws, etc.
|
||||
* * encode - Toggling this determines if input is filtered via html_encode. Setting this to FALSE gives raw input.
|
||||
* * timeout - The timeout of the textbox, after which the modal will close and qdel itself. Set to zero for no timeout.
|
||||
*/
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
/proc/tgui_input_text(mob/user, message = "", title = "Text Input", default, max_length = MAX_MESSAGE_LEN, multiline = FALSE, encode = FALSE, timeout = 0)
|
||||
=======
|
||||
/proc/tgui_input_text(mob/user, message = "", title = "Text Input", default, max_length = INFINITY, multiline = FALSE, encode = FALSE, timeout = 0, prevent_enter = FALSE)
|
||||
>>>>>>> Input Fixes
|
||||
if (istext(user))
|
||||
stack_trace("tgui_input_text() received text for user instead of mob")
|
||||
return
|
||||
@@ -39,7 +47,11 @@
|
||||
return input(user, message, title, default) as message|null
|
||||
else
|
||||
return input(user, message, title, default) as text|null
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/datum/tgui_input_text/text_input = new(user, message, title, default, max_length, multiline, encode, timeout)
|
||||
=======
|
||||
var/datum/tgui_input_text/text_input = new(user, message, title, default, max_length, multiline, encode, timeout, prevent_enter)
|
||||
>>>>>>> Input Fixes
|
||||
text_input.tgui_interact(user)
|
||||
text_input.wait()
|
||||
if (text_input)
|
||||
@@ -74,7 +86,13 @@
|
||||
/// The title of the TGUI window
|
||||
var/title
|
||||
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
/datum/tgui_input_text/New(mob/user, message, title, default, max_length, multiline, encode, timeout)
|
||||
=======
|
||||
var/prevent_enter
|
||||
|
||||
/datum/tgui_input_text/New(mob/user, message, title, default, max_length, multiline, encode, timeout, prevent_enter)
|
||||
>>>>>>> Input Fixes
|
||||
src.default = default
|
||||
src.encode = encode
|
||||
src.max_length = max_length
|
||||
@@ -85,6 +103,10 @@
|
||||
src.timeout = timeout
|
||||
start_time = world.time
|
||||
QDEL_IN(src, timeout)
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
=======
|
||||
src.prevent_enter = prevent_enter
|
||||
>>>>>>> Input Fixes
|
||||
|
||||
/datum/tgui_input_text/Destroy(force, ...)
|
||||
SStgui.close_uis(src)
|
||||
@@ -120,6 +142,10 @@
|
||||
data["placeholder"] = default // Default is a reserved keyword
|
||||
data["swapped_buttons"] = !usr.client.prefs.tgui_swapped_buttons
|
||||
data["title"] = title
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
=======
|
||||
data["prevent_enter"] = prevent_enter
|
||||
>>>>>>> Input Fixes
|
||||
return data
|
||||
|
||||
/datum/tgui_input_text/tgui_data(mob/user)
|
||||
|
||||
@@ -705,7 +705,7 @@
|
||||
var/list/available_options = list("Examine", "Eject", "Move")
|
||||
if(ishuman(target))
|
||||
available_options += "Transform"
|
||||
intent = tgui_alert(user, "What would you like to do with [target]?", "Vore Pick", available_options)
|
||||
intent = tgui_alert(user, "What would you like to do with [target]?", "Vore Pick", available_options, strict_byond = TRUE)
|
||||
switch(intent)
|
||||
if("Examine")
|
||||
var/list/results = target.examine(host)
|
||||
@@ -833,7 +833,15 @@
|
||||
host.vore_selected.egg_type = new_egg_type
|
||||
. = TRUE
|
||||
if("b_desc")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_desc = html_encode(tgui_input_text(usr,"Belly Description, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc, multiline = TRUE))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_desc = html_encode(input(usr,"Belly Description, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc) as message|null)
|
||||
=======
|
||||
var/new_desc = html_encode(tgui_input_text(usr,"Belly Description, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.desc, multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
|
||||
if(new_desc)
|
||||
new_desc = readd_quotes(new_desc)
|
||||
@@ -843,7 +851,15 @@
|
||||
host.vore_selected.desc = new_desc
|
||||
. = TRUE
|
||||
if("b_absorbed_desc")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_desc = html_encode(tgui_input_text(usr,"Belly Description for absorbed prey, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.absorbed_desc, multiline = TRUE))
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_desc = html_encode(input(usr,"Belly Description for absorbed prey, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.absorbed_desc) as message|null)
|
||||
=======
|
||||
var/new_desc = html_encode(tgui_input_text(usr,"Belly Description for absorbed prey, '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. ([BELLIES_DESC_MAX] char limit):","New Description",host.vore_selected.absorbed_desc, multiline = TRUE, prevent_enter = TRUE))
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
|
||||
if(new_desc)
|
||||
new_desc = readd_quotes(new_desc)
|
||||
@@ -857,62 +873,155 @@
|
||||
var/help = " Press enter twice to separate messages. '%pred' will be replaced with your name. '%prey' will be replaced with the prey's name. '%belly' will be replaced with your belly's name. '%count' will be replaced with the number of anything in your belly. '%countprey' will be replaced with the number of living prey in your belly."
|
||||
switch(params["msgtype"])
|
||||
if("dmp")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when they expire. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Digest Message (to prey)",host.vore_selected.get_messages("dmp"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"dmp")
|
||||
|
||||
if("dmo")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to you when prey expires in you. Write them in 2nd person ('you feel X'). Avoid using %pred in this type."+help,"Digest Message (to you)",host.vore_selected.get_messages("dmo"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"dmo")
|
||||
|
||||
if("amp")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when their absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("amp"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey when their absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("amp")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when their absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("amp"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"amp")
|
||||
|
||||
if("amo")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to you when prey's absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("amo"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to you when prey's absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("amo")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to you when prey's absorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("amo"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"amo")
|
||||
|
||||
if("uamp")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when their unnabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("uamp"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey when their unnabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("uamp")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when their unnabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to prey)",host.vore_selected.get_messages("uamp"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"uamp")
|
||||
|
||||
if("uamo")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to you when prey's unabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("uamo"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to you when prey's unabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("uamo")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to you when prey's unabsorption finishes. Write them in 2nd person ('you feel X'). Avoid using %pred in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Digest Message (to you)",host.vore_selected.get_messages("uamo"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"uamo")
|
||||
|
||||
if("smo")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to those nearby when prey struggles. Write them in 3rd person ('X's Y bulges')."+help,"Struggle Message (outside)",host.vore_selected.get_messages("smo"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"smo")
|
||||
|
||||
if("smi")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type."+help,"Struggle Message (inside)",host.vore_selected.get_messages("smi"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"smi")
|
||||
|
||||
if("asmo")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to those nearby when absorbed prey struggles. Write them in 3rd person ('X's Y bulges'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (outside)",host.vore_selected.get_messages("asmo"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to those nearby when absorbed prey struggles. Write them in 3rd person ('X's Y bulges'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (outside)",host.vore_selected.get_messages("asmo")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to those nearby when absorbed prey struggles. Write them in 3rd person ('X's Y bulges'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (outside)",host.vore_selected.get_messages("asmo"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"asmo")
|
||||
|
||||
if("asmi")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to absorbed prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (inside)",host.vore_selected.get_messages("asmi"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to absorbed prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (inside)",host.vore_selected.get_messages("asmi")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to absorbed prey when they struggle. Write them in 2nd person ('you feel X'). Avoid using %prey in this type. %count will not work for this type, and %countprey will only count absorbed victims."+help,"Struggle Message (inside)",host.vore_selected.get_messages("asmi"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"asmi")
|
||||
|
||||
if("em")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to people who examine you when this belly has contents. Write them in 3rd person ('Their %belly is bulging')."+help,"Examine Message (when full)",host.vore_selected.get_messages("em"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"em")
|
||||
|
||||
if("ema")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to people who examine you when this belly has absorbed victims. Write them in 3rd person ('Their %belly is larger'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Examine Message (with absorbed victims)",host.vore_selected.get_messages("ema"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to people who examine you when this belly has absorbed victims. Write them in 3rd person ('Their %belly is larger'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Examine Message (with absorbed victims)",host.vore_selected.get_messages("ema")) as message
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"ema")
|
||||
|
||||
@@ -943,57 +1052,175 @@
|
||||
host.weight_messages[index] = new_message
|
||||
|
||||
if("im_digest")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Digest mode. Write them in 2nd person ('%pred's %belly squishes down on you.')."+help,"Idle Message (Digest)",host.vore_selected.get_messages("im_digest"), multiline = TRUE)
|
||||
=======
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Digest mode. Write them in 2nd person ('%pred's %belly squishes down on you.')."+help,"Idle Message (Digest)",host.vore_selected.get_messages("im_digest")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to people who examine you when this belly has absorbed victims. Write them in 3rd person ('Their %belly is larger'). %count will not work for this type, and %countprey will only count absorbed victims."+help,"Examine Message (with absorbed victims)",host.vore_selected.get_messages("ema"), multiline = TRUE, prevent_enter = TRUE)
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"ema")
|
||||
|
||||
if("en")
|
||||
var/list/indices = list(1,2,3,4,5,6,7,8,9,10)
|
||||
var/index = tgui_input_list(user,"Select a message to edit:","Select Message", indices)
|
||||
if(index && index <= 10)
|
||||
var/alert = tgui_alert(user, "What do you wish to do with this message?","Selection",list("Edit","Clear","Cancel"))
|
||||
switch(alert)
|
||||
if("Clear")
|
||||
host.nutrition_messages[index] = ""
|
||||
if("Edit")
|
||||
var/new_message = tgui_input_text(user, "Input a message", "Input", host.nutrition_messages[index], multiline = TRUE, prevent_enter = TRUE)
|
||||
if(new_message)
|
||||
host.nutrition_messages[index] = new_message
|
||||
|
||||
if("ew")
|
||||
var/list/indices = list(1,2,3,4,5,6,7,8,9,10)
|
||||
var/index = tgui_input_list(user,"Select a message to edit:","Select Message", indices)
|
||||
if(index && index <= 10)
|
||||
var/alert = tgui_alert(user, "What do you wish to do with this message?","Selection",list("Edit","Clear","Cancel"))
|
||||
switch(alert)
|
||||
if("Clear")
|
||||
host.weight_messages[index] = ""
|
||||
if("Edit")
|
||||
var/new_message = tgui_input_text(user, "Input a message", "Input", host.weight_messages[index], multiline = TRUE, prevent_enter = TRUE)
|
||||
if(new_message)
|
||||
host.weight_messages[index] = new_message
|
||||
|
||||
if("im_digest")
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Digest mode. Write them in 2nd person ('%pred's %belly squishes down on you.')."+help,"Idle Message (Digest)",host.vore_selected.get_messages("im_digest"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_digest")
|
||||
|
||||
if("im_hold")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Hold mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Hold)",host.vore_selected.get_messages("im_hold"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Hold mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Hold)",host.vore_selected.get_messages("im_hold")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Hold mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Hold)",host.vore_selected.get_messages("im_hold"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_hold")
|
||||
|
||||
if("im_holdabsorbed")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are absorbed. Write them in 2nd person ('%pred's %belly squishes down on you.') %count will not work for this type, and %countprey will only count absorbed victims."+help,"Idle Message (Hold Absorbed)",host.vore_selected.get_messages("im_holdabsorbed"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are absorbed. Write them in 2nd person ('%pred's %belly squishes down on you.') %count will not work for this type, and %countprey will only count absorbed victims."+help,"Idle Message (Hold Absorbed)",host.vore_selected.get_messages("im_holdabsorbed")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are absorbed. Write them in 2nd person ('%pred's %belly squishes down on you.') %count will not work for this type, and %countprey will only count absorbed victims."+help,"Idle Message (Hold Absorbed)",host.vore_selected.get_messages("im_holdabsorbed"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_holdabsorbed")
|
||||
|
||||
if("im_absorb")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Absorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Absorb)",host.vore_selected.get_messages("im_absorb"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Absorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Absorb)",host.vore_selected.get_messages("im_absorb")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Absorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Absorb)",host.vore_selected.get_messages("im_absorb"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_absorb")
|
||||
|
||||
if("im_heal")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Heal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Heal)",host.vore_selected.get_messages("im_heal"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Heal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Heal)",host.vore_selected.get_messages("im_heal")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Heal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Heal)",host.vore_selected.get_messages("im_heal"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_heal")
|
||||
|
||||
if("im_drain")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Drain mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Drain)",host.vore_selected.get_messages("im_drain"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Drain mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Drain)",host.vore_selected.get_messages("im_drain")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Drain mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Drain)",host.vore_selected.get_messages("im_drain"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_drain")
|
||||
|
||||
if("im_steal")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Size Steal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Size Steal)",host.vore_selected.get_messages("im_steal"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Size Steal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Size Steal)",host.vore_selected.get_messages("im_steal")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Size Steal mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Size Steal)",host.vore_selected.get_messages("im_steal"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_steal")
|
||||
|
||||
if("im_egg")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Encase In Egg mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Encase In Egg)",host.vore_selected.get_messages("im_egg"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Encase In Egg mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Encase In Egg)",host.vore_selected.get_messages("im_egg")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Encase In Egg mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Encase In Egg)",host.vore_selected.get_messages("im_egg"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_egg")
|
||||
|
||||
if("im_shrink")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Shrink mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Shrink)",host.vore_selected.get_messages("im_shrink"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Shrink mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Shrink)",host.vore_selected.get_messages("im_shrink")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Shrink mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Shrink)",host.vore_selected.get_messages("im_shrink"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_shrink")
|
||||
|
||||
if("im_grow")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Grow mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Grow)",host.vore_selected.get_messages("im_grow"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Grow mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Grow)",host.vore_selected.get_messages("im_grow")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Grow mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Grow)",host.vore_selected.get_messages("im_grow"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_grow")
|
||||
|
||||
if("im_unabsorb")
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Unabsorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Unabsorb)",host.vore_selected.get_messages("im_unabsorb"), multiline = TRUE)
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
var/new_message = input(user,"These are sent to prey every minute when you are on Unabsorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Unabsorb)",host.vore_selected.get_messages("im_unabsorb")) as message
|
||||
=======
|
||||
var/new_message = tgui_input_text(user,"These are sent to prey every minute when you are on Unabsorb mode. Write them in 2nd person ('%pred's %belly squishes down on you.')"+help,"Idle Message (Unabsorb)",host.vore_selected.get_messages("im_unabsorb"), multiline = TRUE, prevent_enter = TRUE)
|
||||
>>>>>>> 9f14866f07... Merge pull request #13135 from ItsSelis/tgui-input-framework-hotfix
|
||||
>>>>>>> Input Fixes
|
||||
if(new_message)
|
||||
host.vore_selected.set_messages(new_message,"im_unabsorb")
|
||||
|
||||
|
||||
@@ -18,7 +18,12 @@ const getClampedNumber = (value, minValue, maxValue) => {
|
||||
if (!value || !value.length) {
|
||||
return String(minimum);
|
||||
}
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
let parsedValue = parseInt(value.replace(/\D/g, ''), 10);
|
||||
=======
|
||||
// let parsedValue = parseInt(value.replace(/\D/g, ''), 10);
|
||||
let parsedValue = parseFloat(value);
|
||||
>>>>>>> Input Fixes
|
||||
if (isNaN(parsedValue)) {
|
||||
return String(minimum);
|
||||
} else {
|
||||
|
||||
@@ -12,6 +12,10 @@ type TextInputData = {
|
||||
placeholder: string;
|
||||
timeout: number;
|
||||
title: string;
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
=======
|
||||
prevent_enter: boolean;
|
||||
>>>>>>> Input Fixes
|
||||
};
|
||||
|
||||
export const TextInputModal = (_, context) => {
|
||||
@@ -24,6 +28,10 @@ export const TextInputModal = (_, context) => {
|
||||
placeholder,
|
||||
timeout,
|
||||
title,
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
=======
|
||||
prevent_enter,
|
||||
>>>>>>> Input Fixes
|
||||
} = data;
|
||||
const [input, setInput] = useLocalState<string>(
|
||||
context,
|
||||
@@ -49,8 +57,15 @@ export const TextInputModal = (_, context) => {
|
||||
<Window.Content
|
||||
onEscape={() => act('cancel')}
|
||||
onEnter={(event) => {
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
act('submit', { entry: input });
|
||||
event.preventDefault();
|
||||
=======
|
||||
if (!prevent_enter) {
|
||||
act('submit', { entry: input });
|
||||
event.preventDefault();
|
||||
}
|
||||
>>>>>>> Input Fixes
|
||||
}}>
|
||||
<Section fill>
|
||||
<Stack fill vertical>
|
||||
@@ -76,7 +91,11 @@ export const TextInputModal = (_, context) => {
|
||||
/** Gets the user input and invalidates if there's a constraint. */
|
||||
const InputArea = (props, context) => {
|
||||
const { act, data } = useBackend<TextInputData>(context);
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
const { max_length, multiline } = data;
|
||||
=======
|
||||
const { max_length, multiline, prevent_enter } = data;
|
||||
>>>>>>> Input Fixes
|
||||
const { input, onType } = props;
|
||||
|
||||
return (
|
||||
@@ -87,8 +106,15 @@ const InputArea = (props, context) => {
|
||||
maxLength={max_length}
|
||||
onEscape={() => act('cancel')}
|
||||
onEnter={(event) => {
|
||||
<<<<<<< refs/remotes/Upstream/master
|
||||
act('submit', { entry: input });
|
||||
event.preventDefault();
|
||||
=======
|
||||
if (!prevent_enter) {
|
||||
act('submit', { entry: input });
|
||||
event.preventDefault();
|
||||
}
|
||||
>>>>>>> Input Fixes
|
||||
}}
|
||||
onInput={(_, value) => onType(value)}
|
||||
placeholder="Type something..."
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user