Prevent material selection cursor from going past its bounds

develop
Anuradha Dissanayake 2013-01-02 22:27:26 +13:00
parent 1fe3a0e343
commit 581a8dd955
1 changed files with 9 additions and 7 deletions

@ -1630,13 +1630,13 @@ namespace wf_ui
static int get_left_margin()
{
int left_margin = gps->dimx - 30;
int8_t a = *df::global::ui_menu_width;
int8_t b = *df::global::ui_area_map_width;
if ((a == 1 && b > 1) || (a == 2 && b == 2))
left_margin -= 24;
return left_margin;
int left_margin = gps->dimx - 30;
int8_t a = *df::global::ui_menu_width;
int8_t b = *df::global::ui_area_map_width;
if ((a == 1 && b > 1) || (a == 2 && b == 2))
left_margin -= 24;
return left_margin;
}
/*
@ -2498,10 +2498,12 @@ namespace wf_ui
else if (input->count(interface_key::CURSOR_LEFT))
{
--selected_column;
validateColumn();
}
else if (input->count(interface_key::CURSOR_RIGHT))
{
selected_column++;
validateColumn();
}
else if (enabler->tracking_on && enabler->mouse_lbut)
{