EBox::EBox(float x, float y, float w,float h, float marginL, float marginR, float marginU, float marginD) { _nIterIndice = 0; _minInnerWidth = 0; _minInnerHeight = 0; _lpParent = NULL; _fMaxBlend = 1; _fBlend = 1; _x = 0; _y = 0; _nNumMaximizeChild = 0; SetVerticalPolicy(VCENTER); SetHorisontalPolicy(HCENTER); SetSizePolicy(INHERIT); SetCentered(false); SetGeometry(x,y,w,h); SetMargin(marginL,marginR,marginU,marginD); _layoutType = VERTICAL; if (bg == NULL) bg = KPTK::createKGraphic(); refCount++; }
int TextObject::LuaSetProp(lua_State* ls, string& prop, int index) { if (prop == "center") SetCentered(lua_toboolean(ls, index)); else return StaticObject::LuaSetProp(ls, prop, index); return 1; }
ElementButton::ElementButton(Vector pos, Vector Size, std::string text) : ElementTexture(pos, Size, text) { //this->Text = new ElementLable(pos,Size,text); SetCentered(true); Enabled = false; }
/** * @brief BBox * @param x0 is the horizontal coordinate in pixels. * @param y0 is the vertical coordinate in pixels. * @param size is the patch size * @param width is the original width of the image. * @param height is the original height of the image. */ BBox(int x0, int y0, int size, int width, int height) { SetCentered(x0, y0, size, width, height); }