From 64e23a3455ef1e71786c4b3a835a91954e08ab79 Mon Sep 17 00:00:00 2001 From: Physick <96335032+DegustatorPonos@users.noreply.github.com> Date: Sat, 11 Jul 2026 17:57:38 +0500 Subject: Editor position work --- src/scenes/puzzleScene.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/scenes/puzzleScene.c') diff --git a/src/scenes/puzzleScene.c b/src/scenes/puzzleScene.c index d49b530..9f7b4d7 100644 --- a/src/scenes/puzzleScene.c +++ b/src/scenes/puzzleScene.c @@ -8,7 +8,6 @@ typedef struct { Puzzle *PuzzlePtr; TextArea *EditorInfo; int scroll; - int editor_scroll; } puzzleSceneData; const int HEADER_FONT_SIZE = 50; @@ -67,9 +66,9 @@ bool drawPuzzleScene(void *self) { DrawPuzzleName(data->PuzzlePtr->Name); Rectangle body = GetBodyRect(); - DrawRecBordered(body, WHITE, COLORSCHEME_ORANGE, BORDER); - DrawTextArea(data->EditorInfo, body, GetMonoFont(), 20, 2, &data->editor_scroll); - return true; + // DrawRecBordered(body, WHITE, COLORSCHEME_ORANGE, BORDER); + // DrawTextArea(data->EditorInfo, body, GetMonoFont(), 20, 2, &data->editor_scroll); + // return true; Rectangle pane1, pane2; GetPanesSplit(&pane1, &pane2, body, 0.5, 0.4); @@ -78,7 +77,7 @@ bool drawPuzzleScene(void *self) { DrawTextInRec(pane1, data->PuzzlePtr->Description, GetMainFont(), 20, COLORSCHEME_BROWN, 3, &data->scroll); - DrawTextArea(data->EditorInfo, pane2, GetMonoFont(), 20, 2, &data->editor_scroll); + DrawTextArea(data->EditorInfo, pane2); return true; } @@ -106,7 +105,17 @@ Scene *CreatePuzzleScene(Puzzle *puzzle) { puzzleSceneData *data = malloc(sizeof(puzzleSceneData)); data->PuzzlePtr = puzzle; - data->EditorInfo = CreateTextArea(); + + TextAreaDisplayParams *EditorDisplayParams = malloc(sizeof(TextAreaDisplayParams)); + if (EditorDisplayParams != NULL) { + EditorDisplayParams->font = GetMonoFont(); + EditorDisplayParams->spacing = 1; + EditorDisplayParams->font_size = 20; // this will change + EditorDisplayParams->scroll_h = 0; + EditorDisplayParams->scroll_v = 0; + } + data->EditorInfo = CreateTextArea(EditorDisplayParams); + outp->data = data; return outp; -- cgit v1.3