Fix crash when hovering over a blank item loadout slot in the item loadout menu. Tutorial tasks now are only drawn while a stage is being actively played. Tutorial tasks get cleared upon a stage completion. Release Build 8210.
This commit is contained in:
parent
3aaa79eda4
commit
bf2a2982c9
@ -355,7 +355,6 @@ bool AiL::OnUserUpdate(float fElapsedTime){
|
||||
Audio::Update();
|
||||
GameState::STATE->Draw(this);
|
||||
RenderMenu();
|
||||
Tutorial::Draw();
|
||||
GameState::STATE->DrawOverlay(this);
|
||||
RenderFadeout();
|
||||
LoadingScreen::Draw();
|
||||
|
@ -63,8 +63,10 @@ void Menu::InitializeItemLoadoutWindow(){
|
||||
return true;
|
||||
},[](MenuFuncData data){
|
||||
std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component);
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
|
||||
if(!ISBLANK(loadoutButton.lock()->GetItem())){
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
|
||||
}
|
||||
return true;
|
||||
},[](MenuFuncData data){
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
|
||||
@ -78,8 +80,10 @@ void Menu::InitializeItemLoadoutWindow(){
|
||||
return true;
|
||||
},[](MenuFuncData data){
|
||||
std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component);
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
|
||||
if(!ISBLANK(loadoutButton.lock()->GetItem())){
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
|
||||
}
|
||||
return true;
|
||||
},[](MenuFuncData data){
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
|
||||
@ -93,8 +97,10 @@ void Menu::InitializeItemLoadoutWindow(){
|
||||
return true;
|
||||
},[](MenuFuncData data){
|
||||
std::weak_ptr<MenuItemLoadoutButton>loadoutButton=DYNAMIC_POINTER_CAST<MenuItemLoadoutButton>(data.component);
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
|
||||
if(!ISBLANK(loadoutButton.lock()->GetItem())){
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel(loadoutButton.lock()->GetItem().lock()->DisplayName());
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel(loadoutButton.lock()->GetItem().lock()->Description());
|
||||
}
|
||||
return true;
|
||||
},[](MenuFuncData data){
|
||||
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
|
||||
|
@ -93,4 +93,5 @@ void State_GameRun::OnUserUpdate(AiL*game){
|
||||
void State_GameRun::Draw(AiL*game){
|
||||
game->RenderWorld(game->GetElapsedTime());
|
||||
game->RenderHud();
|
||||
Tutorial::Draw();
|
||||
}
|
@ -44,6 +44,7 @@ All rights reserved.
|
||||
#include "ProgressBar.h"
|
||||
#include "SoundEffect.h"
|
||||
#include "Unlock.h"
|
||||
#include "Tutorial.h"
|
||||
|
||||
INCLUDE_MONSTER_LIST
|
||||
INCLUDE_game
|
||||
@ -85,6 +86,7 @@ void State_LevelComplete::OnStateChange(GameState*prevState){
|
||||
|
||||
game->GetPlayer()->AddXP(game->GetPlayer()->GetAccumulatedXP());
|
||||
|
||||
Tutorial::GiveUpCurrentTask();
|
||||
game->GetPlayer()->SetState(State::NORMAL);
|
||||
Menu::OpenMenu(LEVEL_COMPLETE);
|
||||
};
|
||||
|
@ -12,8 +12,4 @@ Toggle for displaying error messages
|
||||
|
||||
Equip Gear using Start menu tutorial
|
||||
Steam Controller SDK
|
||||
Add in vsync system option
|
||||
|
||||
Hint text does not appear except during actual gameplay.
|
||||
|
||||
Terrain Collision Boxes
|
||||
Add in vsync system option
|
@ -126,4 +126,8 @@ void Tutorial::Draw(){
|
||||
|
||||
const bool Tutorial::TaskIsComplete(TutorialTaskName task){
|
||||
return taskList.at(task)->IsComplete();
|
||||
}
|
||||
|
||||
void Tutorial::GiveUpCurrentTask(){
|
||||
SetNextTask(TutorialTaskName::NONE);
|
||||
}
|
@ -91,6 +91,7 @@ public:
|
||||
static void SetNextTask(TutorialTaskName task);
|
||||
static TutorialTask&GetTask(TutorialTaskName task);
|
||||
static void CompleteTask(TutorialTaskName task);
|
||||
static void GiveUpCurrentTask();
|
||||
private:
|
||||
static TutorialTaskName currentTaskState;
|
||||
static std::map<TutorialTaskName,std::unique_ptr<TutorialTask>>taskList;
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 5
|
||||
#define VERSION_PATCH 1
|
||||
#define VERSION_BUILD 8208
|
||||
#define VERSION_BUILD 8210
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user