mirror of
https://github.com/nicbarker/clay.git
synced 2026-02-06 12:48:49 +00:00
feat: Add ncurses renderer and example
- **Renderer**: Implemented `clay_renderer_ncurses.c` supporting rectangles, text, borders, and clipping using standard ncurses plotting. - **Example**: Added `examples/ncurses-example` demonstrating a scrollable "Social Feed" UI with keyboard navigation. - **Build**: Added `CLAY_INCLUDE_NCURSES_EXAMPLES` option to root `CMakeLists.txt` and integrated the new example. - **CompConfig**: Updated `.gitignore` to strictly exclude `build/`, `_deps/`, and other standard CMake artifacts.
This commit is contained in:
parent
7d099ad870
commit
840606d0c1
5 changed files with 638 additions and 3 deletions
14
examples/ncurses-example/CMakeLists.txt
Normal file
14
examples/ncurses-example/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
cmake_minimum_required(VERSION 3.27)
|
||||
project(clay-ncurses-example C)
|
||||
|
||||
find_package(Curses REQUIRED)
|
||||
|
||||
add_executable(clay-ncurses-example main.c)
|
||||
|
||||
target_link_libraries(clay-ncurses-example PRIVATE ${CURSES_LIBRARIES})
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
target_link_libraries(clay-ncurses-example PRIVATE m)
|
||||
endif()
|
||||
|
||||
target_include_directories(clay-ncurses-example PRIVATE ${CURSES_INCLUDE_DIRS} ../../)
|
||||
Loading…
Add table
Add a link
Reference in a new issue