less messy dialogue constructor
This commit is contained in:
parent
106d4d0ed8
commit
4544acd01e
1 changed files with 8 additions and 2 deletions
|
@ -316,14 +316,20 @@ namespace Buypeeb {
|
||||||
md.KeepAbove = true;
|
md.KeepAbove = true;
|
||||||
md.Resizable = false;
|
md.Resizable = false;
|
||||||
md.FocusOnMap = true;
|
md.FocusOnMap = true;
|
||||||
md.Title = "buypeeb";
|
md.Title = "Buypeeb";
|
||||||
|
|
||||||
return md;
|
return md;
|
||||||
}
|
}
|
||||||
|
|
||||||
// show a simple entry dialogue that allows the user to enter text and either cancel or submit it
|
// show a simple entry dialogue that allows the user to enter text and either cancel or submit it
|
||||||
private (Boolean accepted, string response) EntryDialogue(string title = "Buypeeb", string message = "Hi there!", string prefill = null) {
|
private (Boolean accepted, string response) EntryDialogue(string title = "Buypeeb", string message = "Hi there!", string prefill = null) {
|
||||||
Dialog ed = new Dialog(title, null, DialogFlags.DestroyWithParent | DialogFlags.Modal, "Cancel", ResponseType.Cancel, "OK", ResponseType.Ok);
|
Dialog ed = new Dialog(
|
||||||
|
title: title,
|
||||||
|
parent: this,
|
||||||
|
flags: DialogFlags.DestroyWithParent | DialogFlags.Modal,
|
||||||
|
/* button_data: */ "Cancel", ResponseType.Cancel, "OK", ResponseType.Ok
|
||||||
|
);
|
||||||
|
|
||||||
ed.DefaultResponse = ResponseType.Ok;
|
ed.DefaultResponse = ResponseType.Ok;
|
||||||
ed.KeepAbove = true;
|
ed.KeepAbove = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue