These are chat archives for highfidelity/hifi

18th
Mar 2014
Grayson Stebbins
@problem
Mar 18 2014 00:32
@PhilipRosedale whenever gitter decides to build out a public API, it’s in their backlog now: https://trello.com/c/RcU0LEH0/41-public-api
Clément Brisset
@Atlante45
Mar 18 2014 19:45
You gotta love pan mode
function startPanMode(event, intersection) {
    // start pan camera! 
    print("handle PAN mode!!!");
}

function handlePanMove(event) {
    print("PANNING mode!!! ");
    //print("isPanning="+isPanning + " inPanningFromTouch="+isPanningFromTouch + " trackAsOrbitOrPan="+trackAsOrbitOrPan);
}

function endPanMode(event) {
    print("ending PAN mode!!!");
}
Grayson Stebbins
@problem
Mar 18 2014 19:46
HAHA @Atlante45
out for lunch with sister
Dimitar Dobrev
@ddobrev
Mar 18 2014 19:49
@birarda Hi, how is it going?
Stephen Birarda
@birarda
Mar 18 2014 19:49
hey there
Dimitar Dobrev
@ddobrev
Mar 18 2014 19:50
@birarda I'd appreciate your help if you happen to have a minute.
Stephen Birarda
@birarda
Mar 18 2014 19:54
sure thing
Dimitar Dobrev
@ddobrev
Mar 18 2014 19:55
@birarda Thanks. So, @problem's design requires that the chat window stays on top of the GL view rather tahn push it aside.
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 19:55
@Atlante45 - pan was left as an exercise for the reader. Just like in college.
Dimitar Dobrev
@ddobrev
Mar 18 2014 19:56
@birarda So I thought I would revert the chat window to being a QDialog and move/resize it together with the main window by handling events.
Resizing works great but the move event only occurs after the window has been moved - you can't make them "stick together" with the help of that event.
On the other hand, there seems to be no reliable event that reports a window being dragged around because the window title is not part of Qt but rather of the OS window manager.
So, basically, I am out of ideas.
Stephen Birarda
@birarda
Mar 18 2014 19:59
to be honest @ddobrev I’ve got less experience with drawing than you do
it’s possible @AndrewMeadows or Andrzej (who isn’t in here but we should grab him) could help you think of a solution
what is the different between the way we have it now and the way we want it to be?
Dimitar Dobrev
@ddobrev
Mar 18 2014 20:02
@birarda Now that chat window pushes the GL view aside - it decreases its size, in other words.
Stephen Birarda
@birarda
Mar 18 2014 20:02
ahh gotcha
Clément Brisset
@Atlante45
Mar 18 2014 20:06
@ZappoMan oh ok ^^
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 20:08
@Atlante45 - actually, it's just that Philip wanted me to go back to working on other things. :)
Dimitar Dobrev
@ddobrev
Mar 18 2014 20:31
@birarda I can see that the old chat entry used to render itself manually but I have little idea how to do it for a whole window, not to mention input handling.
@AndrewMeadows I have to go now but could you please share your thoughts on this? I'm going to check it tomorrow. Thanks.
Andrew Meadows
@AndrewMeadows
Mar 18 2014 21:41
I'm reading the backlog...
Andrew Meadows
@AndrewMeadows
Mar 18 2014 21:50
yes, that is the case, those stats are rendered with OpenGL, not QT
Andrzej says maybe the ViewFrustum could be modified whenever the chat window is active such that the rendered scene doesn't shift.
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 21:52
what issue are we trying to fix?
Stephen Birarda
@birarda
Mar 18 2014 21:53
putting chat in the window and not having it squeeze the window
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 21:53
Are we trying to make chat be an "overlay"?
Stephen Birarda
@birarda
Mar 18 2014 21:53
yes, but attached
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 21:53
it seems we have 3 options:
1) make it a popup - sounds like we don't like that
Andrew Meadows
@AndrewMeadows
Mar 18 2014 21:54
I was just saying that it would be nice to have chat as an overlay.
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 21:54
2) make it a widget/layout - sounds like we don't like that
3) make it a overlay - this could be done, but would mean not using any Qt widgets
overlay implies implementening the keyboard capture and rendering outside of Qt widgets
If we go this route… IMO - we should do it in JS...
Andrew Meadows
@AndrewMeadows
Mar 18 2014 21:56
4) leave it as is, but make the rendered scene not shift (this was what Philip was asking for I think)
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 21:56
there are several JS implementations of xmpp out there
Stephen Birarda
@birarda
Mar 18 2014 21:56
we wouldn’t need js xmpp
we could just expose send and receive signals and slots
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 21:57
yep
Stephen Birarda
@birarda
Mar 18 2014 21:57
to the existing xmpp lib
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 21:57
that would be easy too
then the JS would easily be able to trap keys and display text overlays
we already have text overlay support exposed in JS
that would also let people write AI like JS bots that can do chat
which would also be cool
that would give us the best visual display...
it would also fix the bugs I reported early this week about chat trapping the keyboard messages and breaking navigation.
I like that idea…
5) expose xmpp signals and slots to JS & implement chat UI in JS.
Grayson Stebbins
@problem
Mar 18 2014 22:01
Yes!!
Andrew Meadows
@AndrewMeadows
Mar 18 2014 22:01
how does the JS UI widgets work?
er... how do they work?
Brad Hefta-Gaub
@ZappoMan
Mar 18 2014 22:03
@AndrewMeadows - there are several examples, not really widgets… but just overlay regions
you can create a text rectangle, and set it's text and it will render as an overlay
basically what our stats displays look like
they're local only - not sent over net
so - you could build a JS file that calculates the digits of PI and constantly updates a text display with the value...
or whatever
overlaysExample.js - shows all the different overlays in action… one being "text"
to implement chat though, you'd also have to implement support for trapping keyboard characters, and essentially keeping a text buffer, displaying, handling edit/back keys, etc...
so it's not trivial to handle the text input portion.
we get full keyup/keydown events to JS… so it's doable… but some effort.
but it has the advantage of rendering cleanly on top of the 3D world as an overlay.
theoretically you could even implement the "chat over the heads of who's typing" feature if you wanted to...