summaryrefslogtreecommitdiff
path: root/src/scenes/puzzleScene.c
diff options
context:
space:
mode:
authorPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-07-11 17:57:38 +0500
committerPhysick <96335032+DegustatorPonos@users.noreply.github.com>2026-07-11 17:57:38 +0500
commit64e23a3455ef1e71786c4b3a835a91954e08ab79 (patch)
tree266d56ed56a7bedea6a2187689fac522dab95db9 /src/scenes/puzzleScene.c
parent55ef21312888cbfb9d449eee8f7958b74f85ac7c (diff)
Editor position work
Diffstat (limited to 'src/scenes/puzzleScene.c')
-rw-r--r--src/scenes/puzzleScene.c21
1 files changed, 15 insertions, 6 deletions
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;