Пример #1
0
void CUIActorMenu::SetPartner(CInventoryOwner* io)
{
	R_ASSERT			(!IsShown());
	m_pPartnerInvOwner	= io;
	if ( m_pPartnerInvOwner )
	{
		if (m_pPartnerInvOwner->use_simplified_visual() ) 
			m_PartnerCharacterInfo->ClearInfo();
		else 
			m_PartnerCharacterInfo->InitCharacter( m_pPartnerInvOwner->object_id() );

		SetInvBox( NULL );
	}else
		m_PartnerCharacterInfo->ClearInfo();
}
Пример #2
0
void wxSTEditorFindReplacePanel::OnIdle(wxIdleEvent &event)
{
    if (IsShown())
    {
        // This is a really ugly hack because the combo forgets it's insertion
        //   point in MSW whenever it loses focus
        wxWindow* focus = FindFocus();
        if (m_findCombo && (focus == m_findCombo))
            m_find_insert_pos = m_findCombo->GetInsertionPoint();
        if (m_replaceCombo && (focus == m_replaceCombo))
            m_replace_insert_pos = m_replaceCombo->GetInsertionPoint();
    }

    event.Skip();
}
Пример #3
0
bool wxTopLevelWindowMSW::IsIconized() const
{
#ifdef __WXWINCE__
    return false;
#else
    if ( !IsShown() )
        return m_iconized;

    // don't use m_iconized, it may be briefly out of sync with the real state
    // as it's only modified when we receive a WM_SIZE and we could be called
    // from an event handler from one of the messages we receive before it,
    // such as WM_MOVE
    return ::IsIconic(GetHwnd()) != 0;
#endif
}
Пример #4
0
bool SearchPanel::IsActive() const {
	if (!IsShown()) return false;

	// Check if any local control has focus
	wxWindow* focused = FindFocus();
	if (focused == (wxWindow*)searchbox) return true;
	if (focused == (wxWindow*)replaceBox) return true;
	if (focused == (wxWindow*)nextButton) return true;
	if (focused == (wxWindow*)prevButton) return true;
	if (focused == (wxWindow*)replaceButton) return true;
	if (focused == (wxWindow*)allButton) return true;
	if (focused == (wxWindow*)closeButton) return true;

	return false; // no focus
}
void PL_EDITOR_FRAME::RedrawActiveWindow( wxDC* aDC, bool aEraseBg )
{

    GetScreen()-> m_ScreenNumber = GetPageNumberOption() ? 1 : 2;

    if( aEraseBg )
        m_canvas->EraseScreen( aDC );

    m_canvas->DrawBackGround( aDC );

    const WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance();
    WORKSHEET_DATAITEM* selecteditem = GetSelectedItem();

    // the color to draw selected items
    if( GetDrawBgColor() == WHITE )
        WORKSHEET_DATAITEM::m_SelectedColor = DARKCYAN;
    else
        WORKSHEET_DATAITEM::m_SelectedColor = YELLOW;

    for( unsigned ii = 0; ; ii++ )
    {
        WORKSHEET_DATAITEM* item = pglayout.GetItem( ii );

        if( item == NULL )
            break;

        item->SetSelected( item == selecteditem );
    }

    DrawWorkSheet( aDC, GetScreen(), 0, IU_PER_MILS, GetCurrFileName() );

#ifdef USE_WX_OVERLAY
    if( IsShown() )
    {
        m_overlay.Reset();
        wxDCOverlay overlaydc( m_overlay, (wxWindowDC*)aDC );
        overlaydc.Clear();
    }
#endif

    if( m_canvas->IsMouseCaptured() )
        m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false );

    m_canvas->DrawCrossHair( aDC );

    // Display the filename
    UpdateTitleAndInfo();
}
Пример #6
0
bool wxDialog::Show( bool bShow )
{
    if ( bShow == IsShown() )
        return false;

    if (!bShow && m_modalData )
    {
        // we need to do this before calling wxDialogBase version because if we
        // had disabled other app windows, they must be reenabled right now as
        // if they stay disabled Windows will activate another window (one
        // which is enabled, anyhow) when we're hidden in the base class Show()
        // and we will lose activation
        m_modalData->ExitLoop();
#if 0
        wxDELETE(m_pWindowDisabler);
#endif
    }

    if (bShow)
    {
        if (CanDoLayoutAdaptation())
            DoLayoutAdaptation();

        // this usually will result in TransferDataToWindow() being called
        // which will change the controls values so do it before showing as
        // otherwise we could have some flicker
        InitDialog();
    }

    wxDialogBase::Show(bShow);

    wxString title = GetTitle();
    if (!title.empty())
        ::WinSetWindowText((HWND)GetHwnd(), title.c_str());

    if ( bShow )
    {
        // dialogs don't get WM_SIZE message after creation unlike most (all?)
        // other windows and so could start their life not laid out correctly
        // if we didn't call Layout() from here
        //
        // NB: normally we should call it just the first time but doing it
        //     every time is simpler than keeping a flag
        Layout();
    }

    return true;
} // end of wxDialog::Show
Пример #7
0
void WXAppBar::SetBorderDecorations (bool enable, bool apply)
{
	if (enable == GetBorderDecorations()) return;
	
	// Changes the flag
	long style= GetWindowStyleFlag();
	if (enable) {
		// Enable decorations
		style= style & ~wxNO_BORDER;
//		style= style | wxCAPTION;
	}
	else {
		// Disable decorations
		style= style | wxNO_BORDER;
//		style= style & ~wxCAPTION;
	}
	SetWindowStyleFlag(style);
	// According to the manual, after changing flags a Refresh is needed
	Refresh();

#if defined(__WXMSW__)
	// TODO
	(void)(apply); // Remove warning
	assert (false);
#elif defined(__WXGTK__)
	//
	// On WXGTK the above code is not enough, so we change this property
	// using gtk+ directly
	//
	
	// Get X11 handle for our window
	GtkWindow *gtkWindow= (GtkWindow *) GetHandle();
	assert (gtkWindow);
	if (!gtkWindow) return;

	bool isShown= IsShown();
	if (apply && isShown) wxDialog::Show(false);
	
	gtk_window_set_decorated ((GtkWindow *) GetHandle(), (enable? TRUE : FALSE));
	if (apply && isShown) {
		wxDialog::Show(true);
		Refresh();
		Update();
	}
#else
	assert (false);
#endif
}
Пример #8
0
/* This function is called on a regular basis */
void PlaylistManager::Update()
{
    i_update_counter++;

    /* If the playlist isn't show there's no need to update it */
    if( !IsShown() ) return;

    if( this->b_need_update )
    {
        this->b_need_update = VLC_FALSE;
        Rebuild( VLC_TRUE );
    }

    /* Updating the playing status every 0.5s is enough */
    if( i_update_counter % 5 ) return;
}
Пример #9
0
void wxDialog::DestroyGripper()
{
    if ( m_hGripper )
    {
        // we used to have trouble with gripper appearing on top (and hence
        // overdrawing) the other, real, dialog children -- check that this
        // isn't the case automatically (but notice that this could be false if
        // we're not shown at all as in this case ResizeGripper() might not
        // have been called yet)
        wxASSERT_MSG( !IsShown() ||
                      ::GetWindow((HWND)m_hGripper, GW_HWNDNEXT) == 0,
            wxT("Bug in wxWidgets: gripper should be at the bottom of Z-order") );
        ::DestroyWindow((HWND) m_hGripper);
        m_hGripper = 0;
    }
}
Пример #10
0
FPrimitiveViewRelevance FPaperBatchSceneProxy::GetViewRelevance(const FSceneView* View)
{
	checkSlow(IsInParallelRenderingThread());

	FPrimitiveViewRelevance Result;
	Result.bDrawRelevance = IsShown(View) && View->Family->EngineShowFlags.Paper2DSprites;
	Result.bRenderCustomDepth = ShouldRenderCustomDepth();
	Result.bRenderInMainPass = ShouldRenderInMainPass();

	Result.bMaskedRelevance = true;
	//Result.bNormalTranslucencyRelevance = true;
	Result.bDynamicRelevance = true;
	Result.bOpaqueRelevance = true;

	return Result;
}
Пример #11
0
void GSFrame::AppStatusEvent_OnSettingsApplied()
{
	if( IsBeingDeleted() ) return;

	SetWindowStyle((g_Conf->GSWindow.DisableResizeBorders ? 0 : wxRESIZE_BORDER) | wxCAPTION | wxCLIP_CHILDREN |
			wxSYSTEM_MENU | wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX);
	if (!IsFullScreen() && !IsMaximized())
		SetClientSize(g_Conf->GSWindow.WindowSize);
	Refresh();

	if( g_Conf->GSWindow.CloseOnEsc )
	{
		if( IsShown() && !CorePlugins.IsOpen(PluginId_GS) )
			Show( false );
	}
}
Пример #12
0
void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
{
    // avoid flicker - but don't need to do this for a hidden listbox
    bool hideAndShow = IsShown();
    if ( hideAndShow )
    {
        ShowWindow(GetHwnd(), SW_HIDE);
    }

    ListBox_ResetContent(GetHwnd());

    m_noItems = choices.GetCount();
    int i;
    for (i = 0; i < m_noItems; i++)
    {
        ListBox_AddString(GetHwnd(), choices[i]);
        if ( clientData )
        {
            SetClientData(i, clientData[i]);
        }
    }

#if wxUSE_OWNER_DRAWN
    if ( m_windowStyle & wxLB_OWNERDRAW ) {
        // first delete old items
        WX_CLEAR_ARRAY(m_aItems);

        // then create new ones
        for ( size_t ui = 0; ui < (size_t)m_noItems; ui++ ) {
            wxOwnerDrawn *pNewItem = CreateLboxItem(ui);
            pNewItem->SetName(choices[ui]);
            m_aItems.Add(pNewItem);
            ListBox_SetItemData(GetHwnd(), ui, pNewItem);
        }
    }
#endif // wxUSE_OWNER_DRAWN

    SetHorizontalExtent();

    if ( hideAndShow )
    {
        // show the listbox back if we hid it
        ShowWindow(GetHwnd(), SW_SHOW);
    }

    InvalidateBestSize();
}
Пример #13
0
/*----------------------------------------------------------------------
  SendDataToPanel refresh the attribute list or show the value panels
  params:
  returns:
  ----------------------------------------------------------------------*/
