mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
add support for setting an explicit min size for libui controls. for now only supported by uiArea.
This commit is contained in:
@ -62,6 +62,14 @@ void uiControlSetFocus(uiControl *c)
|
||||
(*(c->SetFocus))(c);
|
||||
}
|
||||
|
||||
void uiControlSetMinSize(uiControl *c, int w, int h)
|
||||
{
|
||||
c->MinWidth = w;
|
||||
c->MinHeight = h;
|
||||
|
||||
// TODO: resize if needed
|
||||
}
|
||||
|
||||
#define uiControlSignature 0x7569436F
|
||||
|
||||
uiControl *uiAllocControl(size_t size, uint32_t OSsig, uint32_t typesig, const char *typenamestr)
|
||||
@ -72,6 +80,10 @@ uiControl *uiAllocControl(size_t size, uint32_t OSsig, uint32_t typesig, const c
|
||||
c->Signature = uiControlSignature;
|
||||
c->OSSignature = OSsig;
|
||||
c->TypeSignature = typesig;
|
||||
|
||||
c->MinWidth = -1;
|
||||
c->MinHeight = -1;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user