Exemplo n.º 1
0
void
TopWindow::SetCaption(const TCHAR *caption)
{
  WideToUTF8Converter caption2(caption);
  if (caption2.IsValid())
    ::SDL_WM_SetCaption(caption2, nullptr);
}
Exemplo n.º 2
0
	void MainApplication::maj_caption()
	{
		if(mode==2)
		{
			std::string caption = "Budget restant = ";
			caption.append(std::to_string((_ULonglong)budget_restant));
			b_r->setCaption(caption);
		
			std::string caption2("Votre armee contient : \n");
			caption2.append(std::to_string((_ULonglong)armee[0]));
			caption2.append(" Moustic(s), ");
			caption2.append(std::to_string((_ULonglong)armee[1]));
			caption2.append(" Croco(s) et ");
			caption2.append(std::to_string((_ULonglong)armee[2]));
			caption2.append(" Hippo(s).");
			arme->setCaption(caption2);
		}
		if(budget_restant < moustic_c || mode==1)
		{
			m_trayManager->getWidget("Val_armee")->show();
			m_trayManager->getWidget("Annul_armee")->show();
			m_trayManager->getWidget("Hippo")->hide();
			m_trayManager->getWidget("Croco")->hide();
			m_trayManager->getWidget("Moustic")->hide();
		}
		else if(budget_restant < croco_c){
			m_trayManager->getWidget("Hippo")->hide();
			m_trayManager->getWidget("Croco")->hide();
		}
		else if(budget_restant < hippo_c){
			m_trayManager->getWidget("Hippo")->hide();
		}
	}