Closed Spacerulerwill closed 4 months ago
@Spacerulerwill This property could be added to GuiDropdownBox()
but the PR should be redesigned to follow raygui design.
A new property can be added in GuiDropdownBoxProperty
, for example DROPDOWN_ROLL_UP
, with default/initial value as 0. Then consider that property directly on GuiDropdownBox()
with no need to add new controls.
So users will write code as:
GuiSetStyle(DROPDOWNBOX, DROPDOWN_ROLL_UP, 1); // Setup dropdown box to roll-up
GuiDropdownBox(...);
GuiSetStyle(DROPDOWNBOX, DROPDOWN_ROLL_UP, 0); // Reset dropdown box to roll-down
@Spacerulerwill Are you reviewing this PR with proposed changes?
@Spacerulerwill Are you reviewing this PR with proposed changes?
Apologise for the delay, I forgot about your response. I will review it in the coming days and make the changes
@Spacerulerwill Just added it, I needed it for one of my tools. Thanks anyway!
I propose the addition of a
GuiRollupBox
function, which is similar to theGuiDropdownBox
function but the elements appear above instead of below. This is useful in cases where there is a bottom-level toolbar that still need some kind of select menu, as shown below. With aGuiDropdownBox
the elements would have fallen off the bottom of the screen. To implement this, I have refactored the logic ofGuiDropdownBox
into a new function calledGuiDropdownBoxEx,
which accepts an additional parameter for direction. This allows bothGuiDropdownBox
andGuiRollupBox
to share the same core functionality, only differing by which direction they pass toGuiDropdownBoxEx
. This is my first proper open source contribution so I apologize in advance for any mistakes.