Comments (14)
Lindows or Winux?
from cuberite.
The penguin :)
from cuberite.
I don't think I get colours either, so it isn't something to do with SSHing in. It's probably windows only colours or something.
from cuberite.
The coloring is currently implemented only on Windows. None of us know the dev details necessary to implement coloring on Linux; we definitely don't want to use a 3rd party library dependency for that.
from cuberite.
Hm. Colours will be -very- useful in distinguishing between normal information and errors. And xterm must support it because it works in other programs. I shall see!
Okay, bearbin doth see.
from cuberite.
Easy! - just need some platform detection stuff and dump in this:
http://stackoverflow.com/questions/2616906/how-do-i-output-coloured-text-to-a-linux-terminal
Of course, for the best practice, the terminfo database should be checked with the type of terminal to make sure it's colour capable.
from cuberite.
So dump it into cMCLogger::SetColor(), there's already the Win32 implementation. The function gets a single byte, the upper 4 bits specify the background color and the lower 4 bits the foreground color, based on the 16-color VGA-like palette.
from cuberite.
The code would have to be squished around, because the setcolour function cannot modify the text it is changing the colour of. Is this ok?
from cuberite.
It doesn't have to - just let that function output the coloring code to the console.
Just make the function not output anything if ANDROID_NDK is defined.
from cuberite.
so it would be ifndef ANDROID_NDK, and then ifdef LINUX or what?
from cuberite.
Let's hope I got the GFM right :)
#ifdef _WIN32
// Current Windows-specific code
#elif !defined(ANDROID_NDK)
// Linux-specific code
#end
from cuberite.
I don't think I'm able to do this - it would require refactoring of the code, and I don't think I'm good enough at C++ to do it.
from cuberite.
I can try, but I have no way of verifying if it works.
from cuberite.
Fixed.
from cuberite.
Related Issues (20)
- 内存回收的问题
- 是否有计划的添加基岩版协议的支持?【Are there plans to add support for the Bedrock Edition protocol?】 HOT 4
- Shift-clicking within a cLuaWindow does not resend player inventory if the OnClicked callback calls CloseWindow HOT 1
- If the player picks up armor while within a chest GUI, the armor won't be rendered
- Feature request: Lua hooks for clicks in the player inventory
- Can't craft a boat in client 1.8.9
- 无法下载服务端 HOT 1
- Players Become Invisible after Teleportation
- Add ARMel builds
- [Building] What's the first GCC version which supports C++17? HOT 1
- Mining bedrock with packetmine drops bedrock. HOT 4
- How offline players join the server HOT 1
- cRoot:ForEachPlayer does not report players that haven't been spawned yet HOT 2
- tnt无法设置为none
- Crash on startup (Segmentation fault) on OpenWRT mips HOT 7
- PPC64 server seems to be unable to handle player XYZ? HOT 2
- Website download page windows does not work HOT 2
- Taking damage on TP HOT 4
- Download Is Unavailable
- One question
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 cuberite.