Merge branch 'development' into imageAsset_refactor_rev3

This commit is contained in:
marauder2k7 2025-03-24 20:07:06 +00:00 committed by GitHub
commit 0da0903599
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4189 changed files with 29881 additions and 635347 deletions

View file

@ -34,6 +34,7 @@
#include "gfx/primBuilder.h"
#include "console/engineAPI.h"
#include "gui/editor/guiPopupMenuCtrl.h"
#include "console/typeValidators.h"
// menu bar:
// basic idea - fixed height control bar at the top of a window, placed and sized in gui editor
@ -188,9 +189,9 @@ void GuiMenuBar::onRemove()
void GuiMenuBar::initPersistFields()
{
docsURL;
addField("padding", TypeS32, Offset( mPadding, GuiMenuBar ),"Extra padding to add to the bounds of the control.\n");
addFieldV("padding", TypeRangedS32, Offset( mPadding, GuiMenuBar ), &CommonValidators::PositiveInt,"Extra padding to add to the bounds of the control.\n");
addField("menubarHeight", TypeS32, Offset(mMenubarHeight, GuiMenuBar), "Sets the height of the menubar when attached to the canvas.\n");
addFieldV("menubarHeight", TypeRangedS32, Offset(mMenubarHeight, GuiMenuBar), &CommonValidators::PositiveInt, "Sets the height of the menubar when attached to the canvas.\n");
Parent::initPersistFields();
}
@ -506,6 +507,16 @@ void GuiMenuBar::onAction()
mouseDownMenu->popupMenu->showPopup(root, pos.x, pos.y);
}
void GuiMenuBar::closeMenu()
{
if(mouseDownMenu)
mouseDownMenu->popupMenu->hidePopup();
mouseOverMenu = NULL;
mouseDownMenu = NULL;
mMouseInMenu = false;
}
// Process a tick
void GuiMenuBar::processTick()
{