()
| 532 | } |
| 533 | |
| 534 | func (menu *Menu) Draw() { |
| 535 | |
| 536 | if !menu.Opened { |
| 537 | return |
| 538 | } |
| 539 | |
| 540 | menu.closeButtonButton.Tint = getThemeColor(GUIFontColor) |
| 541 | |
| 542 | globals.Renderer.RenderTexture(menu.BGTexture.Texture, nil, menu.Rect) |
| 543 | |
| 544 | if menu.CurrentPage != "" { |
| 545 | menu.Pages[menu.CurrentPage].Draw() |
| 546 | } |
| 547 | |
| 548 | if menu.CloseMethod == MenuCloseButton { |
| 549 | menu.closeButtonButton.Draw() |
| 550 | } |
| 551 | |
| 552 | if menu.CanGoBack() { |
| 553 | menu.BackButton.Draw() |
| 554 | } |
| 555 | |
| 556 | if menu.CurrentPage != menu.NextPage { |
| 557 | menu.CurrentPage = menu.NextPage |
| 558 | menu.Pages[menu.CurrentPage].Open() |
| 559 | } |
| 560 | |
| 561 | } |
| 562 | |
| 563 | func (menu *Menu) AddPage(pageName string) *Container { |
| 564 | page := NewContainer(menu.Rect, false) |
nothing calls this directly
no test coverage detected