Skip to content

Commit

Permalink
Rename GluiDropdown to GluiPopup
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthaTi committed Feb 21, 2022
1 parent c5cb71d commit 2b3fc37
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/map.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void main() {
auto position = MapPosition(GetMousePosition, dropVector!"auto");

root.addChild(
dropdown(
popup(
label("I'm a dropdown"),
label("Hurray!"),
),
Expand Down
2 changes: 1 addition & 1 deletion source/glui/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ public import
glui.button,
glui.children,
glui.default_theme,
glui.dropdown,
glui.file_picker,
glui.frame,
glui.hover_button,
Expand All @@ -14,6 +13,7 @@ public import
glui.map_space,
glui.node,
glui.onion_frame,
glui.popup,
glui.rich_label,
glui.scroll,
glui.scrollbar,
Expand Down
11 changes: 8 additions & 3 deletions source/glui/dropdown.d → source/glui/popup.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module glui.dropdown;
module glui.popup;

import raylib;

Expand All @@ -12,12 +12,17 @@ import glui.utils;

@safe:

deprecated("To be removed in 0.5.0. Use popup() instead")
alias dropdown = popup;

alias dropdown = simpleConstructor!GluiDropdown;
deprecated("To be removed in 0.5.0. Use GluiPopup instead")
alias GluiDropdown = GluiPopup;

alias popup = simpleConstructor!GluiPopup;

/// This is an override of GluiFrame to simplify creating dropdowns: if clicked outside of it, it will disappear from
/// the node tree.
class GluiDropdown : GluiFrame {
class GluiPopup : GluiFrame {

// TODO: ...unless clicked on another dropdown.

Expand Down

0 comments on commit 2b3fc37

Please sign in to comment.