ddovod / jet-live

c++ hot code reload for linux and macos
MIT License
411 stars 23 forks source link

Source of Imgui demo. #17

Closed codecnotsupported closed 5 years ago

codecnotsupported commented 5 years ago

Hey, I was wondering if you could post the source of your IMGUI demo. I made my own version ( terribly hacked together ) and was wondering how you implemented it so I could learn from it. output

ddovod commented 5 years ago

Hey! Looks nice. Afaiu you're talking about Log widget, right?

codecnotsupported commented 5 years ago

Hey! Looks nice. Afaiu you're talking about Log widget, right?

Yup, though the source of when the demo starts would be nice too. With demo I mean the demo you showed off here

ddovod commented 5 years ago

Okay, so the framework used to create that demo is not yet ready to be exposed (at least I'm not ready to make it public), but you can try some cocos2d-x + imgui repo (this is only one of them), you'll get the same experience plus a lot of info about how to work with cocos2d-x. If you need colorized log output, please see this comment with the link to the gist with code you need. Also you need to add -fcolor-diagnostics compiler flag globally to the cmake to tell compiler to print colorized output. That's all how I can help you with this. If you have any problem integrating cocos2d-x and jet-live, just open an issue, I'll try to help you.

codecnotsupported commented 5 years ago

Thanks for your help, for now I'll try to make my own implementation less hacked together. And I'll be looking forward to the day that framework is ready. ( No pressure though )

ddovod commented 5 years ago

Deal. Anyway, if I can help you somehow with something, just ping me on email. Good luck!

krumelmonster commented 5 years ago

@codecnotsupported would you like to post your code?

hippyau commented 3 years ago

Hey! This is awesome!!!!

jet-live... I love it!! I've in just two hours hacked jet-live into a ImGui demo and it's great :) very hacky, but it works...

I got very lost in RCCPP and gave up, so glad I found this!

So, when I press 'Reload' in the hello world window, it reloads my UI class.

image

However, I have this issue where the output to the console from the logger is 'invisible' in VS code terminal - maybe because my dark theme... I have never noticed this before!

See the grey area in the terminal is where I have selected text I can't see, copied and pasted into notepad and I can see it!

image

I tried putting ANSI in the logger to set a white colour... but that didn't help. This probs has nothing to do with jet-live, maybe it does?

image

I found your ANSI gist for ImGui and implemented it, but not sure how to make a logging window like yours.

Cheers, Hippy.

hippyau commented 3 years ago

It's totally my VS Code theme :) ....

I used std::cout << "\u001b[39m" << severityString << ": " << message << std::endl; to select the ANSI default foreground colour :)

ddovod commented 3 years ago

Hi. I'm facing similar issues with vscode sometimes. There's nothing to do with the library, it just produces strings. You can try to add

    ...
    "terminal" : "integrated",
    ...

to your launch.json configuration. I'm on linux (xubuntu 18.04) and logs in vscode looks fine on my side