Feat: documentation, UI/UX

This commit is contained in:
2026-03-01 19:09:52 +01:00
parent ecb559e556
commit db44f9b98e
57 changed files with 1531 additions and 615 deletions

View File

@@ -1,4 +1,4 @@
use std::cell::{Cell, RefCell};
use std::cell::Cell;
use std::ops::RangeInclusive;
use cagire_ratatui::Editor;
@@ -101,20 +101,11 @@ pub struct EditorContext {
pub editor: Editor,
pub selection_anchor: Option<usize>,
pub copied_steps: Option<CopiedSteps>,
pub show_stack: bool,
pub stack_cache: RefCell<Option<StackCache>>,
pub target: EditorTarget,
pub steps_per_page: Cell<usize>,
pub mouse_selecting: bool,
}
#[derive(Clone)]
pub struct StackCache {
pub cursor_line: usize,
pub lines_hash: u64,
pub result: String,
}
#[derive(Clone)]
pub struct CopiedSteps {
pub bank: usize,
@@ -153,8 +144,6 @@ impl Default for EditorContext {
editor: Editor::new(),
selection_anchor: None,
copied_steps: None,
show_stack: false,
stack_cache: RefCell::new(None),
target: EditorTarget::default(),
steps_per_page: Cell::new(32),
mouse_selecting: false,
@@ -164,8 +153,6 @@ impl Default for EditorContext {
pub struct ScriptEditorState {
pub editor: Editor,
pub show_stack: bool,
pub stack_cache: RefCell<Option<StackCache>>,
pub dirty: bool,
pub focused: bool,
pub mouse_selecting: bool,
@@ -175,8 +162,6 @@ impl Default for ScriptEditorState {
fn default() -> Self {
Self {
editor: Editor::new(),
show_stack: false,
stack_cache: RefCell::new(None),
dirty: false,
focused: true,
mouse_selecting: false,