Git Product home page Git Product logo

imterm's People

Contributors

lalishansh avatar organic-code avatar yhyu13 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

imterm's Issues

Can't hold focus on command input widget?

Hi there!

I have working well with spdlog integrated too, but there is one big problem... I can't enter any commands.

It seems like everytime I click to enter text into the command input, it only holds focus for 1 frame.

I can only get something into the command input box if I hold a key on the keyboard while clicking the input box.

The tool tip appears for a frame, then disappears, then focus is lost.

problem1-2021-02-13_161948-high

video of problem here

It appears related to the tool tip, because if I get a 'c' into the box (by holding c and clicking the input box to get focus) the problem continues, but once I have two 'c' in the box, it starts to work perfectly, presumably because there are no commands starting with 'cc'. To clarify, once I have got 'cc' into the text input then it behaves normally right up until I press enter, or backspace one 'c'. So seems like somehow the popup completion hint is stealing the focus before I can even try anything?

Using the ImGui 1.80, no compiler errors or warnings, I am using the example code as such...

I brought the ui_terminal_commands.* straight from the example, and in my draw loop....

// Terminal
    static custom_command_struct cmd_struct; // terminal commands can interact with this structure
    static ImTerm::terminal<terminal_commands> terminal_log(cmd_struct);
    static bool once = true;
    static bool showing_term = true;
    if (once){ // do this only once
        terminal_log.set_min_log_level(ImTerm::message::severity::info);
        spdlog::set_level(spdlog::level::trace);
        spdlog::default_logger()->sinks().push_back(terminal_log.get_terminal_helper());        
        once = false;
    }
    if (showing_term) {		
			showing_term = terminal_log.show();
			if (cmd_struct.should_close) {
				//window.close();  // quit?
			}
    }
    // End Terminal

Add an option to show the terminal in a existing window

Hi,
I am using your library in a project in combination with a framework that abstracts away window creation in Dear Imgui. My problem is, your (awesome) library creates its own window. Maybe you want to add a way to show the terminal as a widget and not in another window.
Here are some ideas how this could be done:

  1. change the default behavior of terminal:show()
  2. add another parameter to terminal::show() (maybe something like bool showInWindow = false
  3. add a configuration option somewhere
  4. have a separate function for this use case

or maybe I'm just using your library wrong but that's for you to decide :D

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.