Version initiale du logiciel. Développement commencé le 06/01/2026, en reprenant certaines parties/idées de miniDart, que j'ai écrit quelques années plus tôt
Cette révision appartient à :
61
application.cxx
Fichier normal
61
application.cxx
Fichier normal
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Application.cxx Projet Modulations Numériques
|
||||
* Création : 2026/01/17 17h
|
||||
* Licence GPL v2
|
||||
* Copyright Eric Bachard 2026/01/13
|
||||
*/
|
||||
|
||||
#include "application.h"
|
||||
#include "imgui_themes.h"
|
||||
|
||||
Application::Application()
|
||||
: current_theme(DEFAULT_THEME), current_tab(Amplitude_TAB),
|
||||
windowWidth(DEFAULT_SDL_WINDOW_WIDTH),
|
||||
windowHeight(DEFAULT_SDL_WINDOW_HEIGHT)
|
||||
{
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
}
|
||||
|
||||
void Application::set_current_tab(TAB_name aTab)
|
||||
{
|
||||
if (current_tab == aTab)
|
||||
return;
|
||||
|
||||
current_tab = aTab;
|
||||
}
|
||||
|
||||
|
||||
void Application::setTheme(THEME aTheme)
|
||||
{
|
||||
if (current_theme == aTheme)
|
||||
return;
|
||||
|
||||
switch(aTheme)
|
||||
{
|
||||
case LIGHT_GREEN_THEME:
|
||||
ImGui::StyleColorsLightGreen();
|
||||
break;
|
||||
|
||||
case DARK_THEME:
|
||||
ImGui::StyleColorsDark();
|
||||
break;
|
||||
|
||||
case CLASSIC_THEME:
|
||||
ImGui::StyleColorsClassic();
|
||||
break;
|
||||
|
||||
case LIGHT_BLUE_THEME:
|
||||
ImGui::StyleColorsLight();
|
||||
break;
|
||||
|
||||
case WINDOWS_THEME: ImGui::StyleColorsWindows();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
current_theme = aTheme;
|
||||
}
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur