Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/frontmenu_ingame_tabs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,7 @@ void maintain_activity_up(struct GuiButton *gbtn)
gbtn->flags |= LbBtnF_Visible;
gbtn->flags ^= (gbtn->flags ^ LbBtnF_Enabled * (top_of_breed_list > 0)) & LbBtnF_Enabled;
}
if (wheel_scrolled_up && (is_game_key_pressed(Gkey_SpeedMod, NULL, true)))
if (wheel_scrolled_up && ((is_game_key_pressed(Gkey_SpeedMod, NULL, true)) || mouse_is_over_side_panel_bottom()))
{
if (top_of_breed_list > 0)
{
Expand All @@ -1997,7 +1997,7 @@ void maintain_activity_down(struct GuiButton *gbtn)
gbtn->flags |= LbBtnF_Visible;
gbtn->flags ^= (gbtn->flags ^ LbBtnF_Enabled * (no_of_breeds_owned - 6 > top_of_breed_list)) & LbBtnF_Enabled;
}
if (wheel_scrolled_down && (is_game_key_pressed(Gkey_SpeedMod, NULL, true)))
if (wheel_scrolled_down && (is_game_key_pressed(Gkey_SpeedMod, NULL, true) || mouse_is_over_side_panel_bottom()))
{
if (top_of_breed_list + 6 < no_of_breeds_owned)
{
Expand Down
30 changes: 15 additions & 15 deletions src/frontmenu_ingame_tabs_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,35 +435,35 @@ struct GuiButtonInit creature_query_buttons4[] = {
};

struct GuiMenu main_menu =
{ GMnu_MAIN, 0, 1, main_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 0,};
{ GMnu_MAIN, 0, 1, main_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 0,};
struct GuiMenu room_menu =
{ GMnu_ROOM, 0, 1, room_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_ROOM, 0, 1, room_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu spell_menu =
{ GMnu_SPELL, 0, 1, spell_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_SPELL, 0, 1, spell_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu spell_lost_menu =
{ GMnu_SPELL_LOST, 0, 1, spell_lost_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_SPELL_LOST, 0, 1, spell_lost_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu trap_menu =
{ GMnu_TRAP, 0, 1, trap_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_TRAP, 0, 1, trap_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu creature_menu =
{ GMnu_CREATURE, 0, 1, creature_menu_buttons, 0, 0, 140, 400, gui_activity_background, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_CREATURE, 0, 1, creature_menu_buttons, 0, 0, 140, 400, gui_activity_background, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu query_menu =
{ GMnu_QUERY, 0, 1, query_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_QUERY, 0, 1, query_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu event_menu =
{ GMnu_EVENT, 0, 1, event_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 0,};
{ GMnu_EVENT, 0, 1, event_menu_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 0,};
struct GuiMenu creature_query_menu1 =
{GMnu_CREATURE_QUERY1, 0, 1, creature_query_buttons1, 0, 0, 140, 400, gui_creature_query_background1,0,NULL, NULL, 0, 0, 1,};
{GMnu_CREATURE_QUERY1, 0, 1, creature_query_buttons1, 0, 0, 140, 400, gui_creature_query_background1,0,NULL, NULL, 0, 0, 1,};
struct GuiMenu creature_query_menu2 =
{GMnu_CREATURE_QUERY2, 0, 1, creature_query_buttons2, 0, 0, 140, 400, gui_creature_query_background1,0,NULL, NULL, 0, 0, 1,};
{GMnu_CREATURE_QUERY2, 0, 1, creature_query_buttons2, 0, 0, 140, 400, gui_creature_query_background1,0,NULL, NULL, 0, 0, 1,};
struct GuiMenu creature_query_menu3 =
{GMnu_CREATURE_QUERY3, 0, 1, creature_query_buttons3, 0, 0, 140, 400, gui_creature_query_background2,0,NULL, NULL, 0, 0, 1,};
{GMnu_CREATURE_QUERY3, 0, 1, creature_query_buttons3, 0, 0, 140, 400, gui_creature_query_background2,0,NULL, NULL, 0, 0, 1,};
struct GuiMenu creature_query_menu4 =
{GMnu_CREATURE_QUERY4, 0, 1, creature_query_buttons4, 0, 0, 140, 400, gui_creature_query_background2,0,NULL, NULL, 0, 0, 1,};
{GMnu_CREATURE_QUERY4, 0, 1, creature_query_buttons4, 0, 0, 140, 400, gui_creature_query_background2,0,NULL, NULL, 0, 0, 1,};
struct GuiMenu spell_menu2 =
{ GMnu_SPELL2, 0, 1, spell_menu2_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_SPELL2, 0, 1, spell_menu2_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu room_menu2 =
{ GMnu_ROOM2, 0, 1, room_menu2_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_ROOM2, 0, 1, room_menu2_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
struct GuiMenu trap_menu2 =
{ GMnu_TRAP2, 0, 1, trap_menu2_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};
{ GMnu_TRAP2, 0, 1, trap_menu2_buttons, 0, 0, 140, 400, NULL, 0, NULL, NULL, 0, 0, 1,};

struct TiledSprite status_panel = {
2, 4, {
Expand Down
12 changes: 12 additions & 0 deletions src/kjm_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "frontend.h"
#include "front_input.h"
#include "frontmenu_ingame_map.h"
#include "game_legacy.h"
#include "post_inc.h"

#ifdef __cplusplus
Expand Down Expand Up @@ -581,6 +582,17 @@ TbBool mouse_is_over_panel_map(ScreenCoord x, ScreenCoord y)
long py = (cmy - (y + PANEL_MAP_RADIUS * units_per_px / 16));
return (LbSqrL(px*px + py*py) < PANEL_MAP_RADIUS*units_per_px/16);
}

/**
* Returns if the mouse is over the bottom part of the side menu, below the tab buttons
* @return
*/
TbBool mouse_is_over_side_panel_bottom()
{
if (!flag_is_set(game.operation_flags, GOF_ShowGui))
return false;
return ((GetMouseX() < status_panel_width) && (GetMouseY() > scale_ui_value(185)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm sounds like in 600*480 the added extra panel at the bottom would also count

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm sounds like in 600*480 the added extra panel at the bottom would also count

It does, do you want to have it excluded?

}
/******************************************************************************/
#ifdef __cplusplus
}
Expand Down
2 changes: 2 additions & 0 deletions src/kjm_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ void define_key_input(void);
void init_key_to_strings(void);

TbBool mouse_is_over_panel_map(ScreenCoord x, ScreenCoord y);
TbBool mouse_is_over_side_panel_bottom();

/******************************************************************************/
#ifdef __cplusplus
}
Expand Down
Loading