Small Edits trying to fix Sigsegv
This commit is contained in:
@@ -60,7 +60,7 @@ namespace JUI {
|
||||
|
||||
/// A vertically-descending list menu of button objects, which supports sub-menus much like class UtilityBar.
|
||||
/// @see UtilityBar
|
||||
class ContextMenu : public Rect, public TextStyleInterface {
|
||||
class ContextMenu : public Rect {
|
||||
public:
|
||||
|
||||
void PropogateTextSize(int value) {
|
||||
@@ -73,7 +73,7 @@ namespace JUI {
|
||||
}
|
||||
|
||||
/// Sets the TextSize property for the child elements of this widget.
|
||||
void TextSize(int value) override {
|
||||
void TextSize(int value) {
|
||||
// TODO: This works fine for the ContextMenu, where children are assuemed to only by submenus and buttons.
|
||||
// Some widgets will need to be handled specially, because only some of their children are logically bound to it.
|
||||
PropogateTextSize(value);
|
||||
|
@@ -30,7 +30,8 @@ namespace JUI {
|
||||
submenu->AnchorPoint({1, 0});
|
||||
submenu->Position({0_percent, 0_percent});
|
||||
|
||||
btn->OnClickEvent += [&] (auto a, auto b) mutable {
|
||||
|
||||
btn->OnClickEvent += [this, &submenu] (auto a, auto b) {
|
||||
submenu->Visible(true);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user