[closed] How to dialog:close() when >space< is typed into the text_box

Discussion of Lua and LuaWML support, development, and ideas.

Moderator: Forum Moderators

Post Reply
User avatar
ZombieKnight
Posts: 216
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

[closed] How to dialog:close() when >space< is typed into the text_box

Post by ZombieKnight »

Hi
How to dialog:close() when >space< is typed into the text_box?
Thanks <3
Last edited by ZombieKnight on April 27th, 2024, 1:26 pm, edited 1 time in total.
I had saurian in profile before, but I've merged my discord profile with forum one...
User avatar
Celtic_Minstrel
Developer
Posts: 2255
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: How to dialog:close() when >space< is typed into the text_box

Post by Celtic_Minstrel »

I'm pretty sure you posted the method you tried in the previous thread. Why is it not in this post?
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
ZombieKnight
Posts: 216
Joined: June 27th, 2022, 2:26 pm
Location: Czech Republic

Re: How to dialog:close() when >space< is typed into the text_box

Post by ZombieKnight »

Oh, dumb me

Code: Select all

dialog.test_text.on_modified = function()
			if dialog.test_text.text == " " then dialog:close() end
   			dialog.test_text.text =""
		end
I had saurian in profile before, but I've merged my discord profile with forum one...
Post Reply