Pixel-Composer/objects/o_dialog_file_name/Create_0.gml

32 lines
546 B
Plaintext
Raw Normal View History

2022-01-13 05:24:03 +01:00
/// @description init
event_inherited();
#region data
2022-11-03 11:44:49 +01:00
dialog_w = ui(240);
dialog_h = ui(48);
2022-01-13 05:24:03 +01:00
destroy_on_click_out = true;
path = "";
2022-12-10 05:06:01 +01:00
name = "New file";
2022-01-13 05:24:03 +01:00
#endregion
#region text
onModify = -1;
tb_name = new textBox(TEXTBOX_INPUT.text, function(txt) {
while(string_char_at(txt, 1) == " ") {
txt = string_copy(txt, 2, string_length(txt) - 1);
}
onModify(path + txt);
instance_destroy();
});
2024-05-29 04:41:08 +02:00
function setName(_name) {
self.name = _name;
return self;
}
2023-01-17 08:11:55 +01:00
WIDGET_CURRENT = tb_name;
2022-12-12 09:08:03 +01:00
KEYBOARD_STRING = "";
2022-01-13 05:24:03 +01:00
#endregion