void AmayaAttributeToolPanel::SendDataToPanel( AmayaParams& p )
{
  if (IsShown())
    {
      if ( (int)(p.param1) == wxATTR_ACTION_LISTUPDATE)
        {
          DesactivatePanel();
          m_firstSel  = (PtrElement)(p.param5);
          m_lastSel   = (PtrElement)(p.param6);
          m_firstChar = p.param7;
          m_lastChar  = p.param8;
          ShowAttributValue( wxATTR_PANEID_NONE );
          SetupListValue ((DLList)(p.param2));
          ActivePanel();
        }
    }
}
void CParticleControlWnd::Update(float /*dtt*/)
{
    super::Update();
    if (IsShown())
    {
        double fSpeed = 1.0f;
        m_pPlaybackSpeedTextCtrl->GetValue().ToDouble(&fSpeed);
        BEATS_ASSERT(m_pAttachedEmitter != nullptr);
        if (!m_pAttachedEmitter->IsPlaying() && !m_pAttachedEmitter->IsPaused())
        {
            CParticleManager::GetInstance()->RemovePlayingEmitter(m_pAttachedEmitter);
        }
        m_pAttachedEmitter->m_fPlaySpeed = fSpeed;
        m_pPlaybackTimeTextCtrl->SetValue(wxString::FromDouble(m_pAttachedEmitter->GetPlayingTime(true), 2));
        m_pPlayBtn->SetLabel(m_pAttachedEmitter->IsPlaying() ? "Pause" : "Simulate");
    }
}
Пример #15
0
void wxSFThumbnail::_OnMouseMove(wxMouseEvent& event)
{
	if( m_pCanvas && IsShown() && event.Dragging() )
	{
		int ux, uy;
		m_pCanvas->GetScrollPixelsPerUnit( &ux, &uy );
		
		wxPoint szDelta = event.GetPosition() - m_nPrevMousePos;
		wxSize szCanvasOffset = GetCanvasOffset();
		
		m_pCanvas->Scroll( (double(szDelta.x)/m_nScale + szCanvasOffset.x)/ux, (double(szDelta.y)/m_nScale + szCanvasOffset.y)/uy );
		
		m_nPrevMousePos = event.GetPosition();
		
		Refresh(false);
	}
}
Пример #16
0
void wxMDIParentFrame::AddChild(wxWindowBase *child)
{
    // moved this to front, so that we don't run into unset m_parent problems later
    wxFrame::AddChild(child);

    if ( !m_currentChild )
    {
        m_currentChild = wxDynamicCast(child, wxMDIChildFrame);

        if ( m_currentChild && IsShown() && !ShouldBeVisible() )
        {
            // we shouldn't remain visible any more
            wxFrame::Show(false);
            m_shouldBeShown = true;
        }
    }
}
Пример #17
0
MapSelectDialog::~MapSelectDialog()
{
	//(*Destroy(MapSelectDialog)
	//*)
	sett().SetHorizontalSortkeyIndex( m_horizontal_choice->GetSelection() );
	sett().SetVerticalSortkeyIndex( m_vertical_choice->GetSelection() );
	sett().SetHorizontalSortorder( m_horizontal_direction );
	sett().SetVerticalSortorder( m_vertical_direction );
    if ( m_filter_all->GetValue() )
        sett().SetMapSelectorFilterRadio( m_filter_all_sett );
    else if ( m_filter_recent->GetValue() )
        sett().SetMapSelectorFilterRadio( m_filter_recent_sett );
    else
        sett().SetMapSelectorFilterRadio( m_filter_popular_sett );
	if ( IsShown() )
		EndModal( 0 );
}
Пример #18
0
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::UpdateWindowUI(long flags)
{
    wxWindowBase::UpdateWindowUI(flags);

    // don't waste time updating state of tools in a hidden toolbar
    if ( !IsShown() )
        return;

    wxEvtHandler* evtHandler = GetEventHandler() ;

#if defined(__INTEL_COMPILER) && 1 /* VDM auto patch */
#   pragma ivdep
#   pragma swp
#   pragma unroll
#   pragma prefetch
#   if 0
#       pragma simd noassert
#   endif
#endif /* VDM auto patch */
    for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
          node;
          node = node->GetNext() )
    {
        wxToolBarToolBase * const tool = node->GetData();
        if ( tool->IsSeparator() )
            continue;

        int toolid = tool->GetId();

        wxUpdateUIEvent event(toolid);
        event.SetEventObject(this);

        if ( evtHandler->ProcessEvent(event) )
        {
            if ( event.GetSetEnabled() )
                EnableTool(toolid, event.GetEnabled());
            if ( event.GetSetChecked() )
                ToggleTool(toolid, event.GetChecked());
#if 0
            if ( event.GetSetText() )
                // Set tooltip?
#endif // 0
        }
    }
}
Пример #19
0
void DockCont::Handle::Paint(Draw& w)
{
	if (IsShown() && dc) {
		const DockableCtrl::Style &s = dc->GetStyle();
		Rect r = GetSize();
		const Rect &m = s.handle_margins;
		Point p;

		if (s.handle_vert)
			p = Point(r.left-1 + m.left, r.bottom - m.bottom);
		else
			p = Point(r.left + m.left, r.top + m.top);
		ChPaint(w, r, s.handle[focus]);

		Image img = dc->GetIcon();
		if (!img.IsEmpty()) {
			if (s.handle_vert) {
				int isz = r.GetWidth();
				p.y -= isz;
				isz -= (m.left + m.right);
				ChPaint(w, max(p.x+m.left, r.left), p.y, isz, isz, img);
				p.y -= 2;
			}
			else {
				int isz = r.GetHeight();
				isz -= (m.top + m.bottom);
				ChPaint(w, p.x, max(p.y, r.top), isz, isz, img);
				p.x += isz + 2;
			}
		}
		if (!s.title_font.IsNull()) {
			Ctrl *c = GetLastChild();
			while (c && !c->IsShown() && c->GetParent())
				c = c->GetNext();
			if (s.handle_vert)
				r.top = c ? c->GetRect().bottom + m.top : m.top;
			else
				r.right = c ? c->GetRect().left + m.right : m.right;
			w.Clip(r);
			WString text = IsNull(dc->GetGroup()) ? dc->GetTitle() : (WString)Format("%s (%s)", dc->GetTitle(), dc->GetGroup());
			w.DrawText(p.x, p.y, s.handle_vert ? 900 : 0, text, s.title_font, s.title_ink[focus]);
			w.End();
		}
	}
}
Пример #20
0
void TruncSilenceDialog::OnControlChange(wxCommandEvent & WXUNUSED(event))
{
   // We may even get called during the constructor.
   // This test saves us from calling unsafe functions.
   if( !IsShown() )
      return;
   TransferDataFromWindow();

   bool bOk =  true;

   wxString warningText;
   if (mEffect->mInitialAllowedSilence < 0.001) {
      bOk = false;
      warningText = _("Minimum detection duration: 0.001 seconds.");
   } else if (mEffect->mInitialAllowedSilence > 10000.0) {
      bOk = false;
      warningText = _("Maximum detection duration: 10000 seconds.");
   }

   if ((mEffect->mTruncLongestAllowedSilence < 0.0f) && (mEffect->mProcessIndex != 1)) {
      bOk = false;
      warningText = _("Cannot truncate to less than 0 seconds.");
   } else if ((mEffect->mTruncLongestAllowedSilence > 10000.0)  && (mEffect->mProcessIndex != 1)) {
      bOk = false;
      warningText = _("Maximum truncation length is 10000 seconds.");
   }

   if ((mEffect->mSilenceCompressPercent < 0.0) && (mEffect->mProcessIndex != 0)) {
      bOk = false;
      warningText = _("Compression cannot be less than 0 percent.");
   } else if ((mEffect->mSilenceCompressPercent >= 100.0) && (mEffect->mProcessIndex != 0)) {
      bOk = false;
      warningText = _("Compression must be less than 100 percent");
   }

   pWarning->SetLabel( bOk ? wxT("") : warningText);

   wxWindow *pWnd;
   pWnd = FindWindowById( wxID_OK, this );
   pWnd->Enable( bOk );
   pWnd = FindWindowById( ID_EFFECT_PREVIEW, this );
   pWnd->Enable( bOk );

   UpdateUI();
}
Пример #21
0
void ClimatologyDialog::UpdateTrackingControls()
{
    if(!g_pOverlayFactory || !IsShown())
        return;

    m_tWind->SetValue(GetValue(ClimatologyOverlaySettings::WIND));
    m_tWindDir->SetValue(GetValue(ClimatologyOverlaySettings::WIND, DIRECTION));
    m_tCurrent->SetValue(GetValue(ClimatologyOverlaySettings::CURRENT));
    m_tCurrentDir->SetValue(GetValue(ClimatologyOverlaySettings::CURRENT, DIRECTION));
    m_tPressure->SetValue(GetValue(ClimatologyOverlaySettings::SLP));
    m_tSeaTemperature->SetValue(GetValue(ClimatologyOverlaySettings::SST));
    m_tAirTemperature->SetValue(GetValue(ClimatologyOverlaySettings::AT));
    m_tCloudCover->SetValue(GetValue(ClimatologyOverlaySettings::CLOUD));
    m_tPrecipitation->SetValue(GetValue(ClimatologyOverlaySettings::PRECIPITATION));
    m_tRelativeHumidity->SetValue(GetValue(ClimatologyOverlaySettings::RELATIVE_HUMIDITY));
    m_tLightning->SetValue(GetValue(ClimatologyOverlaySettings::LIGHTNING));
    m_tSeaDepth->SetValue(GetValue(ClimatologyOverlaySettings::SEADEPTH));
}
Пример #22
0
void ScrollBar::Set(int _pagepos, int _pagesize, int _totalsize) {
	pagesize = _pagesize;
	totalsize = _totalsize;
	bool a = totalsize > pagesize && pagesize > 0;
	if(autohide && a != IsShown()) {
		Show(a);
		WhenVisibility();
	}
	if(autodisable) {
		if(prev.IsEnabled() != a)
			Refresh();
		prev.Enable(a);
		next.Enable(a);
		prev2.Enable(a);
		next2.Enable(a);
	}
	Set(_pagepos);
}
Пример #23
0
void BasicGLPane::render( wxPaintEvent& evt )
{
    if(!IsShown()) return;
    
    wxGLCanvas::SetCurrent(*m_context);
    wxPaintDC(this); // only to be used in paint events. use wxClientDC to paint outside the paint event
    
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    
    prepare2DViewport(0,0,getWidth(), getHeight());
    glLoadIdentity();
    
    if (!buf.empty()) paint_buffer();


    glFlush();
    SwapBuffers();
}
Пример #24
0
void DropDownPopup::OnTimer( wxTimerEvent &WXUNUSED(event) )
{
    if (!IsShown()) return;

    m_mouse = ScreenToClient(wxGetMousePosition());

    wxWindow *child = GetChild();
    if (!child) return; // nothing to do

    wxRect clientRect(GetClientRect());
    //wxPrintf(wxT("**DropDownPopup::OnTimer mouse %d %d -- %d %d %d\n"), m_mouse.x, m_mouse.y, m_popped_handler, m_child, m_handlerPopup); fflush(stdout);
    // pop the event handler if inside the child window or
    // restore the event handler if not in the child window
    if (clientRect.Contains(m_mouse))
        PopPopupHandler(child);
    else
        PushPopupHandler(child);
}
Пример #25
0
void CUIActorMenu::SetActor(CInventoryOwner* io)
{
	R_ASSERT			(!IsShown());
	m_last_time			= Device.dwTimeGlobal;
	m_pActorInvOwner	= io;
	
	if ( IsGameTypeSingle() )
	{
		if ( io )
			m_ActorCharacterInfo->InitCharacter	(m_pActorInvOwner->object_id());
		else
			m_ActorCharacterInfo->ClearInfo();
	}
	else
	{
		UpdateActorMP();
	}
}
Пример #26
0
void RulerCtrl::FrameLayout(Rect& rc)
{
	Rect pos = rc;
	int wd = (IsShown() ? width : 0);
	if(IsVert()) {
		if(IsBottomRight())
			rc.right = max(rc.left, pos.left = rc.right - wd);
		else
			rc.left = min(rc.right, pos.right = pos.left + wd);
	}
	else {
		if(IsBottomRight())
			rc.bottom = max(rc.top, pos.top = pos.bottom - wd);
		else
			rc.top = min(rc.bottom, pos.bottom = pos.top + wd);
	}
	SetFrameRect(pos);
}
Пример #27
0
void CDlgEventLog::OnButtonHelp( wxCommandEvent& event ) {
    wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::OnHelp - Function Begin"));

    if (IsShown()) {
    	wxString strURL = wxGetApp().GetSkinManager()->GetAdvanced()->GetOrganizationHelpUrl();

		wxString wxurl;
		wxurl.Printf(
            wxT("%s?target=simple_messages&version=%s&controlid=%d"),
            strURL.c_str(),
            wxString(BOINC_VERSION_STRING, wxConvUTF8).c_str(),
            event.GetId()
        );
        wxLaunchDefaultBrowser(wxurl);
    }

    wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::OnHelp - Function End"));
}
Пример #28
0
	virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View)
	{
		FPrimitiveViewRelevance Result;
		Result.bDrawRelevance = IsShown(View) && (View->Family->EngineShowFlags.BillboardSprites);
		Result.bDynamicRelevance = true;
#if WITH_EDITORONLY_DATA
		if (bTreatAsASprite)
		{
			if ( GIsEditor && SpriteCategoryIndex != INDEX_NONE && SpriteCategoryIndex < View->SpriteCategoryVisibility.Num() && !View->SpriteCategoryVisibility[ SpriteCategoryIndex ] )
			{
				Result.bDrawRelevance = false;
			}
		}
#endif
		Result.bShadowRelevance = IsShadowCast(View);
		Result.bEditorPrimitiveRelevance = UseEditorCompositing(View);
		return Result;
	}
