mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-29 05:47:50 +02:00
Formatted the entire codebase and added a CI check for formatting
This commit is contained in:
@ -10,14 +10,13 @@ namespace credits {
|
||||
ImFont* bigFont;
|
||||
|
||||
void init() {
|
||||
|
||||
}
|
||||
|
||||
void show() {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(20.0f, 20.0f));
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0,0,0,0));
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0, 0, 0, 0));
|
||||
ImVec2 dispSize = ImGui::GetIO().DisplaySize;
|
||||
ImVec2 center = ImVec2(dispSize.x/2.0f, dispSize.y/2.0f);
|
||||
ImVec2 center = ImVec2(dispSize.x / 2.0f, dispSize.y / 2.0f);
|
||||
ImGui::SetNextWindowPos(center, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
ImGui::OpenPopup("Credits");
|
||||
ImGui::BeginPopupModal("Credits", NULL, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove);
|
||||
|
@ -4,19 +4,19 @@
|
||||
#include <string>
|
||||
#include <gui/gui.h>
|
||||
|
||||
#define GENERIC_DIALOG_BUTTONS_OK "Ok\0"
|
||||
#define GENERIC_DIALOG_BUTTONS_YES_NO "Yes\0No\0"
|
||||
#define GENERIC_DIALOG_BUTTONS_APPLY_CANCEL "Apply\0Cancel\0"
|
||||
#define GENERIC_DIALOG_BUTTONS_OK_CANCEL "Ok\0Cancel\0"
|
||||
#define GENERIC_DIALOG_BUTTONS_OK "Ok\0"
|
||||
#define GENERIC_DIALOG_BUTTONS_YES_NO "Yes\0No\0"
|
||||
#define GENERIC_DIALOG_BUTTONS_APPLY_CANCEL "Apply\0Cancel\0"
|
||||
#define GENERIC_DIALOG_BUTTONS_OK_CANCEL "Ok\0Cancel\0"
|
||||
|
||||
#define GENERIC_DIALOG_BUTTON_OK 0
|
||||
#define GENERIC_DIALOG_BUTTON_YES 0
|
||||
#define GENERIC_DIALOG_BUTTON_NO 1
|
||||
#define GENERIC_DIALOG_BUTTON_APPLY 0
|
||||
#define GENERIC_DIALOG_BUTTON_CANCE 1
|
||||
#define GENERIC_DIALOG_BUTTON_OK 0
|
||||
#define GENERIC_DIALOG_BUTTON_YES 0
|
||||
#define GENERIC_DIALOG_BUTTON_NO 1
|
||||
#define GENERIC_DIALOG_BUTTON_APPLY 0
|
||||
#define GENERIC_DIALOG_BUTTON_CANCE 1
|
||||
|
||||
namespace ImGui {
|
||||
template<typename Func>
|
||||
template <typename Func>
|
||||
int GenericDialog(const char* id, bool& open, const char* buttons, Func draw) {
|
||||
// If not open, return
|
||||
if (!open) { return -1; }
|
||||
|
Reference in New Issue
Block a user