Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelgautier/9d3cd17697e17768ec68 to your computer and use it in GitHub Desktop.
Save michaelgautier/9d3cd17697e17768ec68 to your computer and use it in GitHub Desktop.
/*Copyright 2015 Michael Gautier, Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Software distributed under the License is distributed on an "AS IS" BASIS,
NO WARRANTIES OR CONDITIONS OF ANY KIND, explicit or implicit.
See the License for details on permissions and limitations.*/
/*
Discussed in a WordPress Post: Exploring SFML Graphics in C++, Refactoring Wave 4
https://gautiertalkstechnology.wordpress.com/2014/09/18/exploring-sfml-graphics-in-c-refactoring-wave-4/
Full, version 4 tree:
https://github.com/michaelgautier/codeexpo/tree/master/building_cpp_with_sfml_wave_04
*/
#include "programviewfirstview.h"
#include "mvcviewbase.h"
using namespace Gautier::GautierProgram;
using namespace Gautier::SFMLApp::MVCViews;
MVCViewBase& ProgramViewFirstView::NextView()
{
return *_ActiveView;
}
void ProgramViewFirstView::Activate()
{
/*
Logic specific to this view.
*/
return;
}
CollectionVisual ProgramViewFirstView::GetVisuals()
{
return _Visuals;
}
void ProgramViewFirstView::ProcessEvent(const WindowEventModel& eventModel)
{
_Visuals.clear();
auto BackgroundShape = new SFMLRectangleShape;
BackgroundShape->setSize(SFMLVector2Float(200,200));
BackgroundShape->setFillColor(SFMLColor::Magenta);
_Visuals.push_back(BackgroundShape);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment