void DialogBox::clear() { clearReplies(); clearEntry(); setPortrait(""); setName(""); }
Portrait::Portrait(const Common::UString &name, Size size, float border, float bR, float bG, float bB, float bA) : _size(size), _border(border), _bR(bR), _bG(bG), _bB(bB), _bA(bA) { assert((_size >= kSizeHuge) && (_size < kSizeMAX)); setSize(); setPortrait(name); setPosition(0.0, 0.0, -FLT_MAX); }
Chat::Chat(const int id, const QString& login, const QString& loc) : _id(id), _alias(login), _login(login), _location(loc), _network(NULL), _options(NULL) { setupUi(this); setPortrait(); setWindowTitle(login); this->loginLabel->setText(login + "@" + loc); connect(this->inputTextEdit, SIGNAL(returnPressed()), SLOT(sendMessage())); connect(this->inputTextEdit, SIGNAL(textChanged()), SLOT(handleTypingSignal())); }
Portrait::Portrait(const Common::UString &name, Size size, float border, float bR, float bG, float bB, float bA) : Graphics::GUIElement(Graphics::GUIElement::kGUIElementFront), _size(size), _border(border), _bR(bR), _bG(bG), _bB(bB), _bA(bA) { assert((_size >= kSizeHuge) && (_size < kSizeMAX)); setSize(); setPortrait(name); setPosition(0.0f, 0.0f, -FLT_MAX); }
void MainWindow::orientationChanged(const QString& newOrientation) { if (newOrientation == QLatin1String(MCE_ORIENTATION_UNKNOWN)) return; bool bPortrait = newOrientation == QLatin1String(MCE_ORIENTATION_PORTRAIT); mShowShortTitle = bPortrait; mpViewer->setShowShortTitle(mShowShortTitle); if (bPortrait) setPortrait(); else setLandscape(); }
void IngameGUI::updatePartyMember(uint partyMember, const Creature &creature, bool force) { assert(partyMember < _party.size()); uint32 lastPartyMemberChange = creature.lastChangedGUIDisplay(); if (!force && (lastPartyMemberChange <= _lastPartyMemberChange[partyMember])) return; setPortrait(partyMember, creature.getPortrait()); setName (partyMember, creature.getName()); setHealth (partyMember, creature.getCurrentHP(), creature.getMaxHP()); _lastPartyMemberChange[partyMember] = lastPartyMemberChange; }
/*! * Set all pagesize parameters via const gchar attributes */ bool fp_PageSize::Set(const gchar ** attributes) { const gchar * szPageSize=NULL, * szOrientation=NULL, * szWidth=NULL, * szHeight=NULL, * szUnits=NULL, * szPageScale=NULL; double width=0.0; double height=0.0; double scale =1.0; UT_Dimension u = DIM_IN; for (const gchar ** a = attributes; (*a); a++) { UT_DEBUGMSG(("PageSize -prop %s value %s \n",a[0],a[1])); if (strcmp(a[0],"pagetype") == 0) szPageSize = a[1]; else if (strcmp(a[0], "orientation") == 0) szOrientation = a[1]; else if (strcmp(a[0], "width") == 0) szWidth = a[1]; else if (strcmp(a[0], "height") == 0) szHeight = a[1]; else if (strcmp(a[0], "units") == 0) szUnits = a[1]; else if (strcmp(a[0], "page-scale") == 0) szPageScale = a[1]; a++; } if(!szPageSize) return false; if(!szOrientation) return false; Set(static_cast<const char *>(szPageSize)); if( szWidth && szHeight && szUnits && szPageScale) { if(g_ascii_strcasecmp(szPageSize,"Custom") == 0) { width = UT_convertDimensionless(szWidth); height = UT_convertDimensionless(szHeight); if(strcmp(szUnits,"cm") == 0) u = DIM_CM; else if(strcmp(szUnits,"mm") == 0) u = DIM_MM; else if(strcmp(szUnits,"inch") == 0) u = DIM_IN; Set(width,height,u); } scale = UT_convertDimensionless(szPageScale); setScale(scale); } // set portrait by default setPortrait(); if( g_ascii_strcasecmp(szOrientation,"landscape") == 0 ) { // Note: setting landscape causes the width and height to be swapped if (szWidth && szHeight && szUnits) // just setting a custom width or height should be allowed imo, but I'm lazy - MARCM { width = UT_convertDimensionless(szWidth); height = UT_convertDimensionless(szHeight); if(strcmp(szUnits,"cm") == 0) u = DIM_CM; else if(strcmp(szUnits,"mm") == 0) u = DIM_MM; else if(strcmp(szUnits,"inch") == 0) u = DIM_IN; setLandscape(); Set(height,width,u); } else { Set(m_iHeight, m_iWidth, FUND); } } UT_DEBUGMSG(("PageSize - Height %lf Width %lf \n",m_iHeight,m_iWidth)); return true; }
void HUD::setPartyMember2(KotORBase::Creature *creature) { setPortrait(2, creature != 0, creature ? creature->getPortrait() : ""); }
void HUD::setPartyLeader(KotORBase::Creature *creature) { setPortrait(1, creature != 0, creature ? creature->getPortrait() : ""); }