mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fix cocoa example - some absolute paths needed in cmake, and float conversion to sf::Angle
This commit is contained in:
parent
0b4d9ca822
commit
e01e4760e9
@ -35,7 +35,7 @@ set(SRC CocoaAppDelegate.h
|
||||
NSString+stdstring.mm
|
||||
main.m)
|
||||
|
||||
compile_xib(INPUT "MainMenu.xib" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/MainMenu.nib")
|
||||
compile_xib(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/MainMenu.xib" OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/MainMenu.nib")
|
||||
|
||||
# all resource files
|
||||
set(RESOURCES resources/icon.icns
|
||||
@ -56,5 +56,5 @@ sfml_add_example(cocoa
|
||||
DEPENDS SFML::System SFML::Window SFML::Graphics)
|
||||
set_target_properties(cocoa PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST resources/Cocoa-Info.plist)
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resources/Cocoa-Info.plist)
|
||||
target_link_libraries(cocoa PRIVATE "-framework Cocoa" "-framework Foundation" SFML::Graphics)
|
||||
|
@ -199,7 +199,7 @@ struct SFMLmainWindow
|
||||
if (self.initialized)
|
||||
{
|
||||
float angle = [sender floatValue];
|
||||
self.mainWindow->sprite.setRotation(angle);
|
||||
self.mainWindow->sprite.setRotation(sf::degrees(angle));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user