33 lines
641 B
C
33 lines
641 B
C
#include "editor.h"
|
|
#include "raylib.h"
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
EditorState editor_state;
|
|
Font editor_font;
|
|
|
|
void ed_load_font() {}
|
|
|
|
int main() {
|
|
sds init_text = sdsnew("Das ist nur ein Test String🙂!");
|
|
editor_state = init_editor_state(init_text);
|
|
|
|
printf("%s\n", editor_state.text);
|
|
|
|
InitWindow(800, 600, "editor");
|
|
|
|
while (!WindowShouldClose()) {
|
|
BeginDrawing();
|
|
ClearBackground(BLACK);
|
|
|
|
DrawText(editor_state.text, 8, 8, 18, RAYWHITE);
|
|
DrawRectangle(8 * editor_state.cursor_pos + 8, 8, 2, 18, GREEN);
|
|
|
|
EndDrawing();
|
|
}
|
|
|
|
CloseWindow();
|
|
|
|
return 0;
|
|
}
|