refactor(gui): reorder include statements and streamline StatusType definition
- Rearranged the order of include statements in themed_widgets.h for better organization and readability. - Simplified the definition of StatusType by removing redundant braces, enhancing clarity in the code structure. - Adjusted formatting in function declarations for consistency. Benefits: - Improved code maintainability and readability through better organization and formatting.
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
#ifndef YAZE_APP_GUI_THEMED_WIDGETS_H
|
#ifndef YAZE_APP_GUI_THEMED_WIDGETS_H
|
||||||
#define YAZE_APP_GUI_THEMED_WIDGETS_H
|
#define YAZE_APP_GUI_THEMED_WIDGETS_H
|
||||||
|
|
||||||
#include "imgui/imgui.h"
|
|
||||||
#include "app/gui/theme_manager.h"
|
|
||||||
#include "app/gui/layout_helpers.h"
|
|
||||||
#include "app/gui/color.h"
|
#include "app/gui/color.h"
|
||||||
|
#include "app/gui/layout_helpers.h"
|
||||||
|
#include "app/gui/theme_manager.h"
|
||||||
|
#include "imgui/imgui.h"
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace gui {
|
namespace gui {
|
||||||
@@ -135,7 +135,8 @@ bool Combo(const char* label, int* current_item, const char* const items[],
|
|||||||
* @brief Begin themed table with automatic styling
|
* @brief Begin themed table with automatic styling
|
||||||
*/
|
*/
|
||||||
bool BeginTable(const char* str_id, int columns, ImGuiTableFlags flags = 0,
|
bool BeginTable(const char* str_id, int columns, ImGuiTableFlags flags = 0,
|
||||||
const ImVec2& outer_size = ImVec2(0, 0), float inner_width = 0.0f);
|
const ImVec2& outer_size = ImVec2(0, 0),
|
||||||
|
float inner_width = 0.0f);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief End themed table
|
* @brief End themed table
|
||||||
@@ -165,23 +166,17 @@ void EndTooltip();
|
|||||||
// Status & Feedback
|
// Status & Feedback
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
enum class StatusType { kSuccess, kWarning, kError, kInfo };
|
||||||
/**
|
/**
|
||||||
* @brief Themed status text (success, warning, error, info)
|
* @brief Themed status text (success, warning, error, info)
|
||||||
*/
|
*/
|
||||||
void StatusText(const char* text, StatusType type);
|
void StatusText(const char* text, StatusType type);
|
||||||
|
|
||||||
enum class StatusType {
|
|
||||||
kSuccess,
|
|
||||||
kWarning,
|
|
||||||
kError,
|
|
||||||
kInfo
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Themed progress bar
|
* @brief Themed progress bar
|
||||||
*/
|
*/
|
||||||
void ProgressBar(float fraction, const ImVec2& size = ImVec2(-1, 0),
|
void ProgressBar(float fraction, const ImVec2& size = ImVec2(-1, 0),
|
||||||
const char* overlay = nullptr);
|
const char* overlay = nullptr);
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Utility
|
// Utility
|
||||||
|
|||||||
Reference in New Issue
Block a user