예제 #1
0
//---------------------------------------------------------------------------------
void LLNotificationWellWindow::addItem(LLSysWellItem::Params p)
{
	LLSD value = p.notification_id;
	// do not add clones
	if( mMessageList->getItemByValue(value))
		return;

	LLSysWellItem* new_item = new LLSysWellItem(p);
	if (mMessageList->addItem(new_item, value, ADD_TOP))
	{
		mSysWellChiclet->updateWidget(isWindowEmpty());
		reshapeWindow();

		new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1));
		new_item->setOnItemClickCallback(boost::bind(&LLNotificationWellWindow::onItemClick, this, _1));
	}
	else
	{
		llwarns << "Unable to add Notification into the list, notification ID: " << p.notification_id
			<< ", title: " << p.title
			<< llendl;

		new_item->die();
	}
}
예제 #2
0
void LLIMWellWindow::addIMRow(const LLUUID& session_id)
{
	if (hasIMRow(session_id)) return;

	LLIMModel* im_model = LLIMModel::getInstance();
	addIMRow(session_id, 0, im_model->getName(session_id), im_model->getOtherParticipantID(session_id));
	reshapeWindow();
}
예제 #3
0
void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_message/* = false*/)
{
	if (mMessageList->getItemByValue(notification_id) == NULL)
	{
		ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message);
		if (!mMessageList->addItem(item, notification_id))
		{
			LL_WARNS() << "Unable to add Object Row into the list, notificationID: " << notification_id << LL_ENDL;
			item->die();
		}
		reshapeWindow();
	}
}
예제 #4
0
//virtual
void LLIMWellWindow::sessionAdded(const LLUUID& session_id,
								   const std::string& name, const LLUUID& other_participant_id)
{
	LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id);
	if (!session) return;

	// no need to spawn chiclets for participants in P2P calls called through Avaline
	if (session->isP2P() && session->isOtherParticipantAvaline()) return;

	if (mMessageList->getItemByValue(session_id)) return;

	addIMRow(session_id, 0, name, other_participant_id);	
	reshapeWindow();
}
예제 #5
0
void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id)
{
	if (!mMessageList->removeItemByValue(notification_id))
	{
		LL_WARNS() << "Unable to remove Object Row from the list, notificationID: " << notification_id << LL_ENDL;
	}

	reshapeWindow();
	// hide chiclet window if there are no items left
	if(isWindowEmpty())
	{
		setVisible(FALSE);
	}
}
예제 #6
0
void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_message/* = false*/)
{
	if (mMessageList->getItemByValue(notification_id) == NULL)
	{
		ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message);
		if (mMessageList->addItem(item, notification_id))
		{
			mSysWellChiclet->updateWidget(isWindowEmpty());
		}
		else
		{
			llwarns << "Unable to add Object Row into the list, notificationID: " << notification_id << llendl;
			item->die();
		}
		reshapeWindow();
	}
}
예제 #7
0
void LLIMWellWindow::addObjectRow(const LLUUID& notification_id, bool new_message/* = false*/)
{
	if (mMessageList->getItemByValue(notification_id) == NULL)
	{
		ObjectRowPanel* item = new ObjectRowPanel(notification_id, new_message);
		if (mMessageList->insertItemAfter(mSeparator, item, notification_id))
		{
			handleItemAdded(IT_INSTANT_MESSAGE);
		}
		else
		{
			llwarns << "Unable to add Object Row into the list, notificationID: " << notification_id << llendl;
			item->die();
		}
		reshapeWindow();
	}
}
예제 #8
0
void LLIMWellWindow::removeObjectRow(const LLUUID& notification_id)
{
	if (mMessageList->removeItemByValue(notification_id))
	{
		mSysWellChiclet->updateWidget(isWindowEmpty());
	}
	else
	{
		llwarns << "Unable to remove Object Row from the list, notificationID: " << notification_id << llendl;
	}

	reshapeWindow();
	// hide chiclet window if there are no items left
	if(isWindowEmpty())
	{
		setVisible(FALSE);
	}
}
예제 #9
0
//---------------------------------------------------------------------------------
void LLSysWellWindow::removeItemByID(const LLUUID& id)
{
	if(mMessageList->removeItemByValue(id))
	{
		handleItemRemoved(IT_NOTIFICATION);
		reshapeWindow();
	}
	else
	{
		llwarns << "Unable to remove notification from the list, ID: " << id
			<< llendl;
	}

	// hide chiclet window if there are no items left
	if(isWindowEmpty())
	{
		setVisible(FALSE);
	}
}
예제 #10
0
//---------------------------------------------------------------------------------
void LLSysWellWindow::removeItemByID(const LLUUID& id)
{
	if(mMessageList->removeItemByValue(id))
	{
		if (NULL != mSysWellChiclet)
		{
			mSysWellChiclet->updateWidget(isWindowEmpty());
		}
		reshapeWindow();
	}
	else
	{
		LL_WARNS() << "Unable to remove notification from the list, ID: " << id
			<< LL_ENDL;
	}

	// hide chiclet window if there are no items left
	if(isWindowEmpty())
	{
		setVisible(FALSE);
	}
}
예제 #11
0
//virtual
void LLIMWellWindow::sessionRemoved(const LLUUID& sessionId)
{
	delIMRow(sessionId);
	reshapeWindow();
}
예제 #12
0
/* Add all the models to be created here */
void initGL (GLFWwindow* window, int width, int height)
{
  
for(int i=0;i<STATIC_OBSTACLES - 1;i++){
   setInitials(obstacles[i],0.698039, 0.133333, 0.133333);
  }
     setInitials(obstacles[5],0.721569, 0.52549, 0.0431373);


  GLfloat * hinge_vertices = circleVertices(borders[0][0]->num_vertices, borders[0][0]->radius);
  GLfloat * hinge_colors = circleColors(borders[0][0]->num_vertices,0.698039, 0.133333, 0.133333);
for(int j=0;j<BORDERS;j++){
  for(int i=0;i<4;i++){
    borders[j][i]->setInitVertices(hinge_vertices);
    borders[j][i]->setInitColors(hinge_colors);
    borders[j][i]->createCircle();
  }
}
hinge_colors = circleColors(borders[0][0]->num_vertices,0.662745, 0.662745, 0.662745);
 hinge->setInitVertices(hinge_vertices);
  hinge->setInitColors(hinge_colors);
  hinge->createCircle();

hinge_vertices = circleVertices(jumper->num_vertices,jumper->radius);
hinge_colors  = circleColors(jumper->num_vertices,0.466667, 0.533333, 0.6);
jumper->setInitVertices(hinge_vertices);
jumper->setInitColors(hinge_colors);
jumper->createCircle();
/*for (int i = 0; i < ATTEMPT; ++i)
{
  attempt[i]->setInitVertices(hinge_vertices);
    attempt[i]->setInitColors(hinge_colors);
    attempt[i]->createCircle();
}
*/
GLfloat * circle_vertices , * circle_colors;
for(int i=0;i<CIRCLE;i++){
  circle_vertices = circleVertices(back_circles[i]->num_vertices,back_circles[i]->radius);
  circle_colors = circleColors(back_circles[i]->num_vertices,1,1,1);
  back_circles[i]->setInitVertices(circle_vertices);
    back_circles[i]->setInitColors(circle_colors);
    back_circles[i]->createCircle();
}

for(int i=0;i<BALL_CIRCLES;i++){
  circle_vertices = circleVertices(ball_circles[i]->num_vertices,ball_circles[i]->radius);
  circle_colors = circleColors(ball_circles[i]->num_vertices,1, 0.54902, 0);
  ball_circles[i]->setInitVertices(circle_vertices);
    ball_circles[i]->setInitColors(circle_colors);
    ball_circles[i]->createCircle();
    ball_fill_circles[i]->setInitVertices(circle_vertices);
    ball_fill_circles[i]->setInitColors(circle_colors);
    ball_fill_circles[i]->createCircle();
}

setInitials(canon,1, 0.870588, 0.678431);
  setInitials(base,0, 0, 0.501961);

  setInitials(tar,0.8,0.1,0);

  for(int i=0;i<=10;i++){
      setInitials(bar[i],float(i)/10,1-float(i)/10,0);
  }

  GLfloat button_base_vertices[] = {
    0,0,0,
    0,0.8,0,
    1.5,1.25,0,

    1.5,1.25,0,
    1.5,-0.45,0,
    0,0,0

  } ;

  GLfloat * colors = button_base->getInitColors(0.741176, 0.717647, 0.419608);
  button_base->setInitVertices(button_base_vertices);
  button_base->setInitColors(colors);
  button_base->createRectangle();

  GLfloat back_floor_vertices[]={
    -10,-4,0,
    -9,4,0,
    10,4,0,

    10,4,0,
    10,-4,0,
    -10,-4,0,

  };

  colors = back_floor->getInitColors(0.721569, 0.52549, 0.0431373);
  back_floor->setInitVertices(back_floor_vertices);
  back_floor->setInitColors(colors);
  back_floor->createRectangle();

 GLfloat back_line1[]={
   -0.25,-4,0,
    0,4,0,
    0.25,4,0,

    0.25,4,0,
    0,-4,0,
    -0.25,-4,0,
  };
  setInitials(back_lines[0],1, 1, 0.941176,back_line1);

  for(int i = 0 ;i<PAINT;i++){
    setInitials(paint[i],1, 1, 0.941176);
  }
 /* GLfloat back_line2[]={
    -8,-2,0,
    -8.3,-1.7,0,
    -4,-0.7,0,
    
    -4,-0.7,0,
    -3.7,-1,0,
    -8,-2,0,
  };
  setInitials(back_lines[1],1, 1, 0.941176,back_line2);*/


  setInitials(button,0.862745, 0.0784314, 0.235294);

  for(int i=0;i<LINES;i++)
    setInitials(lines[i],1,1,1);

	// Create and compile our GLSL program from the shaders
	programID = LoadShaders( "Sample_GL.vert", "Sample_GL.frag" );
	// Get a handle for our "MVP" uniform
	Matrices.MatrixID = glGetUniformLocation(programID, "MVP");

	
	reshapeWindow (window, width, height);

    // Background color of the scene
	glClearColor ( 1, 0.980392, 0.803922 ,0.f); // R, G, B, A
	glClearDepth (1.0f);

	glEnable (GL_DEPTH_TEST);
	glDepthFunc (GL_LEQUAL);

   
}