Пример #1
0
int UserControl::readBody(RtmpStream *arr) {
    type = Type(readUnsignedInt16(arr));
    int bytesRead = 2;
    // Event data (1 for most types, 2 for SET_BUFFER_LENGTH)
    if (type == SET_BUFFER_LENGTH) {
        setEventData(readUnsignedInt32(arr), readUnsignedInt32(arr));
        bytesRead += 8;
    } else {
        setEventData(readUnsignedInt32(arr));
        bytesRead += 4;
    }
}
Пример #2
0
void MainWindow::slotLanguageChanged(QAction* action)
{
    WriteToLog(QtDebugMsg, QString("Translation->SlotStarted"));
    if(0 != action)
    {
        // load the language depending on the action content
        GlobalSettings::locale = m_currLang;

        lockTilesetBox=true;

        int doorType = ui->WarpType->currentIndex(); //backup combobox's index
        int npcGenType = ui->PROPS_NPCGenType->currentIndex(); //backup combobox's index

        loadLanguage(action->data().toString());

        ui->WarpType->setCurrentIndex(doorType); //restore combobox's index
        ui->PROPS_NPCGenType->setCurrentIndex(npcGenType);

        lockTilesetBox=false;

        setLvlItemBoxes();
        setLevelSectionData();
        setEventData(-1);
        setSoundList();
        WldLvlExitTypeListReset();
        setCurrentWorldSettings();
        setTileSetBox();

        DevConsole::retranslate();
    }
}