[DEV] set the reload of the shader

This commit is contained in:
Edouard Dupin 2012-10-11 18:05:56 +02:00
parent ecced51f81
commit 7aa4f9ae4d
4 changed files with 12 additions and 2 deletions

View File

@ -45,6 +45,7 @@
#include <ewol/widget/meta/FileChooser.h>
#include <ewol/widget/meta/Parameter.h>
#include <ewol/widget/WidgetManager.h>
#include <ewol/ResourceManager.h>
#include <ewol/eObject/EObject.h>
@ -83,7 +84,7 @@ class ParameterAboutGui : public ewol::SizerVert
AddElement(" Website : https://github.com/HeeroYui/ewol");
AddElement(" Licence : BSD like");
AddElement(" Copyright 2010 Edouard DUPIN, all right reserved");
AddElement(" Supported OS : Linux, Android" );
AddElement(" Supported OS : Linux, Windows, Android" );
AddElement(etk::UString(" OpenGl librairy : v") + ewol::GetVersion() );
AddElement("Ewol", true);
AddElement("");
@ -253,6 +254,8 @@ MainWindows::MainWindows(void)
(void)myMenu->AddSpacer();
(void)myMenu->Add(idMenugDisplay, "Color Black", "", ednMsgGuiChangeColor, "Black");
(void)myMenu->Add(idMenugDisplay, "Color White", "", ednMsgGuiChangeColor, "White");
(void)myMenu->AddSpacer();
(void)myMenu->Add(idMenugDisplay, "Reload OpenGl Shader", "", ednMsgGuiReloadShader);
m_widgetLabelFileName = new ewol::Label("FileName");
m_widgetLabelFileName->SetExpendX(true);
@ -266,6 +269,7 @@ MainWindows::MainWindows(void)
// to update the title ...
RegisterMultiCast(ednMsgBufferState);
RegisterMultiCast(ednMsgBufferId);
RegisterMultiCast(ednMsgGuiReloadShader);
}
@ -289,7 +293,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
{
ewol::Windows::OnReceiveMessage(CallerObject, eventId, data);
//APPL_INFO("Receive Event from the main windows ... : widgetid=" << CallerObject << "\"" << eventId << "\" ==> data=\"" << data << "\"" );
//APPL_INFO("Receive Event from the main windows ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
// Open file Section ...
if (eventId == ednMsgGuiOpen) {
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
@ -414,6 +418,9 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
DF_SoftEdge_min = DF_SoftEdge_max;
tmpSliderMin->SetValue(DF_SoftEdge_min*1000.0);
}
} else if (eventId == ednMsgGuiReloadShader) {
ewol::resource::ReLoadResources();
ewol::ForceRedrawAll();
}
return;

View File

@ -56,6 +56,7 @@ extern const char* const ednMsgGuiShowEndOfLine = "edn-Msg-Gui-ShowEndOfLine";
extern const char* const ednMsgGuiCtags = "edn-Msg-Gui-CTags";
extern const char* const ednMsgGuiReloadShader = "edn-Msg-Gui-ReloadOpenGlShader";
////////////////////////////////////////////////////////////////////////

View File

@ -56,6 +56,7 @@
extern const char* const ednMsgGuiCtags; // data : "Load" "ReLoad" "Jump" "Back"
extern const char* const ednMsgGuiReloadShader; // data : ""
////////////////////////////////////////////////////////////////////////

View File

@ -133,6 +133,7 @@ void APP_Init(void)
ewol::shortCut::Add("ctrl+l", ednMsgGuiGotoLine, "???");
ewol::shortCut::Add("ctrl+f", ednMsgGuiSearch, "");
ewol::shortCut::Add("F12", ednMsgGuiReloadShader, "");
// add files