diff options
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rwxr-xr-x | build/handmade.so | bin | 263840 -> 263840 bytes | |||
| -rwxr-xr-x | build/linux_handmade | bin | 88272 -> 88528 bytes | |||
| -rw-r--r-- | code/handmade.cpp | 20 |
4 files changed, 13 insertions, 10 deletions
diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index f2e64bf..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "code/libs/linuxhmh"] - path = code/libs/linuxhmh - url = git@autumn:linuxhmh diff --git a/build/handmade.so b/build/handmade.so Binary files differindex c9e6fde..9a1d827 100755 --- a/build/handmade.so +++ b/build/handmade.so diff --git a/build/linux_handmade b/build/linux_handmade Binary files differindex 609ac5e..6ee8550 100755 --- a/build/linux_handmade +++ b/build/linux_handmade diff --git a/code/handmade.cpp b/code/handmade.cpp index ca64c27..932215d 100644 --- a/code/handmade.cpp +++ b/code/handmade.cpp @@ -659,6 +659,7 @@ extern "C" GAME_UPDATE_AND_RENDER(GameUpdateAndRender) InitFont(Thread, &GameState->RegularFont, Memory, "../data/fonts/jetbrains_mono_regular.ttf"); InitFont(Thread, &GameState->ItalicFont, Memory, "../data/fonts/jetbrains_mono_italic.ttf"); InitFont(Thread, &GameState->BoldFont, Memory, "../data/fonts/jetbrains_mono_bold.ttf"); + // TODO(luca): Italic & Bold font. GameState->SelectedColor = SquareColor_Yellow; GameState->ExportedPatternIndex = 0; @@ -1055,7 +1056,7 @@ extern "C" GAME_UPDATE_AND_RENDER(GameUpdateAndRender) // NOTE(luca): Debug code for drawing inputted text. #if 1 { - r32 FontScale = stbtt_ScaleForPixelHeight(&DefaultFont.Info, 20.0f); + r32 FontScale = stbtt_ScaleForPixelHeight(&DefaultFont.Info, 22.0); v2 Offset = {100.0f, 30.0f}; @@ -1091,6 +1092,16 @@ extern "C" GAME_UPDATE_AND_RENDER(GameUpdateAndRender) DrawRectangle(Buffer, vMin + -1, vMax + 1, ColorBG); } + // TODO(luca): Placeholder text when text is empty. + // Draw the text + { + DrawText(Buffer, &DefaultFont, FontScale, + GameState->TextInputCount, (u8 *)GameState->TextInputText, + Offset, ColorFG, true); + + Assert(GameState->TextInputCount <= ArrayCount(GameState->TextInputText)); + } + // Draw cursor { v2 vMin = {Offset.X + TextWidth, Offset.Y - Baseline}; @@ -1098,13 +1109,8 @@ extern "C" GAME_UPDATE_AND_RENDER(GameUpdateAndRender) DrawRectangle(Buffer, vMin, vMax, ColorFG); } - // Draw the text - DrawText(Buffer, &DefaultFont, FontScale, - GameState->TextInputCount, (u8 *)GameState->TextInputText, - Offset, ColorFG, true); - - Assert(GameState->TextInputCount <= ArrayCount(GameState->TextInputText)); } + #endif } |
