init
This commit is contained in:
32
main.c
Normal file
32
main.c
Normal file
@@ -0,0 +1,32 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user