void PBImage::SetProperties(int properties) { SetAlign(properties); SetValign(properties); SetStretch(((properties & STRETCH) > 0)); SetTile(((properties & TILE) > 0)); }
void UIFont::CopyFrom(UIFont *Other) { if (!Other) return; SetFace(Other->GetFace()); SetColor(Other->GetColor()); SetBrush(Other->GetBrush()); QPoint offset; QColor color; int blur; quint16 size; Other->GetShadow(offset, color, blur); SetShadow(Other->HasShadow(), offset, color, blur); Other->GetOutline(color, size); SetOutline(Other->HasOutline(), color, size); SetOffset(Other->GetOffset()); SetRelativeSize(Other->GetRelativeSize()); SetSize(Other->GetFace().pixelSize()); SetStretch(Other->GetStretch()); SetImageFileName(Other->GetImageFileName()); SetImageReady(Other->GetImageReady()); UIImage* image = Other->GetImage(); if (image) { SetImage(image); m_image->UpRef(); } }
void Window_Base::Update() { Window::Update(); if (Game_System::GetSystemName() != windowskin_name) { windowskin_name = Game_System::GetSystemName(); SetWindowskin(Cache::System(windowskin_name)); } SetStretch(Game_System::GetMessageStretch() == RPG::System::Stretch_stretch); }
void Window_Base::Update() { Window::Update(); if (Game_System::GetSystemName() != windowskin_name) { windowskin_name = Game_System::GetSystemName(); SetWindowskin(Cache::System(windowskin_name)); contents->SetTransparentColor(windowskin->GetTransparentColor()); } SetStretch(Game_System::GetMessageStretch() == RPG::System::Stretch_stretch); }
IScene::IScene(const StringRef& name/*=StringRef::Empty*/, const IEventArg& e /*= IEventArg::Empty*/) :INode(name), mSceneGraph(nullptr) { mScene = this; mRenderTarget = nullptr; mSize = ResolutionAdapter::Instance().WinSize(); SetStretch(Stretch::Fill); SetSizeToContent(SizeToContent::WidthAndHeight); Start(); }
Window_Base::Window_Base(int x, int y, int width, int height) { windowskin_name = Game_System::GetSystemName(); if (!windowskin_name.empty()) { SetWindowskin(Cache::System(windowskin_name)); } else { SetWindowskin(Bitmap::Create(160, 80, false)); } SetX(x); SetY(y); SetWidth(width); SetHeight(height); SetStretch(Game_System::GetMessageStretch() == RPG::System::Stretch_stretch); SetZ(3000); }
GUIFooter::GUIFooter() : GUIControlContainer() { int32 h = GUISystem::Instance()->GetSkin()->GetSprite(EDT_FOOTER_BUTTON_LEFT, GUISkinLocal::ESSH3_CENTER)->GetHeight(); ControlRect r(0, GetApplication()->GetGraphicsSystem()->GetHeight() - h , GetApplication()->GetGraphicsSystem()->GetWidth() , h); SetControlRect(r); SetID(ECIDS_FOOTER_ID); SetStretch(ECS_STRETCH); GUILayoutBox *layout = new GUILayoutBox(false, this); GUIText *text = new GUIText((char16*)L" ", layout); text->SetID(ECIDS_FOOTER_ID + 1); text->SetDrawType(EDT_FOOTER_BUTTON_LEFT); text = new GUIText((char16*)L" ", layout); text->SetID(ECIDS_FOOTER_ID + 2); text->SetDrawType(EDT_FOOTER_BUTTON_RIGHT); }