organic-code / imterm Goto Github PK
View Code? Open in Web Editor NEWc++17 header only library implementing a terminal for imgui applications
License: MIT License
c++17 header only library implementing a terminal for imgui applications
License: MIT License
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.
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
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:
or maybe I'm just using your library wrong but that's for you to decide :D
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.