Fix Overworld Menu encounters scrolling for keyboard-only controls. Remove redundant rendering for display text on key DrawInput popups. Make sure mouse-displayed inputs don't render the primary mouse icon twice. Release Build 6993.

pull/35/head
sigonasr2 10 months ago
parent a449932226
commit 116c3c1a51
  1. 2
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 1
      Adventures in Lestoria/AdventuresInLestoria.h
  3. 6
      Adventures in Lestoria/Key.cpp
  4. 4
      Adventures in Lestoria/MenuType.h
  5. 11
      Adventures in Lestoria/OverworldMapLevelWindow.cpp
  6. 2
      Adventures in Lestoria/Version.h
  7. 3
      Adventures in Lestoria/assets/config/Interface.txt
  8. BIN
      Adventures in Lestoria/assets/themes/lmb.png
  9. BIN
      Adventures in Lestoria/assets/themes/mmb.png
  10. BIN
      Adventures in Lestoria/assets/themes/rmb.png
  11. BIN
      x64/Release/Adventures in Lestoria.exe

@ -126,6 +126,7 @@ InputGroup AiL::KEY_SCROLLLEFT;
InputGroup AiL::KEY_SCROLLRIGHT;
InputGroup AiL::KEY_SCROLLHORZ;
InputGroup AiL::KEY_SCROLLVERT;
InputGroup AiL::KEY_SCROLLVERT_R;
InputGroup AiL::KEY_SCROLL;
InputGroup AiL::KEY_SHOULDER;
InputGroup AiL::KEY_CHANGE_LOADOUT;
@ -2536,6 +2537,7 @@ void AiL::InitializeDefaultKeybinds(){
KEY_SCROLLDOWN.AddKeybind({ANALOG,static_cast<int>(GPAxes::RY)});
KEY_SCROLLVERT.AddKeybind({ANALOG,static_cast<int>(GPAxes::LY)});
KEY_SCROLLVERT.AddKeybind({ANALOG,static_cast<int>(GPAxes::RY)});
KEY_SCROLLVERT_R.AddKeybind({ANALOG,static_cast<int>(GPAxes::RY)});
KEY_SCROLLHORZ.AddKeybind({ANALOG,static_cast<int>(GPAxes::LX)});
KEY_SCROLLHORZ.AddKeybind({ANALOG,static_cast<int>(GPAxes::RX)});
KEY_SCROLL.AddKeybind({KEY,ARROWS});

@ -99,6 +99,7 @@ public:
static InputGroup KEY_SCROLLRIGHT;
static InputGroup KEY_SCROLLHORZ;
static InputGroup KEY_SCROLLVERT;
static InputGroup KEY_SCROLLVERT_R;
static InputGroup KEY_SCROLL;
static InputGroup KEY_SHOULDER;
static InputGroup KEY_CHANGE_LOADOUT;

@ -312,7 +312,7 @@ void InputGroup::DrawInput(const std::variant<AiL*const,TileTransformedView*cons
vf2d buttonImgSize{};
std::vector<std::variant<Decal*,std::string>>buttonImgs;
if(type!=CONTROLLER){
if(type!=CONTROLLER&&type!=MOUSE){
for(const Input&input:keyOrder){
if(input.GetType()==MOUSE){
if(input.HasIcon()){
@ -383,9 +383,9 @@ void InputGroup::DrawInput(const std::variant<AiL*const,TileTransformedView*cons
}
offset.x+=textSize.x+"Interface.InputHelperSpacing"_I;
}else [[unlikely]]ERR("WARNING! Hit a state where no data is inside of the button! THIS SHOULD NOT BE HAPPENING!");
game->view.DrawShadowStringPropDecal(pos+offset,displayText,{255,255,255,alpha},{0,0,0,alpha});
}
game->view.DrawShadowStringPropDecal(pos+offset,displayText,{255,255,255,alpha},{0,0,0,alpha});
}
void InputGroup::DrawInput(const std::variant<AiL*const,TileTransformedView*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha)const{

@ -41,12 +41,12 @@ enum MenuType{
///////////////////////////////////////////////////////////
/*DO NOT REMOVE!!*/ENUM_START,///////////////////////////////
///////////////////////////////////////////////////////////
// 27% Controller Compatibility. (100 total items, 4 items per menu * 25 menus)
// 28% Controller Compatibility. (100 total items, 4 items per menu * 25 menus)
INVENTORY_CONSUMABLES, //100% Controller Compatibility
CLASS_INFO, //100% Controller Compatibility
CLASS_SELECTION, //100% Controller Compatibility
MAIN_MENU, //100% Controller Compatibility
OVERWORLD_LEVEL_SELECT, //75% Controller Compatibility - Scrolling for keyboard?
OVERWORLD_LEVEL_SELECT, //100% Controller Compatibility - Scrolling for keyboard?
ITEM_LOADOUT, //0% Controller Compatibility
LEVEL_COMPLETE, //0% Controller Compatibility
OVERWORLD_MENU, //0% Controller Compatibility

@ -74,7 +74,16 @@ void Menu::InitializeOverworldMapLevelWindow(){
{{game->KEY_CHANGE_LOADOUT},{"Change Loadout",[](MenuType type){
Component<MenuComponent>(type,"Change Loadout Button")->Click();
}}},
{{game->KEY_SCROLLVERT,Analog},{"Scroll Encounters",[](MenuType type){
{{game->KEY_SHOULDER,Pressed},{"Scroll Encounters",[](MenuType type){
Component<EncountersSpawnListScrollableWindowComponent>(type,"Spawns List")->Scroll(-1.0f);
}}},
{{game->KEY_FASTSCROLLUP,Held,InputEngageGroup::NOT_VISIBLE},{"Scroll Encounters",[](MenuType type){
Component<EncountersSpawnListScrollableWindowComponent>(type,"Spawns List")->Scroll(-1.0f);
}}},
{{game->KEY_FASTSCROLLDOWN,Held,InputEngageGroup::NOT_VISIBLE},{"Scroll Encounters",[](MenuType type){
Component<EncountersSpawnListScrollableWindowComponent>(type,"Spawns List")->Scroll(1.0f);
}}},
{{game->KEY_SCROLLVERT_R,Analog},{"Scroll Encounters",[](MenuType type){
Component<EncountersSpawnListScrollableWindowComponent>(type,"Spawns List")->Scroll(game->KEY_SCROLLVERT.Analog());
}}},
{{game->KEY_SCROLLUP,Held},{"",[](MenuType type){

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 6988
#define VERSION_BUILD 6993
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -5,6 +5,9 @@ Interface
# How long to wait for subsequent scrolling through menu items.
ScrollDelay = 0.2s
# Scroll speed for ScrollableWindowComponents in pixels/sec
AnalogScrollSpeed = 220
# The size of each side of the 9-patch menu sprite.
9PatchSize = 24,24

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Loading…
Cancel
Save