mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-08 10:23:27 +00:00
add new function
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@188 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -4,14 +4,7 @@
|
||||
#include "../external/stb_ds.h"
|
||||
|
||||
static int create(MwWidget handle) {
|
||||
/* todo: we should have a public "show" function here that is implemented per
|
||||
platform, as opposed to just shoving it here. perchance. */
|
||||
#ifdef _WIN32
|
||||
ShowWindow(handle->lowlevel->hWnd, SW_HIDE);
|
||||
#endif
|
||||
#ifdef UNIX
|
||||
XUnmapWindow(handle->lowlevel->display, handle->lowlevel->window);
|
||||
#endif
|
||||
MwLLShow(handle->lowlevel, 0);
|
||||
|
||||
MwSetDefault(handle);
|
||||
|
||||
@@ -181,15 +174,14 @@ void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point) {
|
||||
handle->internal = menu;
|
||||
|
||||
MwLLDetach(handle->lowlevel, point);
|
||||
|
||||
#ifdef _WIN32
|
||||
SetWindowLongPtr(handle->lowlevel->hWnd, GWL_STYLE, (LONG_PTR)0);
|
||||
SetWindowLongPtr(handle->lowlevel->hWnd, GWL_EXSTYLE, (LONG_PTR)WS_EX_TOOLWINDOW);
|
||||
|
||||
ShowWindow(handle->lowlevel->hWnd, SW_NORMAL);
|
||||
|
||||
SetFocus(handle->lowlevel->hWnd);
|
||||
#endif
|
||||
|
||||
MwLLShow(handle->lowlevel, 1);
|
||||
|
||||
for(i = 0; i < arrlen(menu->sub); i++) {
|
||||
int tw = MwTextWidth(handle, menu->sub[i]->name);
|
||||
h += MwTextHeight(handle, menu->sub[i]->name) + 3;
|
||||
|
||||
Reference in New Issue
Block a user