From 60730702a579e0cd8e0a3858eebdbc5d66409b60 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Mon, 5 Jan 2015 13:25:18 -0500 Subject: [PATCH] Split PC editor items menus into columns - And increase columns for scenario editor items menus --- src/pcedit/pc.menus.win.cpp | 4 +++- src/scenedit/scen.menus.win.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pcedit/pc.menus.win.cpp b/src/pcedit/pc.menus.win.cpp index c6e24b45..1cb157c0 100644 --- a/src/pcedit/pc.menus.win.cpp +++ b/src/pcedit/pc.menus.win.cpp @@ -54,7 +54,9 @@ void update_item_menu() { AppendMenuA(items_menu, MF_STRING | MF_GRAYED, 1000, "Items Not Loaded"); } else for(int i = 0; i < 100; i++) { 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 EnableMenuItem(items_menu, i, MF_BYPOSITION | (item.variety != eItemType::NO_ITEM ? MF_ENABLED : MF_GRAYED)); } diff --git a/src/scenedit/scen.menus.win.cpp b/src/scenedit/scen.menus.win.cpp index b44a56bd..2163eff2 100644 --- a/src/scenedit/scen.menus.win.cpp +++ b/src/scenedit/scen.menus.win.cpp @@ -52,7 +52,7 @@ void update_item_menu() { while(GetMenuItemCount(item_menu)) RemoveMenu(item_menu, 0, MF_BYPOSITION); for(int i = 0; i < 80; i++) { 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()); } }