コード例 #1
0
CPreviewDlg *CEntityDlg::ShowSoundChooser() {
    static CPreviewDlg soundDlg;
    soundDlg.SetMode(CPreviewDlg::SOUNDS);
    soundDlg.SetModal();
    if (soundDlg.GetSafeHwnd() == NULL) {
        soundDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW));
    }
    soundDlg.ShowWindow(SW_SHOW);
    while (soundDlg.Waiting()) {
    }
    return &soundDlg;
}
コード例 #2
0
CPreviewDlg *CEntityDlg::ShowMaterialChooser() {
    static CPreviewDlg matDlg;
    matDlg.SetMode(CPreviewDlg::MATERIALS);
    matDlg.SetModal();
    if (matDlg.GetSafeHwnd() == NULL) {
        matDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW));
    }
    matDlg.ShowWindow(SW_SHOW);
    matDlg.BringWindowToTop();
    while (matDlg.Waiting()) {
    }
    return &matDlg;
}
コード例 #3
0
CPreviewDlg *CEntityDlg::ShowGuiChooser() {
    static CPreviewDlg guiDlg;
    guiDlg.SetMode(CPreviewDlg::GUIS);
    guiDlg.SetModal();
    if (guiDlg.GetSafeHwnd() == NULL) {
        guiDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW));
    }
    guiDlg.ShowWindow(SW_SHOW);
    guiDlg.BringWindowToTop();
    while (guiDlg.Waiting()) {
    }
    return &guiDlg;
}
コード例 #4
0
CPreviewDlg *CEntityDlg::ShowParticleChooser() {
    static CPreviewDlg modelDlg;
    modelDlg.SetMode(CPreviewDlg::PARTICLES);
    modelDlg.SetModal();
    if (modelDlg.GetSafeHwnd() == NULL) {
        modelDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW));
    }
    modelDlg.ShowWindow(SW_SHOW);
    modelDlg.BringWindowToTop();
    while (modelDlg.Waiting()) {
    }
    return &modelDlg;
}
コード例 #5
0
CPreviewDlg *CEntityDlg::ShowSkinChooser(entity_t *ent) {
    static CPreviewDlg modelDlg;
    modelDlg.SetMode(CPreviewDlg::SKINS);
    modelDlg.SetModal();
    if (modelDlg.GetSafeHwnd() == NULL) {
        modelDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW));
    }
    modelDlg.RebuildTree( ( ent ) ? ent->epairs.GetString( "model" ) : "" );
    modelDlg.ShowWindow(SW_SHOW);
    modelDlg.BringWindowToTop();
    while (modelDlg.Waiting()) {
    }
    return &modelDlg;
}