JsonFileOutput -> TextData
This commit is contained in:
parent
a90a07530a
commit
03e7105ee9
@ -1,7 +1,7 @@
|
||||
use crate::consts::*;
|
||||
use crate::function_entry::Riemann;
|
||||
use crate::function_manager::Manager;
|
||||
use crate::misc::{dyn_mut_iter, option_vec_printer, JsonFileOutput, SerdeValueHelper};
|
||||
use crate::misc::{dyn_mut_iter, option_vec_printer, SerdeValueHelper, TextData};
|
||||
use egui::style::Margin;
|
||||
use egui::Frame;
|
||||
use egui::{
|
||||
@ -113,7 +113,8 @@ pub struct MathApp {
|
||||
/// Stores opened windows/elements for later reference
|
||||
opened: Opened,
|
||||
|
||||
text: JsonFileOutput,
|
||||
/// Stores loaded text data from `test.json`
|
||||
text: TextData,
|
||||
|
||||
/// Stores settings (pretty self-explanatory)
|
||||
settings: AppSettings,
|
||||
@ -157,7 +158,7 @@ impl MathApp {
|
||||
let mut font_emoji_icon: Option<FontData> = None;
|
||||
|
||||
// Stores text
|
||||
let mut text_data: Option<JsonFileOutput> = None;
|
||||
let mut text_data: Option<TextData> = None;
|
||||
|
||||
tracing::info!("Reading assets...");
|
||||
// Iterate through all entries in the tarball
|
||||
|
||||
@ -182,7 +182,7 @@ impl EguiHelper for Vec<EguiValue> {
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub struct JsonFileOutput {
|
||||
pub struct TextData {
|
||||
pub help_expr: String,
|
||||
pub help_vars: String,
|
||||
pub help_panel: String,
|
||||
@ -220,8 +220,8 @@ impl SerdeValueHelper {
|
||||
fn parse_singleline(&self, key: &str) -> String { self.value[key].as_str().unwrap().to_owned() }
|
||||
|
||||
/// Used to parse `text.json`
|
||||
pub fn parse_values(&self) -> JsonFileOutput {
|
||||
JsonFileOutput {
|
||||
pub fn parse_values(&self) -> TextData {
|
||||
TextData {
|
||||
help_expr: self.parse_multiline("help_expr"),
|
||||
help_vars: self.parse_multiline("help_vars"),
|
||||
help_panel: self.parse_multiline("help_panel"),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user