fix listbox

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@481 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-23 17:46:30 +00:00
parent 184a4eb420
commit dabacb063d
2 changed files with 37 additions and 2 deletions

View File

@@ -0,0 +1,35 @@
# $Id$
file(
GLOB
EXAMPLES_GLDEMOS_SOURCES
*.c
)
list(REMOVE_ITEM EXAMPLES_GLDEMOS_SOURCES ${CMAKE_SOURCE_DIR}/examples/gldemos/glutlayer.c)
foreach(PATH IN LISTS EXAMPLES_GLDEMOS_SOURCES)
get_filename_component(
TARGET
${PATH}
NAME_WE
)
add_executable(
${TARGET} ${PATH}
)
target_include_directories(
${TARGET}
PRIVATE
${GL_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/include
)
target_link_directories(
${TARGET}
PRIVATE
${GL_LIBRARY_DIRS}
)
target_link_libraries(
${TARGET}
PRIVATE
Mw
${GL_LIBRARIES}
)
endforeach()

View File

@@ -483,8 +483,8 @@ static void func_handler(MwWidget handle, const char* name, void* out, va_list v
mwListBoxResetImpl(handle);
}
if(strcmp(name, "mwListBoxGet") == 0) {
int index = va_arg(va, int);
mwListBoxGetImpl(handle, index);
int index = va_arg(va, int);
*(const char**)out = mwListBoxGetImpl(handle, index);
}
if(strcmp(name, "mwListBoxSetWidth") == 0) {
int index = va_arg(va, int);