WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
package windows
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"math"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"git.kirsle.net/apps/doodle/pkg/balance"
|
|
|
|
"git.kirsle.net/apps/doodle/pkg/level"
|
2021-06-13 21:53:21 +00:00
|
|
|
"git.kirsle.net/apps/doodle/pkg/level/publishing"
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
"git.kirsle.net/apps/doodle/pkg/log"
|
2022-01-18 02:51:11 +00:00
|
|
|
magicform "git.kirsle.net/apps/doodle/pkg/uix/magic-form"
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
"git.kirsle.net/go/render"
|
|
|
|
"git.kirsle.net/go/ui"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Publish window.
|
|
|
|
type Publish struct {
|
|
|
|
// Settings passed in by doodle
|
|
|
|
Supervisor *ui.Supervisor
|
|
|
|
Engine render.Engine
|
|
|
|
Level *level.Level
|
|
|
|
|
2021-06-13 21:53:21 +00:00
|
|
|
OnPublish func(builtinToo bool)
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
OnCancel func()
|
|
|
|
|
|
|
|
// Private vars.
|
|
|
|
includeBuiltins bool // show built-in doodads in checkbox-list.
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewPublishWindow initializes the window.
|
|
|
|
func NewPublishWindow(cfg Publish) *ui.Window {
|
|
|
|
var (
|
2022-01-18 02:51:11 +00:00
|
|
|
windowWidth = 380
|
|
|
|
windowHeight = 220
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
page = 1
|
|
|
|
perPage = 4
|
|
|
|
pages = 1
|
|
|
|
maxPageButtons = 8
|
|
|
|
|
|
|
|
// columns and sizes to draw the doodad list
|
|
|
|
columns = 3
|
|
|
|
btnWidth = 120
|
|
|
|
btnHeight = 14
|
|
|
|
)
|
|
|
|
|
|
|
|
window := ui.NewWindow("Publish Level")
|
|
|
|
window.SetButtons(ui.CloseButton)
|
|
|
|
window.Configure(ui.Config{
|
|
|
|
Width: windowWidth,
|
|
|
|
Height: windowHeight,
|
|
|
|
Background: render.RGBA(200, 200, 255, 255),
|
|
|
|
})
|
|
|
|
|
|
|
|
/////////////
|
|
|
|
// Custom Doodads checkbox-list.
|
|
|
|
doodadFrame := ui.NewFrame("Doodads Frame")
|
|
|
|
doodadFrame.Resize(render.Rect{
|
|
|
|
W: windowWidth,
|
2022-01-18 02:51:11 +00:00
|
|
|
H: btnHeight*perPage + 40,
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
})
|
|
|
|
|
2021-06-13 23:03:32 +00:00
|
|
|
// Collect the doodads named in this level.
|
2021-06-13 21:53:21 +00:00
|
|
|
usedBuiltins, usedCustom := publishing.GetUsedDoodadNames(cfg.Level)
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
|
|
|
|
// Helper function to draw the button rows for a set of doodads.
|
|
|
|
mkDoodadRows := func(filenames []string, builtin bool) []*ui.Frame {
|
|
|
|
var (
|
|
|
|
curRow *ui.Frame // = ui.NewFrame("mkDoodadRows 0")
|
|
|
|
frames = []*ui.Frame{}
|
|
|
|
)
|
|
|
|
|
|
|
|
for i, name := range filenames {
|
|
|
|
if i%columns == 0 {
|
|
|
|
curRow = ui.NewFrame(fmt.Sprintf("mkDoodadRows %d", i))
|
|
|
|
frames = append(frames, curRow)
|
|
|
|
}
|
|
|
|
|
|
|
|
font := balance.UIFont
|
|
|
|
if builtin {
|
|
|
|
font.Color = render.Blue
|
|
|
|
name += "*"
|
|
|
|
}
|
|
|
|
|
|
|
|
btn := ui.NewLabel(ui.Label{
|
|
|
|
Text: strings.Replace(name, ".doodad", "", 1),
|
|
|
|
Font: font,
|
|
|
|
})
|
|
|
|
btn.Configure(ui.Config{
|
|
|
|
Width: btnWidth,
|
|
|
|
Height: btnHeight,
|
|
|
|
})
|
|
|
|
curRow.Pack(btn, ui.Pack{
|
|
|
|
Side: ui.W,
|
|
|
|
PadX: 2,
|
|
|
|
PadY: 2,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
return frames
|
|
|
|
}
|
|
|
|
|
|
|
|
// 1. Draw the built-in doodads in use.
|
|
|
|
var (
|
|
|
|
btnRows = []*ui.Frame{}
|
|
|
|
builtinRows = []*ui.Frame{}
|
|
|
|
customRows = []*ui.Frame{}
|
|
|
|
)
|
2021-06-13 21:53:21 +00:00
|
|
|
if len(usedCustom) > 0 {
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
customRows = mkDoodadRows(usedCustom, false)
|
|
|
|
btnRows = append(btnRows, customRows...)
|
|
|
|
}
|
|
|
|
if len(usedBuiltins) > 0 {
|
|
|
|
builtinRows = mkDoodadRows(usedBuiltins, true)
|
|
|
|
btnRows = append(btnRows, builtinRows...)
|
|
|
|
}
|
|
|
|
|
|
|
|
for i, row := range btnRows {
|
|
|
|
doodadFrame.Pack(row, ui.Pack{
|
|
|
|
Side: ui.N,
|
|
|
|
FillX: true,
|
|
|
|
})
|
|
|
|
|
|
|
|
// Hide if too long for 1st page.
|
|
|
|
if i >= perPage {
|
|
|
|
row.Hide()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Pager for the doodads.
|
|
|
|
pages = int(
|
|
|
|
math.Ceil(
|
|
|
|
float64(len(btnRows)) / float64(perPage),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
pagerOnChange := func(newPage, perPage int) {
|
|
|
|
page = newPage
|
|
|
|
log.Info("Page: %d, %d", page, perPage)
|
|
|
|
|
|
|
|
// Re-evaluate which rows are shown/hidden for the page we're on.
|
|
|
|
var (
|
|
|
|
minRow = (page - 1) * perPage
|
|
|
|
visible = 0
|
|
|
|
)
|
|
|
|
for i, row := range btnRows {
|
|
|
|
if visible >= perPage {
|
|
|
|
row.Hide()
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
|
|
|
if i < minRow {
|
|
|
|
row.Hide()
|
|
|
|
} else {
|
|
|
|
row.Show()
|
|
|
|
visible++
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pager := ui.NewPager(ui.Pager{
|
|
|
|
Name: "Doodads List Pager",
|
|
|
|
Page: page,
|
|
|
|
Pages: pages,
|
|
|
|
PerPage: perPage,
|
|
|
|
MaxPageButtons: maxPageButtons,
|
|
|
|
Font: balance.MenuFont,
|
|
|
|
OnChange: pagerOnChange,
|
|
|
|
})
|
2022-01-18 02:51:11 +00:00
|
|
|
_ = pager
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
|
2022-01-18 02:51:11 +00:00
|
|
|
/////////////
|
|
|
|
// Intro text
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
|
2022-01-18 02:51:11 +00:00
|
|
|
introFrame := ui.NewFrame("Intro Frame")
|
|
|
|
window.Pack(introFrame, ui.Pack{
|
|
|
|
Side: ui.N,
|
|
|
|
FillX: true,
|
|
|
|
})
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
|
2022-01-18 02:51:11 +00:00
|
|
|
// Render the form, putting it all together.
|
|
|
|
form := magicform.Form{
|
|
|
|
Supervisor: cfg.Supervisor,
|
|
|
|
Engine: cfg.Engine,
|
|
|
|
Vertical: true,
|
|
|
|
LabelWidth: 100,
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
}
|
2022-01-18 02:51:11 +00:00
|
|
|
form.Create(introFrame, []magicform.Field{
|
|
|
|
{
|
|
|
|
Label: "About",
|
|
|
|
Font: balance.LabelFont,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Label: "Share your level easily! If you are using custom doodads in\n" +
|
|
|
|
"your level, you may attach them directly to your level file\n" +
|
|
|
|
"so it can easily run on another computer!",
|
|
|
|
Font: balance.UIFont,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Label: "Attach custom doodads when I save the level",
|
|
|
|
Font: balance.UIFont,
|
|
|
|
BoolVariable: &cfg.Level.SaveDoodads,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Label: "Attach built-in doodads too",
|
|
|
|
Font: balance.UIFont.Update(render.Text{
|
|
|
|
Color: render.Red,
|
|
|
|
}),
|
|
|
|
BoolVariable: &cfg.Level.SaveBuiltins,
|
|
|
|
Tooltip: ui.Tooltip{
|
|
|
|
Edge: ui.Top,
|
|
|
|
Text: "If enabled, the attached doodads will override the built-ins\n" +
|
|
|
|
"for this level. Bugfixes or updates to the built-ins will not\n" +
|
|
|
|
"affect your level, either.",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Label: "The above settings are saved with your level file, and each\n" +
|
|
|
|
"time you save, custom doodads will be re-attached.",
|
|
|
|
Font: balance.UIFont,
|
|
|
|
},
|
|
|
|
// Pager is broken, Supervisor doesn't pick it up, TODO
|
|
|
|
/*{
|
|
|
|
Label: "Doodads currently used on this level:",
|
|
|
|
Font: balance.LabelFont,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Frame: doodadFrame,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Label: "* Built-in doodad",
|
|
|
|
Font: balance.UIFont,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Pager: pager,
|
|
|
|
},*/
|
|
|
|
{
|
|
|
|
Buttons: []magicform.Field{
|
|
|
|
{
|
|
|
|
ButtonStyle: &balance.ButtonPrimary,
|
|
|
|
Label: "Save Level Now",
|
|
|
|
OnClick: func() {
|
|
|
|
if cfg.OnPublish != nil {
|
|
|
|
cfg.OnPublish(cfg.includeBuiltins)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Type: magicform.Button,
|
|
|
|
Label: "Close",
|
|
|
|
OnClick: func() {
|
|
|
|
if cfg.OnCancel != nil {
|
|
|
|
cfg.OnCancel()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
WIP Publish Dialog + UI Improvements
* File->Publish Level in the Level Editor opens the Publish window,
where you can embed custom doodads into your level and export a
portable .level file you can share with others.
* Currently does not actually export a level file yet.
* The dialog lists all unique doodad names in use in your level, and
designates which are built-ins and which are custom (paginated).
* A checkbox would let the user embed built-in doodads into their level,
as well, locking it in to those versions and not using updated
versions from future game releases.
UI Improvements:
* Added styling for a "Primary" UI button, rendered in deep blue.
* Pop-up modals (Alert, Confirm) color their Ok button as Primary.
* The Enter key pressed during an Alert or Confirm modal will invoke its
default button and close the modal, corresponding to its Primary
button.
* The developer console is now opened with the tilde/grave key ` instead
of the Enter key, so that the Enter key is free to click through
modals.
* In the "Open/Edit Drawing" window, a "Browse..." button is added to
the level and doodad sections, spawning a native File Open dialog to
pick a .level or .doodad outside the config root.
2021-06-11 05:31:30 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
return window
|
|
|
|
}
|