Skip to content

Commit

Permalink
Move base widgets to xrUI library
Browse files Browse the repository at this point in the history
  • Loading branch information
ForserX committed Sep 22, 2024
1 parent e6d9fe7 commit 6fad7f7
Show file tree
Hide file tree
Showing 424 changed files with 15,314 additions and 15,297 deletions.
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if(NOT IXRAY_COMPRESSOR_ONLY)
add_subdirectory("xrPhysics")
add_subdirectory("xrParticles")
add_subdirectory("xrScripts")
add_subdirectory("xrUI")
endif()

if(NOT IXRAY_COMPRESSOR_ONLY)
Expand Down Expand Up @@ -52,6 +53,7 @@ if(NOT IXRAY_COMPRESSOR_ONLY)
set_target_properties(xrParticles PROPERTIES ${IXRAY_FOLDER_ENGINE})
set_target_properties(xrAbstractions PROPERTIES ${IXRAY_FOLDER_ENGINE})
set_target_properties(xrScripts PROPERTIES ${IXRAY_FOLDER_ENGINE})
set_target_properties(xrUI PROPERTIES ${IXRAY_FOLDER_ENGINE})

if(IXR_TEST_CI)
set_target_properties(xrGame PROPERTIES ${IXRAY_FOLDER_GAME})
Expand Down
3 changes: 2 additions & 1 deletion src/xrEngine/IGame_Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
#include "stdafx.h"
#include "IGame_Actor.h"

ENGINE_API IGame_Actor* g_pIGameActor = nullptr;
ENGINE_API IGame_Actor* g_pIGameActor = nullptr;
ENGINE_API int psActorSleepTime = 1;
9 changes: 7 additions & 2 deletions src/xrEngine/IGame_Actor.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#pragma once
#include "IInputReceiver.h"

class IGame_Actor
class IGame_Actor:
public IInputReceiver
{
public:
virtual xr_vector<xr_string> GetKnowedPortions() const = 0;
Expand All @@ -9,6 +11,9 @@ class IGame_Actor
virtual void DisableInfoPortion(const char* info_id) = 0;
virtual void SetActorPosition(Fvector pos) = 0;
virtual void SetActorDirection(float dir) = 0;
virtual void StopAnyMove() = 0;
};

extern ENGINE_API IGame_Actor* g_pIGameActor;
extern ENGINE_API IGame_Actor* g_pIGameActor;

extern ENGINE_API int psActorSleepTime;
1 change: 1 addition & 0 deletions src/xrEngine/IGame_Level.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class ENGINE_API IGame_Level :
virtual shared_str name () const = 0;
virtual void GetLevelInfo ( CServerInfo* si ) = 0;

virtual u64 GetGameTime () { return 0; };
virtual BOOL net_Start ( LPCSTR op_server, LPCSTR op_client) = 0;
virtual void net_Load ( LPCSTR name ) = 0;
virtual void net_Save ( LPCSTR name ) = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/xrEngine/IGame_Menu.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#include "stdafx.h"
#include "IGame_Menu.h"
17 changes: 17 additions & 0 deletions src/xrEngine/IGame_Menu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once
class CUIWindow;

class IMainMenu
{
public:
virtual ~IMainMenu() {};
virtual void Activate(bool bActive) = 0;
virtual bool IsActive() = 0;
virtual bool CanSkipSceneRendering() = 0;
virtual void DestroyInternal(bool bForce) = 0;

virtual void RegisterPPDraw(CUIWindow*) = 0;
virtual void UnregisterPPDraw(CUIWindow*) = 0;

virtual class CDialogHolder* GetDialogHolder() = 0;
};
14 changes: 1 addition & 13 deletions src/xrEngine/IGame_Persistent.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef IGame_PersistentH
#define IGame_PersistentH
#pragma once

#include "../xrServerEntities/gametype_chooser.h"
Expand Down Expand Up @@ -113,17 +111,7 @@ class ENGINE_API IGame_Persistent :
virtual bool CanBePaused () { return true;}
};

class IMainMenu
{
public:
virtual ~IMainMenu () {};
virtual void Activate (bool bActive) =0;
virtual bool IsActive () =0;
virtual bool CanSkipSceneRendering () =0;
virtual void DestroyInternal (bool bForce) =0;
};

extern ENGINE_API bool g_dedicated_server;
extern ENGINE_API IGame_Persistent* g_pGamePersistent;
#endif //IGame_PersistentH

#include "IGame_Menu.h"
4 changes: 4 additions & 0 deletions src/xrEngine/IGame_UICustom.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#include "stdafx.h"
#include "IGame_UICustom.h"

ENGINE_API IGame_CustomUI* g_pGameCustom = nullptr;
11 changes: 11 additions & 0 deletions src/xrEngine/IGame_UICustom.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

class IGame_CustomUI
{
public:
virtual void ShowGameIndicators(bool) = 0;
virtual bool GameIndicatorsShown() const = 0;
virtual class CDialogHolder* GetDialogHolder() = 0;
};

extern ENGINE_API IGame_CustomUI* g_pGameCustom;
Loading

0 comments on commit 6fad7f7

Please sign in to comment.