Giter Site home page Giter Site logo

clojure-lanterna's People

Contributors

cmdrdats avatar mattearnshaw avatar moquist avatar multimud avatar nick-orton avatar sjl avatar zachallaun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clojure-lanterna's Issues

Corrupted characters on fresh ubuntu install

Using clojure-lanterna 0.9.2 I am getting a swing window that is too narrow and the characters are corrupted. After a bit of digging, it looks like the cause is with the default constructor in the Lanterna library, which defaults to using a "Courier New" typeface, which is not a default GNU/Linux/Ubuntu typeface.

To workaround the problem, I downloaded and installed a "Courier New" truetype font.

The Lanterna issue is here https://code.google.com/p/lanterna/issues/detail?id=8&can=1

Add put-sheet to the clojars repository!

This is an awesome function that I would love to start using. For now i'm forced to copy and paste it into my project. Let's make a new release and put it in!

Redraw writes green X's

I get a screen looking like the one below, when i try to run the following code:

(ns test.core
  (:use lanterna.screen))

(defn main-loop [scr x y]
  (redraw scr)
  (let [k (get-key-blocking scr)]))

(defn main []
  (let [scr (get-screen :swing)]
    (in-screen scr
               (main-loop scr 0 0))))

screen-0

Any suggestions?

Can't require, java error.

I'm super new to this. Trying to follow your Caves of Clojure series is the first Clojure I've written outside the repl. I've gotten Leiningen and Clojure working fine, but I can't get clojure-lanterna to work.

It looks like Leiningen did resolve the lanterna dep since there are lanterna folders in ~\.m2.

Here is the error:

user=> (require 'lanterna.screen)
FileNotFoundException Could not locate lanterna/screen__init.class or lanterna/screen.clj on classpath:   clojure.lang.RT.load (RT.java:443)

Here is lein classpath (yes I'm on Windows):

C:\Users\kitsu\Dropbox\projects\clj-caves\test;C:\Users\kitsu\Dropbox\projects\clj-caves\src;C:\Users\kitsu\Dropbox\projects\clj-caves\dev-resources;C:\Users\kitsu\Dropbox\projects\clj-caves\resources;C:\Users\kitsu\Dropbox\projects\clj-caves\target\classes;C:\Users\kitsu\.m2\repository\clojure-complete\clojure-complete\0.2.3\clojure-complete-0.2.3.jar;C:\Users\kitsu\.m2\repository\org\clojure\tools.nrepl\0.2.3\tools.nrepl-0.2.3.jar;C:\Users\kitsu\.m2\repository\clojure-lanterna\clojure-lanterna\0.9.4\clojure-lanterna-0.9.4.jar;C:\Users\kitsu\.m2\repository\com\googlecode\lanterna\lanterna\2.1.5\lanterna-2.1.5.jar;C:\Users\kitsu\.m2\repository\org\clojure\clojure\1.5.1\clojure-1.5.1.jar

Does not recognise modifier keys

The functions get-key and get-key-blocking are giving you all keys pressed. But they don't seem to recognise the Control, Alt & super (and on Mac Command) keys.

For instance, get-key returns 'å' when I hit Alt-a on my mac keyboard. Ctrl and any character just returns the character. It would be nice to let the program get {:mod :ctrl :key "a"} or something like that.

Feature Request: Hide Cursor

According to the Java lanterna if you set the cursor to null it will hide the cursor: https://github.com/mabe02/lanterna/blob/release/2.1/src/main/java/com/googlecode/lanterna/screen/Screen.java#L121.

However, This doesn't work Clojure lanterna because you hit a null pointer exception because x and y are undefined: https://github.com/MultiMUD/clojure-lanterna/blob/master/src/lanterna/screen.clj#L132.

Do you have any plans on adding this feature to clojure-lanterna? I'd love to add it through a pull request but I'm pretty new to Clojure and I'm pretty sure my code would be ugly and nonidiomatic.

Odd characters in Hello, World example

When I run

(let [term (t/get-terminal :unix)]
  (t/in-terminal term
    (t/put-string term "Hello!  Press any key to end.")
    (t/get-key-blocking term)))

in text mode, I get funny characters:

screen shot 2015-01-18 at 12 04 39 pm

On OS-X, this happens when I :unix or :text. Haven't tried any other OS. It's not there when I :swing. Any thoughts?

Obtain character at coordinates?

Hi. There are plenty of functions to set text at given coordinates, but it would also be possible to retrieve rows or columns from the screen or terminal.

Plans on development?

Hello I enjoy using this library, but do you plan on doing more development on thie library?

I have created a little snake game using this library.

cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.