Пример #29
0
	virtual FPrimitiveViewRelevance GetViewRelevance(const FSceneView* View) override
	{
		bool bVisible = View->Family->EngineShowFlags.BillboardSprites;
#if WITH_EDITOR
		if ( GIsEditor && bVisible && SpriteCategoryIndex != INDEX_NONE && SpriteCategoryIndex < View->SpriteCategoryVisibility.Num() )
		{
			bVisible = View->SpriteCategoryVisibility[ SpriteCategoryIndex ];
		}
#endif
		FPrimitiveViewRelevance Result;
		Result.bDrawRelevance = IsShown(View) && bVisible;
		Result.bOpaqueRelevance = true;
		Result.bNormalTranslucencyRelevance = false;
		Result.bDynamicRelevance = true;
		Result.bShadowRelevance = IsShadowCast(View);
		Result.bEditorPrimitiveRelevance = UseEditorCompositing(View);
		return Result;
	}
Пример #30
0
// show dialog modally
int wxDialog::ShowModal()
{
    wxASSERT_MSG( !IsModal(), wxT("ShowModal() can't be called twice") );

    Show();

    // EndModal may have been called from InitDialog handler (called from
    // inside Show()) and hidden the dialog back again
    if ( IsShown() )
    {
        // enter and run the modal loop
        wxDialogModalDataTiedPtr modalData(&m_modalData,
                                           new wxDialogModalData(this));
        modalData->RunLoop();
    }

    return GetReturnCode();
}