From 97ad8388b22ac5a17cffe524c78f081f4af5a0dd Mon Sep 17 00:00:00 2001 From: cutealien Date: Mon, 25 Jan 2021 16:15:44 +0000 Subject: [PATCH] Add getAlign functions to IGUIElement getAlignLeft, getAlignRight, getAlignTop, getAlignBottom. Deliberately not mirroring setAlignment function, as that takes 4 parameters and that's always a bit ugly to return. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6187 dfc29bdd-3216-0410-991c-e03cc46cb475 --- changes.txt | 1 + include/IGUIElement.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/changes.txt b/changes.txt index 933c1978..7df37130 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ -------------------------- Changes in 1.9 (not yet released) +- Add getAlign functions to IGUIElement - Add optional multitouch support to X11 (but disabled in IrrCompileConfig by default). Thanks @TheBrokenRail for a patch proposal based on example code from esjeon (patch #322). - Slightly changed close window handling on X11 (optimized and avoids problems on some shells). Thanks @TheBrokenRail for a patch (was part of patch #322). - Add getActiveColor functions to IGUIStaticText and IGUIButton (get currently used color). diff --git a/include/IGUIElement.h b/include/IGUIElement.h index d5d0bace..5968430a 100644 --- a/include/IGUIElement.h +++ b/include/IGUIElement.h @@ -209,6 +209,29 @@ public: } } + //! How left element border is aligned when parent is resized + EGUI_ALIGNMENT getAlignLeft() const + { + return AlignLeft; + } + + //! How right element border is aligned when parent is resized + EGUI_ALIGNMENT getAlignRight() const + { + return AlignRight; + } + + //! How top element border is aligned when parent is resized + EGUI_ALIGNMENT getAlignTop() const + { + return AlignTop; + } + + //! How bottom element border is aligned when parent is resized + EGUI_ALIGNMENT getAlignBottom() const + { + return AlignBottom; + } //! Updates the absolute position. virtual void updateAbsolutePosition()