void MythUITextEdit::Finalize() { SetInitialStates(); // Give it something to chew on, so it can position the initial // cursor in the right place. Toggle text, to force an area recalc. m_Text->SetText("."); m_Text->SetText(""); m_cursorImage->SetPosition(m_Text->CursorPosition(0)); }
/** * \copydoc MythUIType::CopyFrom() */ void MythUICheckBox::CopyFrom(MythUIType *base) { MythUICheckBox *button = dynamic_cast<MythUICheckBox *>(base); if (!button) { LOG(VB_GENERAL, LOG_ERR, "Dynamic cast of base failed"); return; } MythUIType::CopyFrom(base); SetInitialStates(); }
/** * \copydoc MythUIType::CopyFrom() */ void MythUICheckBox::CopyFrom(MythUIType *base) { MythUICheckBox *button = dynamic_cast<MythUICheckBox *>(base); if (!button) { VERBOSE(VB_IMPORTANT, "MythUICheckBox::CopyFrom: Dynamic cast of base " "failed"); return; } MythUIType::CopyFrom(base); SetInitialStates(); }
/** * \copydoc MythUIType::CopyFrom() */ void MythUIButton::CopyFrom(MythUIType *base) { MythUIButton *button = dynamic_cast<MythUIButton *>(base); if (!button) { VERBOSE(VB_IMPORTANT, "MythUIButton::CopyFrom: Dynamic cast of base failed"); return; } m_Message = button->m_Message; m_ValueText = button->m_ValueText; m_Lockable = button->m_Lockable; MythUIType::CopyFrom(base); SetInitialStates(); }
int main(int argc, char** argv) #endif { // initialize everything needed Log::Open(); Audio::Open(); ini->Load("GameData/Preferences.ini"); // get the resolution from prefs int width = 854; int height = 480; width = atoi(ini->getValue("Preferences","DisplayWidth").c_str()); height = atoi(ini->getValue("Preferences","DisplayHeight").c_str()); InitWindow(width, height); // we're done reading the ini, nuke it. delete ini; /* * Shaders are used for a lot here, so of course OpenGL 2.0 is required. * In the future I may start using Cg, although I like GLSL more it would allow * having a DX renderer without a ton of dupe shaders. */ if (!GLEW_VERSION_2_0) { Log::Print("OpenGL 2.0 is not supported. You may need to update your drivers."); return 1; } lua_testLoad(); // Set up our defaults and pass control. SetInitialStates(); Game::Run(); // Clean up glfwTerminate(); Audio::Close(); Log::Close(); return 0; }
void MythUITextEdit::CopyFrom(MythUIType *base) { MythUITextEdit *textedit = dynamic_cast<MythUITextEdit *>(base); if (!textedit) { VERBOSE(VB_IMPORTANT, "ERROR, bad parsing"); return; } m_Message.clear(); m_Position = -1; m_blinkInterval = textedit->m_blinkInterval; m_cursorBlinkRate = textedit->m_cursorBlinkRate; m_maxLength = textedit->m_maxLength; m_Filter = textedit->m_Filter; m_keyboardPosition = textedit->m_keyboardPosition; MythUIType::CopyFrom(base); SetInitialStates(); }
void MythUITextEdit::Finalize() { SetInitialStates(); }
/** * \copydoc MythUIType::Finalize() */ void MythUICheckBox::Finalize() { SetInitialStates(); }
/** * \copydoc MythUIType::Finalize() */ void MythUIButton::Finalize() { SetInitialStates(); SetText(m_ValueText); }