File mode progress.

This commit is contained in:
J-D-K
2025-09-03 15:54:54 -04:00
parent 75303dcebb
commit a072c28dfb
82 changed files with 1489 additions and 372 deletions

View File

@@ -35,6 +35,9 @@ namespace ui
/// @param hasFocus Whether or not the calling state has focus.
void update(bool hasFocus) override;
/// @brief Sub update routine. Allows the panel to hide and unhide itself even when not in focus.
void sub_update();
/// @brief Runs the render routine.
/// @param target Target to render to.
/// @param hasFocus Whether or the the calling state has focus.
@@ -49,6 +52,12 @@ namespace ui
/// @brief Closes the panel.
void close();
/// @brief Hides the panel temporarily.
void hide();
/// @brief Unhides the panel.
void unhide();
/// @brief Returns if the panel is fully open.
/// @return If the panel is fully open.
bool is_open() const;
@@ -57,6 +66,9 @@ namespace ui
/// @return If the panel is fully closed.
bool is_closed();
/// @brief Returns whether or not the panel is hidden.
bool is_hidden() const;
/// @brief Pushes a new element to the element vector.
/// @param newElement New element to push.
void push_new_element(std::shared_ptr<ui::Element> newElement);
@@ -75,6 +87,9 @@ namespace ui
/// @brief Whether or not to close panel.
bool m_closePanel{};
/// @brief Whether or not to hide the panel.
bool m_hidePanel{};
/// @brief Current X coordinate to render to. Panels are always 720 pixels in height so no Y is required.
double m_x{};
@@ -93,10 +108,16 @@ namespace ui
/// @brief Vector of elements.
std::vector<std::shared_ptr<ui::Element>> m_elements{};
/// @brief Handles sliding out logic.
void slide_out();
/// @brief Slides the panel out from the left side.
void slide_out_left();
/// @brief Slides the panel out from the right side.
void slide_out_right();
int get_absolute_x_distance();
/// @brief Contains the logic for hiding/closing the panel.
void close_hide_panel();
};
} // namespace ui