ATTRIB(Dialog, zoomedOutTitleBarPosition, float, 0)
ATTRIB(Dialog, zoomedOutTitleBar, float, 0)
+ ATTRIB(Dialog, requiresConnection, float, 0) // set to TRUE if the dialog requires a connection to be opened
+
ATTRIB(Dialog, backgroundImage, string, string_null)
ATTRIB(Dialog, borderLines, float, 1)
ATTRIB(Dialog, closeButtonImage, string, string_null)
void Dialog_configureDialog(entity me)
{
- entity closebutton;
float absWidth, absHeight;
me.frame = spawnBorderImage();
me.fill(me);
- if(me.closable)
+ if(me.closable && me.borderLines > 0)
{
- closebutton = me.closeButton = spawnButton();
+ entity closebutton;
+ closebutton = me.closeButton = me.frame.closeButton = spawnButton();
closebutton.configureButton(closebutton, "", 0, me.closeButtonImage);
closebutton.onClick = Dialog_Close; closebutton.onClickEntity = me;
closebutton.srcMulti = 0;
me.addItem(me, closebutton, '0 0 0', '1 1 0', 1); // put it as LAST
}
-
- me.frame.closeButton = closebutton;
}
void Dialog_close(entity me)