Placeholder Story 2-1. Remove unncessary confirmation menus. Clear child item when reopening the Disassemble or Refine menus. Release Build 11417.

pull/65/head
sigonasr2 5 months ago
parent da65f1525b
commit 50820d34a5
  1. 8
      Adventures in Lestoria/Adventures in Lestoria.vcxproj
  2. 6
      Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
  3. 65
      Adventures in Lestoria/ArtificerDisassembleConfirmWindow.cpp
  4. 65
      Adventures in Lestoria/ArtificerRefineConfirmWindow.cpp
  5. 38
      Adventures in Lestoria/ArtificerRefineWindow.cpp
  6. 3
      Adventures in Lestoria/ArtificerWindow.cpp
  7. 2
      Adventures in Lestoria/Menu.cpp
  8. 2
      Adventures in Lestoria/MenuType.h
  9. 10
      Adventures in Lestoria/RowInventoryScrollableWindowComponent.h
  10. 2
      Adventures in Lestoria/State_OverworldMap.cpp
  11. 2
      Adventures in Lestoria/Version.h
  12. 2
      Adventures in Lestoria/assets/Campaigns/World_Map.tmx
  13. 6
      Adventures in Lestoria/assets/config/story/Chapter 2.txt
  14. BIN
      x64/Release/Adventures in Lestoria.exe

@ -757,10 +757,6 @@
<ClCompile Include="Ability.cpp" />
<ClCompile Include="Animation.cpp" />
<ClCompile Include="Arrow.cpp" />
<ClCompile Include="ArtificerDisassembleConfirmWindow.cpp">
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="ArtificerDisassembleWindow.cpp">
<SubType>
</SubType>
@ -773,10 +769,6 @@
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="ArtificerRefineConfirmWindow.cpp">
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="ArtificerRefineWindow.cpp">
<SubType>
</SubType>

@ -1190,15 +1190,9 @@
<ClCompile Include="ArtificerRefineWindow.cpp">
<Filter>Source Files\Interface</Filter>
</ClCompile>
<ClCompile Include="ArtificerRefineConfirmWindow.cpp">
<Filter>Source Files\Interface</Filter>
</ClCompile>
<ClCompile Include="ArtificerDisassembleWindow.cpp">
<Filter>Source Files\Interface</Filter>
</ClCompile>
<ClCompile Include="ArtificerDisassembleConfirmWindow.cpp">
<Filter>Source Files\Interface</Filter>
</ClCompile>
<ClCompile Include="ArtificerEnchantWindow.cpp">
<Filter>Source Files\Interface</Filter>
</ClCompile>

@ -1,65 +0,0 @@
#pragma region License
/*
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions or derivations of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice. This list of conditions and the following disclaimer must be
reproduced in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2024 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
#pragma endregion
#include "Menu.h"
#include "AdventuresInLestoria.h"
INCLUDE_game
void Menu::InitializeArtificerDisassembleConfirmWindow(){
Menu*artificerDisassembleConfirmWindow=CreateMenu(ARTIFICER_DISASSEMBLE_CONFIRM,CENTERED,vi2d{144,144});
artificerDisassembleConfirmWindow->SetupKeyboardNavigation(
[](MenuType type,Data&returnData){ //On Open
returnData="";
},
{ //Button Key
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
{game->KEY_BACK,{"Stay",[](MenuType type){
Menu::CloseMenu();
}}},
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
}
,{ //Button Navigation Rules
{"Sample Button",{
.up="",
.down="",
.left="",
.right="",}},
});
}

@ -1,65 +0,0 @@
#pragma region License
/*
License (OLC-3)
~~~~~~~~~~~~~~~
Copyright 2024 Joshua Sigona <sigonasr2@gmail.com>
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions or derivations of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions or derivative works in binary form must reproduce the above
copyright notice. This list of conditions and the following disclaimer must be
reproduced in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Portions of this software are copyright © 2024 The FreeType
Project (www.freetype.org). Please see LICENSE_FT.txt for more information.
All rights reserved.
*/
#pragma endregion
#include "Menu.h"
#include "AdventuresInLestoria.h"
INCLUDE_game
void Menu::InitializeArtificerRefineConfirmWindow(){
Menu*artificerRefineConfirmWindow=CreateMenu(ARTIFICER_REFINE_CONFIRM,CENTERED,vi2d{144,144});
artificerRefineConfirmWindow->SetupKeyboardNavigation(
[](MenuType type,Data&returnData){ //On Open
returnData="";
},
{ //Button Key
{game->KEY_SCROLL,{"Navigate",[](MenuType type){}}},
{game->KEY_BACK,{"Stay",[](MenuType type){
Menu::CloseMenu();
}}},
{game->KEY_CONFIRM,{"Select",[](MenuType type){}}},
}
,{ //Button Navigation Rules
{"Sample Button",{
.up="",
.down="",
.left="",
.right="",}},
});
}

