Exemplo n.º 1
0
/* GfxEntryPanel::applyViewType
 * Sets the view type of the gfx canvas depending on what is selected
 * in the offset type combo box
 *******************************************************************/
void GfxEntryPanel::applyViewType()
{
	// Tile checkbox overrides offset type selection
	if (cb_tile->IsChecked())
		gfx_canvas->setViewType(GFXVIEW_TILED);
	else
	{
		// Set gfx canvas view type depending on the offset combobox selection
		int sel = choice_offset_type->GetSelection();
		switch (sel)
		{
		case 0:
			gfx_canvas->setViewType(detectOffsetType());
			break;
		case 1:
			gfx_canvas->setViewType(GFXVIEW_DEFAULT);
			break;
		case 2:
			gfx_canvas->setViewType(GFXVIEW_SPRITE);
			break;
		case 3:
			gfx_canvas->setViewType(GFXVIEW_HUD);
			break;
		}
	}

	// Refresh
	gfx_canvas->Refresh();
}
Exemplo n.º 2
0
// -----------------------------------------------------------------------------
// Sets the view type of the gfx canvas depending on what is selected in the
// offset type combo box
// -----------------------------------------------------------------------------
void GfxEntryPanel::applyViewType() const
{
	// Tile checkbox overrides offset type selection
	if (cb_tile_->IsChecked())
		gfx_canvas_->setViewType(GfxCanvas::View::Tiled);
	else
	{
		// Set gfx canvas view type depending on the offset combobox selection
		int sel = choice_offset_type_->GetSelection();
		switch (sel)
		{
		case 0: gfx_canvas_->setViewType(detectOffsetType()); break;
		case 1: gfx_canvas_->setViewType(GfxCanvas::View::Default); break;
		case 2: gfx_canvas_->setViewType(GfxCanvas::View::Sprite); break;
		case 3: gfx_canvas_->setViewType(GfxCanvas::View::HUD); break;
		default: break;
		}
	}

	// Refresh
	gfx_canvas_->Refresh();
}