diff --git a/build_info.matthias_build b/build_info.matthias_build index 7ccbe9b0..c2b95373 100644 --- a/build_info.matthias_build +++ b/build_info.matthias_build @@ -1 +1 @@ -2024.07.29. 10:22 \ No newline at end of file +2024.07.29. 12:35 \ No newline at end of file diff --git a/src/app.rs b/src/app.rs index 5f7b979b..29fb07c1 100644 --- a/src/app.rs +++ b/src/app.rs @@ -69,13 +69,13 @@ impl eframe::App for backend::Application { fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { /* TODOS: TODO: Migrate to latest egui https://github.com/emilk/egui/issues/4306 - TODO: add notfications + TODO: add egui notfications TODO: Restructure files TODO: Api docs TODO: Implement callbacks - TODO: Create nice ui for voice calls - */ + + */ //Set global lua table before everything //Slows down app diff --git a/src/app/lua.rs b/src/app/lua.rs index b3cae48d..c1103d97 100644 --- a/src/app/lua.rs +++ b/src/app/lua.rs @@ -14,20 +14,27 @@ pub fn execute_code(lua: &Lua, code: String) -> anyhow::Result<()> { Ok(()) } +/// This struct holds all the information of an extension #[derive(Clone, Default, Debug, serde::Deserialize, serde::Serialize)] pub struct ExtensionProperties { + /// The contents of said extension (This is plain text as its a .lua script) pub contents: String, + /// The name of the extension pub name: String, + /// If the extension is running pub is_running: bool, + /// The path to this extension pub path_to_extension: PathBuf, + /// The buffer of the texteditor to this extension pub text_edit_buffer: String, } impl ExtensionProperties { + /// Create a new instance of an extension pub fn new(contents: String, path: PathBuf, name: String) -> Self { Self { text_edit_buffer: contents.clone(), @@ -38,6 +45,8 @@ impl ExtensionProperties { } } + /// Write changes to the file + /// This writes the ```self.text_edit_buffer``` to the file itself pub fn write_change_to_file(&mut self) -> anyhow::Result<()> { fs::write( self.path_to_extension.clone(), @@ -50,6 +59,7 @@ impl ExtensionProperties { } } +/// This enum contains all the types of lua outputs #[derive(Clone, Debug, serde::Deserialize, serde::Serialize)] pub enum LuaOutput { /// This enum type is used to report code panics (In the lua runtime)