mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
add support for non-resizable windows
This commit is contained in:
@ -115,7 +115,7 @@ _UI_EXTERN void uiWindowSetChild(uiWindow *w, uiControl *child);
|
||||
_UI_EXTERN int uiWindowMargined(uiWindow *w);
|
||||
_UI_EXTERN void uiWindowSetMargined(uiWindow *w, int margined);
|
||||
_UI_EXTERN void uiWindowSetDropTarget(uiWindow* w, int drop);
|
||||
_UI_EXTERN uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar);
|
||||
_UI_EXTERN uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar, int resizable);
|
||||
|
||||
_UI_EXTERN void uiWindowOnContentSizeChanged(uiWindow *w, void (*f)(uiWindow *, void *), void *data);
|
||||
_UI_EXTERN void uiWindowOnClosing(uiWindow *w, int (*f)(uiWindow *w, void *data), void *data);
|
||||
|
@ -512,7 +512,7 @@ static void setClientSize(uiWindow *w, int width, int height, BOOL hasMenubar, D
|
||||
logLastError(L"error resizing window");
|
||||
}
|
||||
|
||||
uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
|
||||
uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar, int resizable)
|
||||
{
|
||||
uiWindow *w;
|
||||
WCHAR *wtitle;
|
||||
@ -525,8 +525,11 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
|
||||
hasMenubarBOOL = TRUE;
|
||||
w->hasMenubar = hasMenubarBOOL;
|
||||
|
||||
#define style WS_OVERLAPPEDWINDOW
|
||||
#define exstyle 0
|
||||
int style = WS_OVERLAPPEDWINDOW;
|
||||
int exstyle = 0;
|
||||
|
||||
if (!resizable)
|
||||
style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX);
|
||||
|
||||
wtitle = toUTF16(title);
|
||||
w->hwnd = CreateWindowExW(exstyle,
|
||||
|
Reference in New Issue
Block a user