@ -40,25 +40,53 @@ All rights reserved.
#include "AdventuresInLestoria.h"
#include "RowInventoryScrollableWindowComponent.h"
#include "MenuLabel.h"
#include "MenuItemItemButton.h"
INCLUDE_game
void Menu::InitializeArtificerRefineWindow(){
Menu*artificerRefineWindow=CreateMenu(ARTIFICER_REFINE,CENTERED,game->GetScreenSize()-vi2d{52,52});
auto inventoryLabel=artificerRefineWindow->ADD("Accessory List Label",MenuLabel)(geom2d::rect<float>{{},{180.f,12.f}},"Choose Accessory:",1.f,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END;
auto disassemblyTitleLabel{artificerRefineWindow->ADD("Disassembly Title Label",MenuLabel)(geom2d::rect<float>{{},{artificerRefineWindow->size.x,24.f}},"Accessory Disassembly",2.f,ComponentAttr::SHADOW|ComponentAttr::OUTLINE|ComponentAttr::BACKGROUND)END};
auto inventoryDisplay=artificerRefineWindow->ADD("Accessory List",RowInventoryScrollableWindowComponent)(geom2d::rect<float>{{0.f,16.f},{artificerRefineWindow->size.x/2-4.f,artificerRefineWindow->size.y-32}},"","",[](MenuFuncData data){
auto inventoryLabel=artificerRefineWindow->ADD("Accessory List Label",MenuLabel)(geom2d::rect<float>{{0.f,28.f},{180.f,12.f}},"Choose Accessory:",1.f,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END;
auto itemIcon{artificerRefineWindow->ADD("Item Icon",MenuItemItemButton)(geom2d::rect<float>({artificerRefineWindow->size.x/2+4.f,44.f},{48,48}),Item::BLANK,DO_NOTHING,"","Item Description",IconButtonAttr::NOT_SELECTABLE)END};
itemIcon->SetIconScale({2.f,2.f});
itemIcon->SetCompactDescriptions(true);
auto accessoryDescription{artificerRefineWindow->ADD("Item Description",MenuLabel)(geom2d::rect<float>{{artificerRefineWindow->size.x/2+56.f,44.f},{artificerRefineWindow->size.x/2-56.f,72.f}},"",0.5f,ComponentAttr::BACKGROUND|ComponentAttr::OUTLINE|ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END};
const auto ResetDisassemblyDisplay=[artificerRefineWindow](){
MenuType menuType{artificerRefineWindow->GetType()};
};
const auto EnableDisassemblyDisplay=[artificerRefineWindow](){
MenuType menuType{artificerRefineWindow->GetType()};
};
auto inventoryDisplay=artificerRefineWindow->ADD("Accessory List",RowInventoryScrollableWindowComponent)(geom2d::rect<float>{{0.f,44.f},{artificerRefineWindow->size.x/2-4.f,artificerRefineWindow->size.y-60}},"","",[](MenuFuncData data){
RowItemDisplay&item{*DYNAMIC_POINTER_CAST<RowItemDisplay>(data.component)};
DYNAMIC_POINTER_CAST<RowInventoryScrollableWindowComponent>(data.parentComponent.lock())->SelectChild(DYNAMIC_POINTER_CAST<RowItemDisplay>(data.component));
return true;
},DO_NOTHING,DO_NOTHING,
},[](MenuFuncData data){
RowItemDisplay&item{*DYNAMIC_POINTER_CAST<RowItemDisplay>(data.component)};
return true;
},[](MenuFuncData data){
auto childComponent{DYNAMIC_POINTER_CAST<RowInventoryScrollableWindowComponent>(data.parentComponent.lock())->GetSelectedChild()};
if(childComponent){
RowItemDisplay&item{childComponent.value().get()};
}
return true;
},
InventoryCreator::RowPlayer_InventoryUpdate,
InventoryWindowOptions{.padding=1,.size={artificerRefineWindow->size.x/2-5.f,28}})END;
InventoryWindowOptions{.padding=1,.size={artificerRefineWindow->size.x/2-5.f-12.f,28}})END;
auto backButton=artificerRefineWindow->ADD("Back",MenuComponent)(geom2d::rect<float>{{0.f,artificerRefineWindow->size.y-12.f},{120.f,12.f}},"Back",[](MenuFuncData data){
auto backButton=artificerRefineWindow->ADD("Back",MenuComponent)(geom2d::rect<float>{{0.f,artificerRefineWindow->size.y-12.f},{96.f,16.f}},"Back",[](MenuFuncData data){
Menu::CloseMenu();
return true;
})END;
Menu::AddInventoryListener(inventoryDisplay,"Accessories");
artificerRefineWindow->SetupKeyboardNavigation(

@ -43,6 +43,7 @@ All rights reserved.
#include "Unlock.h"
#include "MenuLabel.h"
#include "VisualNovel.h"
#include "RowInventoryScrollableWindowComponent.h"
INCLUDE_game
@ -51,10 +52,12 @@ void Menu::InitializeArtificerWindow(){
artificerWindow->ADD("Disassemble Button",MenuComponent)(geom2d::rect<float>{{0.f,4.f},{144.f,24.f}},"Disassemble",[](MenuFuncData data){
Menu::OpenMenu(MenuType::ARTIFICER_DISASSEMBLE);
Component<RowInventoryScrollableWindowComponent>(MenuType::ARTIFICER_DISASSEMBLE,"Accessory List")->ClearSelectedChild();
return true;
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
artificerWindow->ADD("Refine Button",MenuComponent)(geom2d::rect<float>{{0.f,32.f},{144.f,24.f}},"Refine",[](MenuFuncData data){
Menu::OpenMenu(MenuType::ARTIFICER_REFINE);
Component<RowInventoryScrollableWindowComponent>(MenuType::ARTIFICER_REFINE,"Accessory List")->ClearSelectedChild();
return true;
},vf2d{2.f,2.f},ButtonAttr::FIT_TO_LABEL)END;
artificerWindow->ADD("Enchant Button",MenuComponent)(geom2d::rect<float>{{0.f,60.f},{144.f,24.f}},"Enchant",[](MenuFuncData data){

@ -120,9 +120,7 @@ void Menu::InitializeMenus(){
InitializeCreditsWindow();
InitializeArtificerWindow();
InitializeArtificerRefineWindow();
InitializeArtificerRefineConfirmWindow();
InitializeArtificerDisassembleWindow();
InitializeArtificerDisassembleConfirmWindow();
InitializeArtificerEnchantWindow();
InitializeArtificerEnchantConfirmWindow();

@ -71,9 +71,7 @@ enum MenuType{
CREDITS, //100% Controller Compatibility
ARTIFICER, //100% Controller Compatibility
ARTIFICER_REFINE,
ARTIFICER_REFINE_CONFIRM,
ARTIFICER_DISASSEMBLE,
ARTIFICER_DISASSEMBLE_CONFIRM,
ARTIFICER_ENCHANT,
ARTIFICER_ENCHANT_CONFIRM,
///////////////////////////////////////////////////////////

@ -69,7 +69,12 @@ public:
}
}
virtual inline void SelectChild(std::weak_ptr<RowItemDisplay>childComponent){
inline void ClearSelectedChild(){
if(!selectedComponent.expired())selectedComponent.lock()->itemIsSelected=false;
selectedComponent.reset();
}
inline void SelectChild(std::weak_ptr<RowItemDisplay>childComponent){
selectedComponent=childComponent;
for(std::weak_ptr<MenuComponent>child:components){
RowItemDisplay&rowItem{*DYNAMIC_POINTER_CAST<RowItemDisplay>(child)};
@ -77,7 +82,8 @@ public:
}
selectedComponent.lock()->itemIsSelected=true;
}
virtual inline std::optional<std::reference_wrapper<RowItemDisplay>>GetSelectedChild()const{
inline std::optional<std::reference_wrapper<RowItemDisplay>>GetSelectedChild()const{
if(!selectedComponent.expired()){
return *selectedComponent.lock();
}

@ -265,8 +265,6 @@ void State_OverworldMap::StartLevel(){
}
}
void State_OverworldMap::UpdateCurrentConnectionPoint(const ConnectionPoint&connection){
currentConnectionPoint=const_cast<ConnectionPoint*>(&connection);
Component<MenuLabel>(OVERWORLD_LEVEL_SELECT,"Stage Label")->SetLabel(currentConnectionPoint->name);

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_PATCH 5
#define VERSION_BUILD 11414
#define VERSION_BUILD 11417
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -820,7 +820,7 @@
<property name="Connection 4 - West" type="object" value="8"/>
<property name="Map" propertytype="Level" value="NONE"/>
<property name="Type" propertytype="StageType" value="NONE"/>
<property name="Unlock Condition" propertytype="Level" value="WORLD_MAP"/>
<property name="Unlock Condition" propertytype="Level" value="STORY_2_2"/>
</properties>
</object>
<object id="36" name="Beach Outskirts" type="StagePlate" x="600" y="434" width="106" height="27">

@ -24,3 +24,9 @@ At this station you have the ability to refine and fix up imperfect jewelry disc
Disassemble rings that are undesirable to you and retrieve fragments of them, then use the Refine station to empower your equipment further!
You can make use of those extra rings you have been piling up!
===STORY_2_1===
[You]
Hi

Loading…
Cancel
Save