File tree Expand file tree Collapse file tree 4 files changed +27
-14
lines changed
Expand file tree Collapse file tree 4 files changed +27
-14
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
77
8+ ## [ v4.2.0-beta.13] - 2025-01-01
9+
10+ ### Changed
11+
12+ - Target Geode version (v4.0.1 -> v4.1.2)
13+
14+ ### Fixed
15+
16+ - Unable to click on input on MacOS
17+
818## [ v4.2.0-beta.12] - 2024-12-04
919
1020### Added
Original file line number Diff line number Diff line change 11{
2- "geode" : " 4.0.1 " ,
2+ "geode" : " 4.1.2 " ,
33 "gd" : {
44 "win" : " 2.2074" ,
55 "mac" : " 2.2074"
66 },
7- "version" : " v4.2.0-beta.12 " ,
7+ "version" : " v4.2.0-beta.13 " ,
88 "id" : " spaghettdev.betterinputs" ,
99 "name" : " BetterInputs" ,
1010 "developer" : " SpaghettDev" ,
Original file line number Diff line number Diff line change @@ -37,16 +37,17 @@ inline bool keyDown(PlatformKey key, NSEvent* event)
3737
3838 namespace cocos
3939 {
40- inline cocos2d::CCPoint getMousePosition (NSEvent * event)
41- {
42- auto windowFrame = [[event window ] frame ];
43- auto viewFrame = [[[event window ] contentView ] frame ];
44- auto winSize = cocos2d::CCDirector::get ()->getWinSize ();
45- auto scaleFactor = cocos2d::CCPoint (winSize) / ccp (viewFrame.size .width , viewFrame.size .height );
46- auto mouse = [event locationInWindow ];
47-
48- return ccp (mouse.x - windowFrame.origin .x , winSize.height - (mouse.y - windowFrame.origin .y )) * scaleFactor;
49- }
40+ // TODO: fix
41+ // inline cocos2d::CCPoint getMousePosition(NSEvent* event)
42+ // {
43+ // auto windowFrame = [[event window] frame];
44+ // auto viewFrame = [[[event window] contentView] frame];
45+ // auto winSize = cocos2d::CCDirector::get()->getWinSize();
46+ // auto scaleFactor = cocos2d::CCPoint(winSize) / ccp(viewFrame.size.width, viewFrame.size.height);
47+ // auto mouse = [event locationInWindow];
48+
49+ // return ccp(mouse.x - windowFrame.origin.x, winSize.height - (mouse.y - windowFrame.origin.y)) * scaleFactor;
50+ // }
5051 }
5152}
5253
Original file line number Diff line number Diff line change @@ -99,18 +99,20 @@ namespace BI
9999
100100 namespace cocos
101101 {
102- #ifdef GEODE_IS_WINDOWS
103102 inline cocos2d::CCPoint getMousePosition ()
104103 {
104+ #ifdef GEODE_IS_WINDOWS
105105 auto * director = cocos2d::CCDirector::sharedDirector ();
106106 auto * gl = director->getOpenGLView ();
107107 auto winSize = director->getWinSize ();
108108 auto frameSize = gl->getFrameSize ();
109109 auto mouse = gl->getMousePosition () / frameSize;
110110
111111 return cocos2d::CCPoint{ mouse.x , 1 .f - mouse.y } * winSize;
112- }
112+ #elif defined(GEODE_IS_MACOS)
113+ return geode::cocos::getMousePos ();
113114#endif
115+ }
114116
115117 inline bool isPositionInNode (cocos2d::CCNode* node, const cocos2d::CCPoint& pos)
116118 {
You can’t perform that action at this time.
0 commit comments