Skip to content

Commit b681caf

Browse files
Dialogs now modal
Uses system dll to avoid triggering a false windows defender virus detection
1 parent ef5eafd commit b681caf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Sabacc.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
<ConformanceMode>true</ConformanceMode>
110110
<LanguageStandard>stdcpp17</LanguageStandard>
111111
<AdditionalIncludeDirectories>D:\GPV\SFML-3.0.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
112-
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
112+
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
113113
</ClCompile>
114114
<Link>
115115
<SubSystem>Windows</SubSystem>
@@ -128,7 +128,7 @@
128128
<ConformanceMode>true</ConformanceMode>
129129
<LanguageStandard>stdcpp17</LanguageStandard>
130130
<AdditionalIncludeDirectories>D:\GPV\SFML-3.0.0\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
131-
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
131+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
132132
</ClCompile>
133133
<Link>
134134
<SubSystem>Windows</SubSystem>

SabaccUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void SabaccUI::surTirageDesAnnonce()
139139
{
140140
std::stringstream ss;
141141
if (m_jeu.m_positionJActuel == Position::S) {
142-
MessageBox(m_vue.getFenetre().getNativeHandle(), L"Appuyez pour lancer les dés", L"Lancer de dés", MB_OK);
142+
MessageBox(m_vue.getFenetre().getNativeHandle(), L"Appuyez pour lancer les dés", L"Lancer de dés", MB_OK | MB_APPLMODAL);
143143
}
144144
}
145145

SabaccView.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ void SabaccVue::traiteClicJoueur(sf::Vector2i mousePos) {
10591059
Action actionJeu = cad.gameAction;
10601060
ActionBouton actionVue = cad.ViewAction;
10611061
if (actionVue == ActionBouton::VA_AFFICHER_CACHER_CARTES) {
1062-
if (!m_afficheCartes && MessageBox(m_fenetre.getNativeHandle(), L"Attention: Afficher les cartes efface les scores. Voulez-vous continuer?", L"Afficher toutes les cartes", MB_YESNO) == IDYES)
1062+
if (!m_afficheCartes && MessageBox(m_fenetre.getNativeHandle(), L"Attention: Afficher les cartes efface les scores. Voulez-vous continuer?", L"Afficher toutes les cartes", MB_YESNO | MB_APPLMODAL) == IDYES)
10631063
{
10641064
m_afficheCartes = true;
10651065
m_suitLesScores = false;
@@ -1073,7 +1073,7 @@ void SabaccVue::traiteClicJoueur(sf::Vector2i mousePos) {
10731073
else if (actionVue == ActionBouton::VA_NOUVELLE_PARTIE) {
10741074
//appelle onGameRestart des listeners
10751075

1076-
if (m_jeuSabacc.m_jeuTermine || MessageBox(m_fenetre.getNativeHandle(), L"Voulez-vous vraiment recommencer la partie?", L"Nouvelle Partie", MB_YESNO) == IDYES) {
1076+
if (m_jeuSabacc.m_jeuTermine || MessageBox(m_fenetre.getNativeHandle(), L"Voulez-vous vraiment recommencer la partie?", L"Nouvelle Partie", MB_YESNO | MB_APPLMODAL) == IDYES) {
10771077
m_pListener->surRedemarreJeu();
10781078
if(!m_afficheCartes)
10791079
m_suitLesScores = true;
@@ -1098,7 +1098,7 @@ void SabaccVue::traiteClicJoueur(sf::Vector2i mousePos) {
10981098
return;
10991099
}
11001100
else if(actionVue ==ActionBouton::VA_FERME) {
1101-
if (MessageBox(m_fenetre.getNativeHandle(), L"Voulez-vous vraiment quitter?", L"Quitter le Jeu", MB_YESNO) == IDYES)
1101+
if (MessageBox(m_fenetre.getNativeHandle(), L"Voulez-vous vraiment quitter?", L"Quitter le Jeu", MB_YESNO | MB_APPLMODAL) == IDYES)
11021102
m_pListener->surFermeFenetre();
11031103
return;
11041104
}

0 commit comments

Comments
 (0)