Isolate ui submodule

Isolate ui from rest of the project, minor cleanups.
This commit is contained in:
Azamat H. Hackimov 2024-07-28 00:24:58 +03:00
parent e9ac3b3ceb
commit 87882c9976
16 changed files with 36 additions and 25 deletions

View File

@ -8,6 +8,7 @@ target_link_libraries(Direct_TCP_IP PRIVATE
ddio
inetfile
misc
ui
$<$<PLATFORM_ID:Windows>:ws2_32>
)

View File

@ -14,6 +14,7 @@ target_link_libraries(Parallax_Online PRIVATE
ddio
inetfile
misc
ui
$<$<PLATFORM_ID:Windows>:ws2_32>
)

View File

@ -1,4 +1,3 @@
set(HEADERS UIlib.h)
set(CPPS
UIButton.cpp
UICombo.cpp
@ -14,11 +13,17 @@ set(CPPS
UISlider.cpp
UIStatic.cpp
UISystem.cpp
UIWindow.cpp)
UIWindow.cpp
)
add_library(ui STATIC ${HEADERS} ${CPPS})
add_library(ui STATIC ${CPPS})
target_link_libraries(ui PRIVATE
ddio
mem
misc
)
target_include_directories(ui PUBLIC
$<BUILD_INTERFACE:
${PROJECT_SOURCE_DIR}/ui
>
)

View File

@ -121,9 +121,9 @@
* $NoKeywords: $
*/
#include "UIlib.h"
#include <cstring>
#include <string.h>
#include "UIlib.h"
#if defined(POSIX)
int UIButton::m_ButtonFont;

View File

@ -54,15 +54,14 @@
* $NoKeywords: $
*/
#include <cstdarg>
#include <cstring>
#include "UIlib.h"
#include "grtext.h"
#include "mem.h"
#include "textaux.h"
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#define CONSOLE_LINE_FILLER 128
// UIConsoleGadget should display a simple console gadget inside a window

View File

@ -78,11 +78,11 @@
*/
#include "UIlib.h"
#include "3d.h"
#include "bitmap.h"
#include "grtext.h"
#include "ddvid.h"
#include "renderer.h"
#include "grtext.h"
#include "3d.h"
//////////////////////////////////////////////////////////////////////////////
// VARIABLES

View File

@ -117,9 +117,10 @@
* $NoKeywords: $
*/
#include <cstring>
#include "UIlib.h"
#include "Macros.h"
#include <string.h>
int UIGadget::m_LastKey = 0;
int UIGadget::m_LastKeyCount = 0;

View File

@ -44,9 +44,10 @@
* $NoKeywords: $
*/
#include "UIlib.h"
#include <string.h>
#include <cstdlib>
#include <cstring>
#include "UIlib.h"
#include "mem.h"
// ----------------------------------------------------------------------------

View File

@ -157,10 +157,10 @@
* $NoKeywords: $
*/
#include "UIlib.h"
#include <cstdlib>
#include <cstring>
#include <stdlib.h>
#include <string.h>
#include "UIlib.h"
#define SCROLL_BUTTON_GAP 4

View File

@ -16,12 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <cstring>
#include "UIlib.h"
#include "uisys.h"
#include "pserror.h"
#include "grtext.h"
#include <string.h>
#include "mem.h"
#include "pserror.h"
#include "uisys.h"
//@@void *UIItem::operator new(size_t mem, UIItem *item, tUIResClass class_type)
//@@{

View File

@ -66,9 +66,9 @@
* $NoKeywords: $
*/
#include "UIlib.h"
#include <cstring>
#include <string.h>
#include "UIlib.h"
// ----------------------------------------------------------------------------
// UIText

View File

@ -165,13 +165,14 @@
*
* $NoKeywords: $
*/
#include "UIlib.h"
#include "application.h"
#include "bitmap.h"
#include "ddvid.h"
#include "renderer.h"
#include "psclass.h"
#include "Macros.h"
#define UI_MOUSE_HOTX 2
#define UI_MOUSE_HOTY 2
#define UI_FRAMETIME 0.05

View File

@ -267,13 +267,14 @@
#ifndef UI_H
#define UI_H
#include <cstdint>
#if defined(POSIX)
#include "linux_fix.h" //for stricmp's through code
#endif
#include "uires.h"
#include "pstypes.h"
#include "pserror.h"
#include "grdefs.h"

View File

@ -87,8 +87,8 @@
#ifndef UIRES_H
#define UIRES_H
#include "grdefs.h"
#include "bitmap.h"
#include "grdefs.h"
enum tUIResClass { uiItem, uiTextItem, uiBitmapItem };