Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,79 +110,104 @@ endif()

if(WIN32)
file(GLOB FRONTEND_FILES
src/frontend/*.h
src/frontend/*.cpp
msvc/Skyscraper.rc
)
else()
file(GLOB FRONTEND_FILES
src/frontend/*.h
Comment thread
avrdude-t marked this conversation as resolved.
src/frontend/*.cpp
)
endif()

if(WIN32 AND wxWidgets_FOUND)
file(GLOB VM_FILES
src/vm/*.h
src/vm/*.cpp
src/gui/*.h
src/gui/*.cpp
src/editor/*.h
src/editor/*.cpp
msvc/VM.rc
)
else()
file(GLOB VM_FILES
src/vm/*.h
src/vm/*.cpp
msvc/VM.rc
)
endif()

if (NOT WIN32 AND wxWidgets_FOUND)
file(GLOB GUI_FILES
src/gui/*.h
src/gui/*.cpp
)
endif ()

file(GLOB EDITOR_FILES
src/editor/*.h
src/editor/*.cpp
)

file(GLOB NETWORK_FILES
src/net/*.h
src/net/*.cpp
)

file(GLOB SCRIPTPROC_FILES
src/script/*.h
src/script/*.cpp
)

file(GLOB SBS_FILES
src/sbs/*.h
src/sbs/*.cpp
src/sbs/polymesh/*.h
src/sbs/polymesh/*.cpp
src/sbs/controllers/*.h
src/sbs/controllers/*.cpp
src/sbs/objects/*.h
src/sbs/objects/*.cpp
src/sbs/system/*.h
src/sbs/system/*.cpp
msvc/SBS.rc
)

file(GLOB ALLOC_FILES
src/alloc/*.h
src/alloc/*.cpp
)

file(GLOB OPENXR_FILES
src/openxr/src/*.h
src/openxr/src/*.cpp
msvc/OpenXR.rc
)

file(GLOB OGREBULLET_COLL_FILES
ogrebullet/Collisions/src/*.h
ogrebullet/Collisions/src/*.cpp
ogrebullet/Collisions/src/Debug/*.h
ogrebullet/Collisions/src/Debug/*.cpp
ogrebullet/Collisions/src/Shapes/*.h
ogrebullet/Collisions/src/Shapes/*.cpp
ogrebullet/Collisions/src/Utils/*.h
ogrebullet/Collisions/src/Utils/*.cpp
)

file (GLOB OGREBULLET_DYN_FILES
ogrebullet/Dynamics/src/*.h
ogrebullet/Dynamics/src/*.cpp
ogrebullet/Dynamics/src/Constraints/*.h
ogrebullet/Dynamics/src/Constraints/*.cpp
ogrebullet/Dynamics/src/Prefab/*.h
ogrebullet/Dynamics/src/Prefab/*.cpp
)

file (GLOB IMGUIZMO_FILES
dependencies/ImGuizmo/*.h
dependencies/ImGuizmo/*.cpp
)

Expand Down
3 changes: 2 additions & 1 deletion src/frontend/skyscraper.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
#ifndef SKYSCRAPER_H
#define SKYSCRAPER_H

#include "globals.h"

#ifndef USING_WX
#include <filesystem>
#include "Ogre.h"
#include "OgreApplicationContext.h"
#include "OgreInput.h"
#include "OgreRTShaderSystem.h"
Expand Down
34 changes: 14 additions & 20 deletions src/frontend/startscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,35 +422,29 @@ bool StartScreen::GetMenuInput()
//change button status based on mouse position and button press status
if (mouse_x_rel > button->x && mouse_x_rel < button->x + button->size_x && mouse_y_rel > button->y && mouse_y_rel < button->y + button->size_y)
{
if (button->drawn_selected == false && wxGetMouseState().LeftIsDown() == false)
if (button->drawn_pressed == true && wxGetMouseState().LeftIsDown() == false && wxGetMouseState().RightIsDown() == false)
{
if (button->drawn_pressed == true)
{
//user clicked on button
button->drawn_selected = true;
if (right_down_last == true)
RightClick(i);
return true;
}
button->drawn_selected = true;
}
if (button->drawn_selected == false && wxGetMouseState().RightIsDown() == false)
{
if (button->drawn_pressed == true)
{
//user clicked on button
button->drawn_selected = true;
else
Click(i);
return true;
}

button->drawn_pressed = false;
button->drawn_selected = true;
return true;
}
if (button->drawn_pressed == false && (wxGetMouseState().LeftIsDown() == true || wxGetMouseState().RightIsDown() == true))
if (wxGetMouseState().LeftIsDown() == true || wxGetMouseState().RightIsDown() == true)
{
button->drawn_pressed = true;
right_down_last = wxGetMouseState().RightIsDown();
button->drawn_selected = false;
button->drawn_pressed = true;
}
else
{
button->drawn_selected = true;
}
}
else if (button->drawn_selected == true || button->drawn_pressed == true)
else
{
button->drawn_selected = false;
button->drawn_pressed = false;
Expand Down
1 change: 1 addition & 0 deletions src/frontend/startscreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class StartScreen
};
buttondata *buttons;
int buttoncount;
bool right_down_last;

Ogre::Rectangle2D* background_rect;
Ogre::SceneNode* background_node;
Expand Down
5 changes: 3 additions & 2 deletions src/vm/vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,22 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "vm.h"

#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
#include <sys/sysctl.h>
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#include <windows.h>
#undef LoadLibrary
#endif
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX
#include <sys/utsname.h>
#endif
#include <iostream>
#include "dylib.hpp"
#include "globals.h"
#include "sbs.h"
#include "polymesh.h"
#include "vm.h"
#include "camera.h"
#include "scenenode.h"
#include "soundsystem.h"
Expand Down
2 changes: 1 addition & 1 deletion src/vm/vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define VM_H

#include <thread>
#include <vector>
#include "globals.h"

//DLL Exporting
#ifdef _WIN32
Expand Down