void EstimateUserInfo::onEnter() { ccxGameNode::onEnter(); setBG(); setExplainLabel(); setAddressInputBox(); setSizeInputBox(); setRequestInputBox(); }
// on "init" you need to initialize your instance bool Level01::init() { ////////////////////////////// // 1. super init first if ( !Layer::init() ) { return false; } m_visibleSize = Director::getInstance()->getVisibleSize(); m_floorPoint = m_visibleSize.height / 4.6; Point origin = Director::getInstance()->getVisibleOrigin(); auto wall = DrawNode::create(); wall->drawSolidRect(Vec2(0, 0), Vec2(m_visibleSize.width, m_visibleSize.height), Color4F::GRAY); this->addChild(wall); setPlayer(); setBG(); animCache(); auto shade = DrawNode::create(); shade->drawSolidRect(Vec2(0, 0), Vec2(m_visibleSize.width, m_visibleSize.height), Color4F(0, 0, 0, 180)); this->addChild(shade); idle(); eventHandler(); m_enterButton = ui::Button::create("img/button.png"); m_enterButton->setScale(0.6); m_enterButton->setTitleColor(Color3B::WHITE); m_enterButton->setTitleFontName("fonts/ant-maru.ttf"); m_enterButton->setTitleFontSize(45); m_enterButton->setTitleText("入る"); m_enterButton->setVisible(false); m_enterButton->setPosition(Vec2(m_visibleSize.width / 2, m_visibleSize.height / 10)); this->addChild(m_enterButton); m_sadmanMsg = ui::Button::create("img/button.png"); m_sadmanMsg->setScale(1); m_sadmanMsg->setTitleColor(Color3B::WHITE); m_sadmanMsg->setTitleFontName("fonts/ant-maru.ttf"); m_sadmanMsg->setTitleFontSize(26); m_sadmanMsg->setTitleText("トナリノヘアガアカルクテ"); m_sadmanMsg->setVisible(false); m_sadmanMsg->setPosition(Vec2(m_visibleSize.width / 2, m_visibleSize.height / 10)); m_sadmanMsg->setEnabled(false); this->addChild(m_sadmanMsg); this->scheduleUpdate(); return true; }
void ide::Window::refresh() { if(_hidden==true) return; if(_border==SINGLE || _border==DOUBLE) setBorderStyle(_border); else if(_border==CUSTOM) setBorderStyle(_border,_b_param.ls,_b_param.rs,_b_param.ts,_b_param.bs,_b_param.tl,_b_param.tr,_b_param.bl,_b_param.br); setBG(_fgColor,_bgColor,_bgChar); wrefresh(_bwin); }
static void setWallpaper( GtkWidget *widget, gpointer data) { if (gtk_tree_selection_get_selected(selection, &bgList, &iter)) { gchar *name; gtk_tree_model_get (bgList, &iter, COL_FILENAME, &name, -1); strcpy(filename, "\""); strcat(filename, name); strcat(filename, "\""); g_print ("Setting the wallpaper to: %s\n", filename); setBG(); } }
void loadAndSetLast() { printf("Loading last wallpaper.\n"); FILE *file; gchar dataName[500]; strcpy(dataName, getenv("HOME")); strcat(dataName, "/.config/cwallpaper/lastwallpaper"); file = fopen(dataName, "r"); if (file == NULL) { g_print("Last wallpaper not found. (You have not used CWallpaper before)\n"); return; } if (file != NULL) { char c; char string[LENGTH_OF_FILENAME]; int i = 0; gboolean getType = TRUE; gboolean scanning = TRUE; while (scanning) { c = fgetc(file); if (c == EOF) { scanning = FALSE; } if (c == 10 || c == 32 || c == EOF) { string[i] = '\0'; if (getType) { if (strcmp("c:", string) == 0) { currentOption = 1; g_print("Default = Center\n", string); } if (strcmp("s:", string) == 0) { currentOption = 0; g_print("Default = Scale\n", string); } if (strcmp("t:", string) == 0) { currentOption = 2; g_print("Default = Tile\n", string); } if (strcmp("n:", string) == 0) { g_print("Default = None\n", string); g_print("Options disabled\n", string); currentOption = 3; options = FALSE; } getType = FALSE; } else { strcpy(filename, string); } i = 0; } else { string[i] = c; i ++; } } fclose(file); } setBG(); }
void LVL_Section::resetBG() { setBG(data.background); }
void LVL_Section::initBG() { setBG(curBgID); }