Split PC editor items menus into columns
- And increase columns for scenario editor items menus
This commit is contained in:
@@ -54,7 +54,9 @@ void update_item_menu() {
|
|||||||
AppendMenuA(items_menu, MF_STRING | MF_GRAYED, 1000, "Items Not Loaded");
|
AppendMenuA(items_menu, MF_STRING | MF_GRAYED, 1000, "Items Not Loaded");
|
||||||
} else for(int i = 0; i < 100; i++) {
|
} else for(int i = 0; i < 100; i++) {
|
||||||
cItemRec& item = item_list[i + j * 100];
|
cItemRec& item = item_list[i + j * 100];
|
||||||
AppendMenuA(items_menu, MF_STRING | MF_ENABLED, 1000 + j * 100 + i, item.full_name.c_str());
|
UINT flags = MF_STRING | MF_ENABLED;
|
||||||
|
if(i % 25 == 0) flags |= MF_MENUBARBREAK;
|
||||||
|
AppendMenuA(items_menu, flags, 1000 + j * 100 + i, item.full_name.c_str());
|
||||||
// TODO: Also disable gold or food
|
// TODO: Also disable gold or food
|
||||||
EnableMenuItem(items_menu, i, MF_BYPOSITION | (item.variety != eItemType::NO_ITEM ? MF_ENABLED : MF_GRAYED));
|
EnableMenuItem(items_menu, i, MF_BYPOSITION | (item.variety != eItemType::NO_ITEM ? MF_ENABLED : MF_GRAYED));
|
||||||
}
|
}
|
||||||
|
@@ -52,7 +52,7 @@ void update_item_menu() {
|
|||||||
while(GetMenuItemCount(item_menu)) RemoveMenu(item_menu, 0, MF_BYPOSITION);
|
while(GetMenuItemCount(item_menu)) RemoveMenu(item_menu, 0, MF_BYPOSITION);
|
||||||
for(int i = 0; i < 80; i++) {
|
for(int i = 0; i < 80; i++) {
|
||||||
UINT flags = MF_STRING | MF_ENABLED;
|
UINT flags = MF_STRING | MF_ENABLED;
|
||||||
if(i % 40 == 0) flags |= MF_MENUBARBREAK;
|
if(i % 20 == 0) flags |= MF_MENUBARBREAK;
|
||||||
AppendMenuA(item_menu, flags, 10000 + i + j * 80, scenario.scen_items[i + j * 80].full_name.c_str());
|
AppendMenuA(item_menu, flags, 10000 + i + j * 80, scenario.scen_items[i + j * 80].full_name.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user