[unsolvable] Custom dialog close() on space/left_click
Moderator: Forum Moderators
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
[unsolvable] Custom dialog close() on space/left_click
Hi,
How to close my custom dialog, when >space< or >left_mouse_button< is pressed?
How to close my custom dialog, when >space< or >left_mouse_button< is pressed?
Last edited by ZombieKnight on April 20th, 2024, 5:53 am, edited 2 times in total.
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Celtic_Minstrel
- Developer
- Posts: 2274
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Custom dialog close() on space/left_click
I'm not quite sure if this will work, but you could try this:
Completely hypothetical and untested. I'm not even sure if a close() function exists.
Code: Select all
local function pre_show(dialog)
dialog.on_left_click = function() dialog:close() end
end
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Custom dialog close() on space/left_click
close() exists,
Code doesn't work.(it runs like if dialog.on_left_click = "")
What about >space<?, that's more important to me
Code doesn't work.(it runs like if dialog.on_left_click = "")
What about >space<?, that's more important to me
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills
- Celtic_Minstrel
- Developer
- Posts: 2274
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Custom dialog close() on space/left_click
Sorry, that one I'm not sure about.
- ZombieKnight
- Posts: 250
- Joined: June 27th, 2022, 2:26 pm
- Location: Czech Republic
Re: Custom dialog close() on space/left_click
I'm not good in lua enought ...
Any ideas?
Any ideas?
I had saurian in profile before, but I've merged my discord profile with forum one...
Working on campaign Bandits from Brown Hills
Working on campaign Bandits from Brown Hills