Comments (13)
What Lua version do you use?
goto
is a keyword in Lua 5.2 so the method was renamed to gotoobject
, but it's still available as goto
on Lua 5.1 and earlier.
So that I assume that you use Lua 5.2 or 5.3 that might dropped automatic loading of io
library as it did for coroutines
.
from celestia.
@GottfriedSp please test #65
from celestia.
Ok, I try the gotoobject.
The other thing I found in celx.cpp line 744, this i changed to:
if(strcmp(c_p, "y") == 0 || strcmp(c_p, "Y") == 0)
The qt sends from CelestiaGlWidget::keyPressEvent line 535 the key 'Y':
appCore->charEntered('Y');
Now it works perfectly.
From Windows native the key 'y' comes from MainWindowProc() line 4291:
appCore->charEntered(utf8CharCode, modifiers);
I added the commit into my Pull request. (Each new Push from my local repository added to the Pull request to the open Pull request here, and I don't know why)
Current Lua: 5.1.5
I try to update to Lua 5.3.4 but I think this works also.
from celestia.
If you use windows, then the only supported Lua so far is 5.1. Only Unix builds support Lua 5.2 & 5.3.
That's quite strange that you have io==nil with 5.1, my Celestia 1.6.2 linked against Lua 5.1 works with your script.
from celestia.
Ok, maybe the Qt 5.6.3 for windows.
When I click into screen and press ENTER and then press the keys "p r o x i m a" I see in the screen the word "prOXIma" - see screenshot below.
It works with both, my changes and the changes #65
The system cyllene looks like this picture:
I have Qt5.6.3 windows 64-bit with platformtoolset v140 and 32-bit with platformtoolset v140_xp
Qt with msvc2015 compiler (visual studio and qt-creator)
I build the lua 5.1 and 5.3 with visual studio 2015 as static lib and the 5.3 also works with the current celestia 1.7.0
from celestia.
The io==nil comes from the upper case 'Y' even if i press 'y'
from celestia.
You're right, I tested Lua 5.3 with windows and celestia crashes -> switch back to 5.1 for windows.
from celestia.
So, let's summarize:
- Qt related code sends incorrect characters (uppercased), so your dcaa0a7 just workarounds the problem in one particular case. We need a better fix.
- celestia:requestsystemaccess() should either abort script if 'y' wasn't pressed or return false so script author can process it.
from celestia.
1b1781d (partially) and 0c6786b should be reverted as they are ugly hack and cause this issue.
from celestia.
But the check for 'y' or 'Y' should be ok if the caps lock is pressed or the user click the key 'Y'.
The other code also should be changed, I see for VK_C:
else if (e->modifiers().testFlag(Qt::ShiftModifier)) appCore->charEntered('C'); else appCore->charEntered('c'); break;
But this is not clean code to add this for each keystroke, I look for a better solution for that.
from celestia.
Ah, ok i see, the defines with hexadecimal values.
I think the cases with the same functionality can be blocked together
from celestia.
Partially fixed?
from celestia.
Yes, only partially. Now if you press 'y' then celx code receives 'y' not 'Y', but we still need to properly fix case when 'Y' is pressed (trivially) and make celestia:requestsystemaccess() return result (not so easy because of asynchronous nature of how interaction with user is implemented).
from celestia.
Related Issues (20)
- Incorrect texturing for add-ons HOT 1
- Strating celestia-qt with URL crashes the program HOT 2
- Many question marks in Chinese enviroment HOT 2
- The pronunciation of Celestia
- Very distant objects don't display
- Pre-Windows 10 1903 versions of ICU HOT 2
- [Win32] Goto Object dialog ignores zeroes
- [Qt] Barycenters in star browser HOT 1
- CI: MacOS front-ends HOT 2
- setlocale is not thread safe, causing crash due to race HOT 2
- Classic star colors HOT 1
- Incorrect contexted string extracted from windows RC files
- Dubious test in shadermanager.cpp
- Could not read star database HOT 2
- Wasted data for ring systems
- Recent GTK changes cause build error HOT 6
- segfault when exiting celestia (qt5/qt6)
- std::binary_function is (deprecated in C++11) and (removed in C++17) HOT 1
- `ApplyShadow` result discarded during shader creation HOT 1
- Constellation lines beyond Solar System
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celestia.