mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
feat: 'edited' property reset & add 'oncontrolkey' textbox callback
This commit is contained in:
parent
fb18442322
commit
3a4b334d0b
14 changed files with 88 additions and 5 deletions
|
|
@ -57,6 +57,7 @@
|
|||
padding='5'
|
||||
multiline='true'
|
||||
line-numbers='true'
|
||||
oncontrolkey='on_control_combination'
|
||||
syntax='lua'
|
||||
size-func="-1,40"
|
||||
text-wrap='false'
|
||||
|
|
|
|||
|
|
@ -81,6 +81,12 @@ local function refresh_file_title()
|
|||
..(edited and ' *' or '')
|
||||
end
|
||||
|
||||
function on_control_combination(keycode)
|
||||
if keycode == input.keycode("s") then
|
||||
save_current_file()
|
||||
end
|
||||
end
|
||||
|
||||
function unlock_access()
|
||||
if current_file.filename == "" then
|
||||
return
|
||||
|
|
@ -102,6 +108,7 @@ function save_current_file()
|
|||
current_file.modified = false
|
||||
document.saveIcon.enabled = false
|
||||
document.title.text = gui.str('File')..' - '..current_file.filename
|
||||
document.editor.edited = false
|
||||
end
|
||||
|
||||
function open_file_in_editor(filename, line, mutable)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue