Giter VIP home page Giter VIP logo

cinder-imgui's People

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  avatar  avatar  avatar  avatar  avatar

cinder-imgui's Issues

License

Could you please set an opensource license for your work? So I can use it without worries.

TIA :)

git in cinderblock.xml

Hey, any chance you could add the following attribute to your cinderblock.xml file so that Tinderbox can add it to projects as a submodule?

git="[email protected]:simongeilfus/Cinder-ImGui.git"

imgui folder empty

Hi,
I think there is a mistake on the project. It doesn't include any file inside lib/imgui folder; then Xcode doesn't find "imgui.h" and the rest.

How can I try this block?
Thanks

David

Update Imgui to fix failing assertion

Hi, I occasionally get this crash:

Assertion failed: (g.IO.DeltaTime >= 0.0f), function NewFrame, file /Applications/_cinder/CinderApps/ross_smith/ornicube/Ornicube/blocks/ImGui/lib/imgui/imgui.cpp, line 2089.

Which was reported to Imgui here and resolved here

any chance of updating the Imgui submodule to include this fix?

xcode samples dont work

i ran into these problems when trying to run with xcode

  1. ui::ShowDemoWindow() does not exist should be ui::ShowTestWindow();
  2. path to cinder libs is wrong should be "$(CINDER_PATH)/lib/macosx/Debug/libcinder.a" and
    "$(CINDER_PATH)/lib/macosx/Release/libcinder.a"
  3. crashes as soon as you start the example in ImGuiWindow* GetCurrentWindow()

Multiple glyph ranges are not supported by a single font

If you try to specify multiple glyph ranges, you only get the first one.

For example:

    // In setup():
    auto robo = getAssetPath("Roboto-Medium.ttf");
    auto const firstArrow = L'';
    auto const lastArrow = L'';
    auto options = ui::Options()
        .fonts({ { robo, 16.0f } }, false)
        .fontGlyphRanges(robo.stem().string(), { 0x20, 0xff, firstArrow, lastArrow, 0 });

    // ... more setup of options ...

    ui::initialize(options);

Then, later in the GUI drawing code, try to draw using a mixture of characters from both glyph ranges (here, the arrows will show the "missing" symbol). For example:

    if (ui::MenuItem(u8"Move up (shift-↑)")) {
        // blah
    }

Sliders get stuck in text-input mode

What causes sliders (ui::SliderFloat) to switch over to text-input mode? Sometimes the gui switches modes and I can no longer slide the sliders until I restart the application (attempting to slide creates a text input buffer). Any idea what might be causing this?

May be a how-to-use question more than a bug, but it's unclear what causes the switch.

Tinderbox doesn't build on MacOS

I am currently using MacOS Sierra. I can get other libs like PretzelGUI working and so on, but ImGUI is not able to be generated by tinderbox -> this is the error I get:

Unable to copy from /Users/luisarandas/cinder_0.9.1_mac/blocks/Cinder-ImGui/lib/imgui/imconfig.h to /Users/luisarandas/cinder_0.9.1_mac/myApps/test/blocks/ImGui/lib/imgui/imconfig.h(GenerateFailed)

The lib folder seems to be empty.
Thanks in advance

ui::InputText widget can't input characters

I use cinder-imgui in ubuntu 14 to write some toy code. When i pressed keyboard to type characters to ui::InputText widgets, the widgets' contents didn't insert any new characters. However, when i pressed the delete key, the characters in widgets could be deleted. Even in the test demo window, i can't insert any words in console examples. The 'WantCaptureKeyboard' and 'WantTextInput' flags in test demo windows were set to 1 when i focus and ui::InputText. It works when i test samples in imgui, but it dosen't works when i test in cinder-imgui. Could any one can give some advice how to set cinder-imgui properly?

signals::ConnectionList Error

The line 925
static signals::ConnectionList sWindowConnections;
throws a compiler error:
/Users/rodrigo/Herramientas/cinder_0.9.0_mac/blocks/Cinder-ImGui/src/CinderImGui.cpp:925:17: No type named 'ConnectionList' in namespace 'cinder::signals'; did you mean 'Connection'?

Could not build

Hello

I cannot build this block the following errors.
screen shot 2016-04-17 at 8 48 31 am

When I comment out these code, it works fine.
How to fix this errors?

I'm using

Setting fontGlobalScale in Options causes error

Trying to set the font scale in the initialisation options causes an error.

ui::initialize( ui::Options().fontGlobalScale( getWindowContentScale() ) );

results in:

Assertion failed: (GImGui != __null && "No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?"), function GetIO, file /Users/felixfaire/Developer/Cinder-0.9/Cinder/blocks/Cinder-ImGui/lib/imgui/imgui.cpp, line 2638.

in GetIO()

Most other options seem to be ok.

Macbook pro, macos Mojave.

problem with libcinder audio

In my project i use Cinder-ImGui.
If run it on xcode 5.1.1 it works fine, but after migrating to xcode 7.2.1 got runtime error on audio init:
screen shot 2017-12-27 at 10 24 15
Same result if just adding line
auto audioContext = cinder::audio::Context::master();
into function setup() of BasicApp.cpp (sample file of Cinder-ImGui).
Cinder rebuilding is done.
Something like this was described here
https://forum.libcinder.org/topic/imgui#23286000002731003
but no solution is recommended.
Any suggestions?
Thank you in advance

Font character issue on MacOS

Hi,

I believe I have found an issue with font rendering on MacOS. The same code works fine on Windows 10. The issue is that symbols are rendered as questions marks when a font is loaded from a file path. Here is a screenshot of the problem:
Screen Shot 2019-05-04 at 1 38 50 pm
As you can see, the period (.) character is rendered as a question mark. I tested other common ascii symbols, some of them work and some of them don't.

My setup:
libcinder on master (a6dc85ba1)
MacOS 10.14.4
MacBook Pro 2012, NVIDIA GeForce 660m/Intel HD 4000

Steps to reproduce:

  1. Change code to the following in the sample BasicApp.cpp on line 38
    auto config = ui::Options().font(getAssetPath("ProggyClean.ttf"), 12);
    ui::initialize(config);
    //ui::initialize();
  1. Copy ProggyClean.ttf (found in the imgui/misc/fonts directory) or another font to the assets folder.

Multi ImGUI Windows on Multi Cinder Windows

Hi, this is not actually an issue.
I am new to Cinder and OpenGL.
I'm getting stuck on creating ImGUI Windows on Multi Cinder's Window.

Everything is fine if application have some ImGUI windows on single Cinder's window.
But when it open the second Cinder's window, it crashes and generates bellow errors:

|warning| cinder::gl::VaoImplCore::bindImpl[77] VAO bound against different context from allocation. Reassigning context.
Assertion failed!

Program: ...or\jellyfish\build\GoCrypto\Debug\cinder_imgui.dll
File: e:\projects\externals\cinder\blocks\cinder-...\imgui.cpp
Line: 4432

Expression: g.FrameCountEnded != g.FrameCount'

Does sound like ImGUI does not support dispplay multi windows on Multi Cinder's windows?

Retina support

