MCPcopy Create free account
hub / github.com/MyGUI/mygui / load

Method load

Plugins/Plugin_HikariWidget/FlashControl.cpp:183–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void FlashControl::load(const std::string& movieFilename)
184{
185 mIsInitialise = false;
186
187 std::string full_path = MyGUI::DataManager::getInstance().getDataPath(movieFilename);
188 if (full_path.empty())
189 {
190 MYGUI_LOGGING(
191 plugin::Plugin::LogSection,
192 Error,
193 "Could not load '" << movieFilename << "', the file was not found.");
194 return;
195 }
196
197 // работают только абсолютные пути c левыми слешами
198 std::string absolute_path = full_path.at(0) == '.' ? getCurrentWorkingDirectory() + full_path : full_path;
199 for (size_t index = 0; index < absolute_path.size(); ++index)
200 {
201 if (absolute_path[index] == '/')
202 absolute_path[index] = '\\';
203 }
204
205 flashInterface->PutMovie(absolute_path.c_str());
206
207 mIsInitialise = true;
208}
209
210void FlashControl::setTransparent(bool isTransparent)
211{

Callers

nothing calls this directly

Calls 5

getDataPathMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected