From 465b7361e1e8dc0f6c46ce5f6a11af7c33715401 Mon Sep 17 00:00:00 2001 From: Mitchell Schwitzer Date: Sun, 12 Mar 2017 15:18:02 -0700 Subject: [PATCH 1/4] fix skill window update invoke winMgr->updateSkillArea() in mechanicsmanagerimp.cpp after looping over ESM::Skill::SkillEnum if any updates have occurred. --- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index ca5d40b4aa..e5b9e8fcfb 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -338,16 +338,19 @@ namespace MWMechanics } } + bool updateSkills = false; //Loop over ESM::Skill::SkillEnum for(int i = 0; i < ESM::Skill::Length; ++i) { if(stats.getSkill(i) != mWatchedSkills[i] || mWatchedStatsEmpty) { + updateSkills = true; mWatchedSkills[i] = stats.getSkill(i); winMgr->setValue((ESM::Skill::SkillEnum)i, stats.getSkill(i)); } } + if (updateSkills) { winMgr->updateSkillArea(); } winMgr->setValue("level", stats.getLevel()); mWatchedStatsEmpty = false; From 7960d5a9a700a2af47903b3aa1ca5fb3776af48f Mon Sep 17 00:00:00 2001 From: Mitchell Schwitzer Date: Sun, 12 Mar 2017 16:44:56 -0700 Subject: [PATCH 2/4] fix skill progress bar v2 both widgets display their own progess indicator. it was being set for value (when you hovered over the level of your skill, eg the "5" in "Acrobatics 5"), but not for the name. this fixes that, but the progress information is being stored/displayed by two different widgets for one skill --- apps/openmw/mwgui/statswindow.cpp | 4 +++- apps/openmw/mwmechanics/mechanicsmanagerimp.cpp | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index cee015da04..a47a6710b4 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -237,8 +237,10 @@ namespace MWGui nameWidget->setSize(nameWidget->getWidth() - (widthAfter-widthBefore), nameWidget->getHeight()); } - if (value.getBase() < 100) + if (value.getBase() < 100) { + setSkillProgress(nameWidget, value.getProgress(), parSkill); setSkillProgress(valueWidget, value.getProgress(), parSkill); + } } } diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index e5b9e8fcfb..ca5d40b4aa 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -338,19 +338,16 @@ namespace MWMechanics } } - bool updateSkills = false; //Loop over ESM::Skill::SkillEnum for(int i = 0; i < ESM::Skill::Length; ++i) { if(stats.getSkill(i) != mWatchedSkills[i] || mWatchedStatsEmpty) { - updateSkills = true; mWatchedSkills[i] = stats.getSkill(i); winMgr->setValue((ESM::Skill::SkillEnum)i, stats.getSkill(i)); } } - if (updateSkills) { winMgr->updateSkillArea(); } winMgr->setValue("level", stats.getLevel()); mWatchedStatsEmpty = false; From f31e5ba85ef8dee288c2096fe73e659b32c234fe Mon Sep 17 00:00:00 2001 From: Mitchell Schwitzer Date: Sun, 12 Mar 2017 17:02:07 -0700 Subject: [PATCH 3/4] fix display maximum proficency reached --- apps/openmw/mwgui/statswindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index a47a6710b4..2ba703b97b 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -240,6 +240,16 @@ namespace MWGui if (value.getBase() < 100) { setSkillProgress(nameWidget, value.getProgress(), parSkill); setSkillProgress(valueWidget, value.getProgress(), parSkill); + } else { + nameWidget->setUserString("Visible_SkillMaxed", "true"); + nameWidget->setUserString("UserData^Hidden_SkillMaxed", "false"); + nameWidget->setUserString("Visible_SkillProgressVBox", "false"); + nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true"); + + valueWidget->setUserString("Visible_SkillMaxed", "true"); + valueWidget->setUserString("UserData^Hidden_SkillMaxed", "false"); + valueWidget->setUserString("Visible_SkillProgressVBox", "false"); + valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "true"); } } } From 421b92ae05e566f1f783bc96640316cad8ab4a4a Mon Sep 17 00:00:00 2001 From: Mitchell Schwitzer Date: Sun, 12 Mar 2017 17:24:43 -0700 Subject: [PATCH 4/4] fix styling & add missing lines regarding max proficency --- apps/openmw/mwgui/statswindow.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/statswindow.cpp b/apps/openmw/mwgui/statswindow.cpp index 2ba703b97b..b61212d886 100644 --- a/apps/openmw/mwgui/statswindow.cpp +++ b/apps/openmw/mwgui/statswindow.cpp @@ -237,7 +237,18 @@ namespace MWGui nameWidget->setSize(nameWidget->getWidth() - (widthAfter-widthBefore), nameWidget->getHeight()); } - if (value.getBase() < 100) { + if (value.getBase() < 100) + { + nameWidget->setUserString("Visible_SkillMaxed", "false"); + nameWidget->setUserString("UserData^Hidden_SkillMaxed", "true"); + nameWidget->setUserString("Visible_SkillProgressVBox", "true"); + nameWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false"); + + valueWidget->setUserString("Visible_SkillMaxed", "false"); + valueWidget->setUserString("UserData^Hidden_SkillMaxed", "true"); + valueWidget->setUserString("Visible_SkillProgressVBox", "true"); + valueWidget->setUserString("UserData^Hidden_SkillProgressVBox", "false"); + setSkillProgress(nameWidget, value.getProgress(), parSkill); setSkillProgress(valueWidget, value.getProgress(), parSkill); } else {