mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-06 19:39:56 -05:00
Remove more warnings
This commit is contained in:
@@ -50,7 +50,7 @@ public:
|
||||
void deinitializeGL();
|
||||
|
||||
bool mouseButtonCallback(int key, int action);
|
||||
bool mouseWheelCallback(int position);
|
||||
bool mouseWheelCallback(double position);
|
||||
bool keyCallback(int key, int action);
|
||||
bool charCallback(unsigned int character);
|
||||
|
||||
|
||||
@@ -108,8 +108,8 @@ public:
|
||||
|
||||
void keyboardCallback(int key, int action);
|
||||
void mouseButtonCallback(int button, int action);
|
||||
void mousePositionCallback(int x, int y);
|
||||
void mouseScrollWheelCallback(int pos);
|
||||
void mousePositionCallback(double x, double y);
|
||||
void mouseScrollWheelCallback(double pos);
|
||||
|
||||
double deltaTime() const;
|
||||
|
||||
|
||||
@@ -650,7 +650,7 @@ void OpenSpaceEngine::keyboardCallback(int key, int action) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (key == _console->commandInputButton() && (action == SGCT_PRESS || action == SGCT_REPEAT))
|
||||
if (static_cast<unsigned int>(key) == _console->commandInputButton() && (action == SGCT_PRESS || action == SGCT_REPEAT))
|
||||
_console->toggleVisibility();
|
||||
|
||||
if (!_console->isVisible()) {
|
||||
|
||||
+1
-1
@@ -294,7 +294,7 @@ bool GUI::mouseButtonCallback(int key, int action) {
|
||||
return consumeEvent;
|
||||
}
|
||||
|
||||
bool GUI::mouseWheelCallback(int position) {
|
||||
bool GUI::mouseWheelCallback(double position) {
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
bool consumeEvent = io.WantCaptureMouse;
|
||||
if (consumeEvent)
|
||||
|
||||
@@ -112,7 +112,11 @@ namespace {
|
||||
|
||||
static const int bufferSize = 256;
|
||||
static char buffer[bufferSize];
|
||||
#ifdef _MSC_VER
|
||||
strcpy_s(buffer, p->value().length() + 1, p->value().c_str());
|
||||
#else
|
||||
strcpy(buffer, p->value().c_str());
|
||||
#endif
|
||||
ImGui::InputText((ownerName + "." + name).c_str(), buffer, bufferSize);
|
||||
std::string newValue(buffer);
|
||||
|
||||
|
||||
@@ -405,15 +405,15 @@ void InteractionHandler::mouseButtonCallback(int button, int action) {
|
||||
_mouseController->button(MouseAction(action), MouseButton(button));
|
||||
}
|
||||
|
||||
void InteractionHandler::mousePositionCallback(int x, int y) {
|
||||
void InteractionHandler::mousePositionCallback(double x, double y) {
|
||||
if (_mouseController)
|
||||
// TODO Remap screen coordinates to [0,1]
|
||||
_mouseController->move(float(x), float(y));
|
||||
_mouseController->move(static_cast<float>(x), static_cast<float>(y));
|
||||
}
|
||||
|
||||
void InteractionHandler::mouseScrollWheelCallback(int pos) {
|
||||
void InteractionHandler::mouseScrollWheelCallback(double pos) {
|
||||
if (_mouseController)
|
||||
_mouseController->scrollWheel(pos);
|
||||
_mouseController->scrollWheel(static_cast<int>(pos));
|
||||
}
|
||||
|
||||
void InteractionHandler::orbit(const float &dx, const float &dy, const float &dz, const float &dist){
|
||||
|
||||
@@ -331,6 +331,7 @@ function (handle_internal_modules)
|
||||
create_library_name(${module} libraryName)
|
||||
add_subdirectory(${OPENSPACE_MODULE_DIR}/${module})
|
||||
target_link_libraries(OpenSpace ${libraryName})
|
||||
target_link_libraries(libOpenSpace ${libraryName})
|
||||
create_define_name(${module} defineName)
|
||||
target_compile_definitions(libOpenSpace PUBLIC "${defineName}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user