From 3acad1cdef48e7ac7c5adf48db7028663a581124 Mon Sep 17 00:00:00 2001 From: jmf Date: Wed, 1 Jun 2016 22:50:01 +0200 Subject: [PATCH] Making UI nicer, more economical linking (#86) * Removing unneeded linked libs from Server * Remove unused and cluttering menus --- CMakeLists.txt | 11 ++++++++++- client/main.cpp | 31 ++----------------------------- 2 files changed, 12 insertions(+), 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 639c6fae..9dc88c6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,6 +298,15 @@ IF (NOT ${BUILD_DEPS_FIRST}) ${LUA_LIBRARIES} ) + SET(TEC_SERVER_LIBS + ${CMAKE_THREAD_LIBS_INIT} + ${OSX_LIBRARIES} + ${BULLET_LIBRARIES} + libprotobuf + VCOMPUTER_STATIC + ${LUA_LIBRARIES} + ) + ADD_LIBRARY(TEC_LIB STATIC ${TEC_LIB_SRC} ${TEC_INCLUDES} @@ -337,7 +346,7 @@ IF (NOT ${BUILD_DEPS_FIRST}) TARGET_COMPILE_DEFINITIONS( "Server" PUBLIC _WIN32_WINNT=0x600 PROTOBUF_USE_DLLS ) ENDIF (WIN32) - TARGET_LINK_LIBRARIES("Server" TEC_LIB ${TEC_ALL_LIBS}) + TARGET_LINK_LIBRARIES("Server" TEC_LIB ${TEC_SERVER_LIBS}) IF(BUILD_TESTS_TEC) ADD_SUBDIRECTORY("tests") diff --git a/client/main.cpp b/client/main.cpp index 6337271d..b415b184 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -215,36 +215,9 @@ int main(int argc, char* argv[]) { gui.ShowWindow("active_entity"); gui.AddWindowDrawFunction("main_menu", [&os, &connection, &gui] () { if (ImGui::BeginMainMenuBar()) { - if (ImGui::BeginMenu("File")) { - if (ImGui::MenuItem("Load PROTO", "CTRL+L")) { } - if (ImGui::MenuItem("Reload PROTO", "CTRL+R")) { - //tec::ProtoLoad(); - } - if (ImGui::MenuItem("Save PROTO", "CTRL+S")) { - tec::ProtoSave(); - } - ImGui::Separator(); - if (ImGui::MenuItem("Quit", "Alt+F4")) { - tec::ProtoSave(); - os.Quit(); - } - if (ImGui::MenuItem("Quit w/o Saving", "Alt+F4")) { - os.Quit(); - } - ImGui::EndMenu(); - } - if (ImGui::BeginMenu("Edit")) { - if (ImGui::MenuItem("Undo", "CTRL+Z")) { } - if (ImGui::MenuItem("Redo", "CTRL+Y", false, false)) { } // Disabled item - ImGui::Separator(); - if (ImGui::MenuItem("Cut", "CTRL+X")) { } - if (ImGui::MenuItem("Copy", "CTRL+C")) { } - if (ImGui::MenuItem("Paste", "CTRL+V")) { } - ImGui::EndMenu(); - } - if (ImGui::BeginMenu("Windows")) { + if (ImGui::BeginMenu("Connect")) { bool visible = gui.IsWindowVisible("connect_window"); - if (ImGui::MenuItem("Connect", "", visible)) { + if (ImGui::MenuItem("Connect to server...", "", visible)) { if (visible) { gui.HideWindow("connect_window"); }