Curious if there's recommendations for the best way to get retina support working. Reading through the ImGui issue queue it sounds like they suggest just doubling the font sizes. You can't specify a size for the default font so it seems like you need to manually load a font (that's what prompted #40 asking about loading fonts by name).

This seems to work reasonably but I'd love to stick with the default font:

ui::initialize( ui::Options().font( "/Library/Fonts/Arial.ttf", 13.0 * getWindow()->getContentScale() ) );

I opened up ocornut/imgui#1076 to see about getting a parameter added to specify a font size for the default font.

Clipboard functions on linux

Not sure if this error is better addresses on Cinder repo Linux branch as don't understand what is going on but despite Clipboard.h being present and functions existing I get:

CMakeFiles/Cicada.dir/home/renechristen/Applications/_cinder/Cinder.git/blocks/Cinder-ImGui/src/CinderImGui.cpp.o: In functionoperator()':
/home/renechristen/Applications/_cinder/Cinder.git/blocks/Cinder-ImGui/src/CinderImGui.cpp:932: undefined reference to cinder::Clipboard::getString()' /home/renechristen/Applications/_cinder/Cinder.git/blocks/Cinder-ImGui/src/CinderImGui.cpp:928: undefined reference tocinder::Clipboard::setString(std::string const&)'
`

Multiline editor only allows adding 128 new characters each time it's active

As stated in the title...can be a bit limiting, particularly for the multi-line editor. If you have a clipboard with more than 128 characters in it, you can't paste into the multiline editor. If you try to type more than 128 characters in one go, you can't -- you have to click away from the editor and then reactivate it.

I'd suggest just using a bigger "padding" on each edit (it's always relative to the current size).

latest imgui breaks the CinderBlock (SetClipboardTextFn, GetClipboardTextFn)

Hi Simon,

I've pulled the latest imgui subrepo and it doesn't compile anymore, I think the ImGui syntax for SetClipboardTextFn and GetClipboardTextFn have changed adding an extra "void* user_data" argument.

I've updated the Cinder-ImGui code and it does compile, but I'm not sure how the clipboard works so I didn't submit a pull request or tested anything, you might want to double check it.

CinderImGui.cpp #1004

#ifndef CINDER_LINUX
	// clipboard callbacks
	io.SetClipboardTextFn = []( void* user_data, const char* text ){
		const char* text_end = text + strlen(text);
		char* buf = (char*)malloc(text_end - text + 1);
		memcpy(buf, text, text_end-text);
		buf[text_end-text] = '\0';
		Clipboard::setString( buf );
		free(buf);
	};
	io.GetClipboardTextFn = []( void* user_data ){
		string str = Clipboard::getString();
		static vector<char> strCopy;
		strCopy = vector<char>(str.begin(), str.end());
		strCopy.push_back('\0');
		return (const char *) &strCopy[0];
	};
#endif```

ImFontAtlas::Build() crash on windows

Hi,

loading a custom font crash on windows, I tried both Roboto and FontAwesome, so I assume the fonts are fine, the same code works just fine on mac.

std::vector<ImWchar>                    iconsRange  = { ICON_MIN_FA, ICON_MAX_FA, 0 };
std::vector<ImWchar>                    textRange   = { 0x0001, 0x00BF, 0 };
std::vector<std::pair<fs::path,float>>  fontPaths;
   
fontPaths.push_back( make_pair<fs::path,float>( getAssetPath("fonts/Roboto/Roboto-Regular.ttf"), 13.0f ) );
fontPaths.push_back( make_pair<fs::path,float>( getAssetPath("fonts/fontawesome-webfont.ttf"), 12.0f ) );
    
ui::initialize( ui::Options().fonts( fontPaths, true )
                    .fontGlyphRanges( "fontawesome-webfont", iconsRange )
                    .fontGlyphRanges( "Roboto-Regular", textRange ) );

The code breaks in ImFontAtlas::Build()

any idea?

Rendering issue with macOS Mojave

I noticed that rendering may be broken on macOS Mojave. ImGui is being drawn at the wrong scale and mouse clicks don't align with what is drawn. I've also noticed clipping some problems.

To reproduce, start an empty project with TinderBox + the Cinder-ImGui block and add the hello-world example,

void cinderApp::setup() {
    ImGui::initialize();
}

void cinderApp::draw() {
    gl::clear( Color( 0, 0, 0 ) );
    ImGui::Text("Hello, world!");
}

Tested using the latest Cinder 0.9.2dev, although the problem exists with previous versions. I get captura de pantalla 2018-12-18 a las 10 54 29

I also get the same just by rebuilding some of my previous projects, which is how i noticed this in the first place - the problem there is even more pronounced and makes ImGui essentially unusable. My hunch is that it's related to Mojave, although i've only returned to Cinder since upgrading so i can't be sure when this first occurred. Any thoughts?

merge custom fonts

Hi,

I'm trying to load a custom or the default imgui font, add FontAwesome(with merge) and the relative icons range so I can use the font's header definitions ie. #define ICON_FA_GLASS u8"\uf000"

I'm not sure I understand how to do it using the Options during initialisation. I tried to use the native imgui method, but I guess it conflicts with the cinder implementation.

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.