Skip to content

Commit

Permalink
Documentation work
Browse files Browse the repository at this point in the history
Fixed Recorder
  • Loading branch information
effekseer committed Jun 30, 2018
1 parent c0e9eae commit a394d3d
Show file tree
Hide file tree
Showing 11 changed files with 287 additions and 44 deletions.
4 changes: 2 additions & 2 deletions Dev/Cpp/Viewer/GUI/efk.GUIManager.cpp
Expand Up @@ -579,9 +579,9 @@ namespace efk
ImGui::End();
}

bool GUIManager::BeginChild(const char* str_id)
bool GUIManager::BeginChild(const char* str_id, const Vec2& size_arg, bool border, WindowFlags extra_flags)
{
return ImGui::BeginChild(str_id);
return ImGui::BeginChild(str_id, ImVec2(size_arg.X, size_arg.Y), border, (ImGuiWindowFlags)extra_flags);
}

void GUIManager::EndChild()
Expand Down
2 changes: 1 addition & 1 deletion Dev/Cpp/Viewer/GUI/efk.GUIManager.h
Expand Up @@ -277,7 +277,7 @@ namespace efk
bool Begin(const char16_t* name, bool* p_open);
void End();

bool BeginChild(const char* str_id);
bool BeginChild(const char* str_id, const Vec2& size_arg = Vec2(), bool border = false, WindowFlags extra_flags = WindowFlags::None);
void EndChild();

// Windows Utilities
Expand Down
68 changes: 67 additions & 1 deletion Dev/Cpp/Viewer/dll_cs.cxx
Expand Up @@ -2828,7 +2828,73 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Effekseerfswig_GUIManager_End___(void * jarg1
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Effekseerfswig_GUIManager_BeginChild___(void * jarg1, char * jarg2) {
SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_0___(void * jarg1, char * jarg2, void * jarg3, unsigned int jarg4, int jarg5) {
unsigned int jresult ;
efk::GUIManager *arg1 = (efk::GUIManager *) 0 ;
char *arg2 = (char *) 0 ;
efk::Vec2 *arg3 = 0 ;
bool arg4 ;
efk::WindowFlags arg5 ;
bool result;

arg1 = (efk::GUIManager *)jarg1;
arg2 = (char *)jarg2;
arg3 = (efk::Vec2 *)jarg3;
if (!arg3) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "efk::Vec2 const & type is null", 0);
return 0;
}
arg4 = jarg4 ? true : false;
arg5 = (efk::WindowFlags)jarg5;
result = (bool)(arg1)->BeginChild((char const *)arg2,(efk::Vec2 const &)*arg3,arg4,arg5);
jresult = result;
return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_1___(void * jarg1, char * jarg2, void * jarg3, unsigned int jarg4) {
unsigned int jresult ;
efk::GUIManager *arg1 = (efk::GUIManager *) 0 ;
char *arg2 = (char *) 0 ;
efk::Vec2 *arg3 = 0 ;
bool arg4 ;
bool result;

arg1 = (efk::GUIManager *)jarg1;
arg2 = (char *)jarg2;
arg3 = (efk::Vec2 *)jarg3;
if (!arg3) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "efk::Vec2 const & type is null", 0);
return 0;
}
arg4 = jarg4 ? true : false;
result = (bool)(arg1)->BeginChild((char const *)arg2,(efk::Vec2 const &)*arg3,arg4);
jresult = result;
return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_2___(void * jarg1, char * jarg2, void * jarg3) {
unsigned int jresult ;
efk::GUIManager *arg1 = (efk::GUIManager *) 0 ;
char *arg2 = (char *) 0 ;
efk::Vec2 *arg3 = 0 ;
bool result;

arg1 = (efk::GUIManager *)jarg1;
arg2 = (char *)jarg2;
arg3 = (efk::Vec2 *)jarg3;
if (!arg3) {
SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "efk::Vec2 const & type is null", 0);
return 0;
}
result = (bool)(arg1)->BeginChild((char const *)arg2,(efk::Vec2 const &)*arg3);
jresult = result;
return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_3___(void * jarg1, char * jarg2) {
unsigned int jresult ;
efk::GUIManager *arg1 = (efk::GUIManager *) 0 ;
char *arg2 = (char *) 0 ;
Expand Down
13 changes: 11 additions & 2 deletions Dev/Editor/Effekseer/swig/EffekseerNativePINVOKE.cs
Expand Up @@ -813,8 +813,17 @@ protected class SWIGWStringHelper {
[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_End___")]
public static extern void GUIManager_End(global::System.Runtime.InteropServices.HandleRef jarg1);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild___")]
public static extern bool GUIManager_BeginChild(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_0___")]
public static extern bool GUIManager_BeginChild__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, bool jarg4, int jarg5);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_1___")]
public static extern bool GUIManager_BeginChild__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, bool jarg4);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_2___")]
public static extern bool GUIManager_BeginChild__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_3___")]
public static extern bool GUIManager_BeginChild__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_EndChild___")]
public static extern void GUIManager_EndChild(global::System.Runtime.InteropServices.HandleRef jarg1);
Expand Down
20 changes: 19 additions & 1 deletion Dev/Editor/Effekseer/swig/GUIManager.cs
Expand Up @@ -129,8 +129,26 @@ public class GUIManager : global::System.IDisposable {
EffekseerNativePINVOKE.GUIManager_End(swigCPtr);
}

public bool BeginChild(string str_id, Vec2 size_arg, bool border, WindowFlags extra_flags) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_0(swigCPtr, str_id, Vec2.getCPtr(size_arg), border, (int)extra_flags);
if (EffekseerNativePINVOKE.SWIGPendingException.Pending) throw EffekseerNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}

public bool BeginChild(string str_id, Vec2 size_arg, bool border) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_1(swigCPtr, str_id, Vec2.getCPtr(size_arg), border);
if (EffekseerNativePINVOKE.SWIGPendingException.Pending) throw EffekseerNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}

public bool BeginChild(string str_id, Vec2 size_arg) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_2(swigCPtr, str_id, Vec2.getCPtr(size_arg));
if (EffekseerNativePINVOKE.SWIGPendingException.Pending) throw EffekseerNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}

public bool BeginChild(string str_id) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild(swigCPtr, str_id);
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_3(swigCPtr, str_id);
return ret;
}

Expand Down
145 changes: 136 additions & 9 deletions Dev/Editor/EffekseerMP/GUI/Dock/Recorder.cs
Expand Up @@ -61,43 +61,143 @@ protected override void UpdateInternal()
var freq_ = new int[] { freq };
var theNumberOfImageV_ = new int[] { theNumberOfImageV };
var nowReloading_ = new bool[] { nowReloading };

var areaTitle = Resources.GetString("Resolution");
var exportedFrameTitle = Resources.GetString("ExportedFrame");
var typeTitle = Resources.GetString("Format");
var optionsTitle = Resources.GetString("Options");

if(Manager.NativeManager.DragInt(Resources.GetString("Width") + "###w", w))
// Recordingwindow
Manager.NativeManager.BeginChild("##RecordRes", new swig.Vec2(0,120), true, swig.WindowFlags.MenuBar);
if (Manager.NativeManager.BeginMenuBar())
{
if (Manager.NativeManager.BeginMenu(areaTitle + "##RecordResTitle"))
{
Manager.NativeManager.EndMenu();
}

Manager.NativeManager.EndMenuBar();
}

Manager.NativeManager.Columns(2);
Manager.NativeManager.SetColumnWidth(0, 120);

Manager.NativeManager.Text(Resources.GetString("Width"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.DragInt("###w", w))
{
viewerParameter.GuideWidth = w[0];
}

if (Manager.NativeManager.DragInt(Resources.GetString("Height") + "###h", h))
Manager.NativeManager.NextColumn();

Manager.NativeManager.Text(Resources.GetString("Height"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.DragInt("###h", h))
{
viewerParameter.GuideHeight = h[0];
}

if (Manager.NativeManager.Checkbox(Resources.GetString("ShowGuide") + "###sg", showGuide))
Manager.NativeManager.NextColumn();

Manager.NativeManager.Text(Resources.GetString("ShowGuide"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.Checkbox("###sg", showGuide))
{
viewerParameter.RendersGuide = showGuide[0];
}

if (Manager.NativeManager.DragInt(Resources.GetString("StartFrame") + "###sf", startingFrame_))
Manager.NativeManager.Columns(1);

Manager.NativeManager.EndChild();

// Recordingwindow
Manager.NativeManager.BeginChild("##OutputFrame", new swig.Vec2(0, 120), true, swig.WindowFlags.MenuBar);
if (Manager.NativeManager.BeginMenuBar())
{
if (Manager.NativeManager.BeginMenu(exportedFrameTitle + "##OutputFrameTitle"))
{
Manager.NativeManager.EndMenu();
}

Manager.NativeManager.EndMenuBar();
}

Manager.NativeManager.Columns(2);
Manager.NativeManager.SetColumnWidth(0, 120);

Manager.NativeManager.Text(Resources.GetString("StartFrame"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.DragInt("###sf", startingFrame_))
{
startingFrame = startingFrame_[0];
}

if (Manager.NativeManager.DragInt(Resources.GetString("EndFrame") + "###ef", endingFrame_))
Manager.NativeManager.NextColumn();

Manager.NativeManager.Text(Resources.GetString("EndFrame"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.DragInt("###ef", endingFrame_))
{
endingFrame = endingFrame_[0];
}

if (Manager.NativeManager.DragInt(Resources.GetString("Frequency_Frame") + "###ff", freq_))
Manager.NativeManager.NextColumn();

Manager.NativeManager.Text(Resources.GetString("Frequency_Frame"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.DragInt("###ff", freq_))
{
freq = freq_[0];
}

if(Manager.NativeManager.DragInt(Resources.GetString("XCount") + "###tn", theNumberOfImageV_))
Manager.NativeManager.Columns(1);

Manager.NativeManager.EndChild();

// Recordingwindow
Manager.NativeManager.BeginChild("##OutputType", new swig.Vec2(0, 100), true, swig.WindowFlags.MenuBar);
if (Manager.NativeManager.BeginMenuBar())
{
if (Manager.NativeManager.BeginMenu(typeTitle + "#OutputTypeTitle"))
{
Manager.NativeManager.EndMenu();
}

Manager.NativeManager.EndMenuBar();
}

Manager.NativeManager.Columns(2);
Manager.NativeManager.SetColumnWidth(0, 120);

Manager.NativeManager.Text(Resources.GetString("XCount"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.DragInt("###tn", theNumberOfImageV_))
{
theNumberOfImageV = theNumberOfImageV_[0];
}

if (Manager.NativeManager.BeginCombo(Resources.GetString("ExportedFrame") + "###extype", selectedExportTypes[selectedTypeIndex], swig.ComboFlags.None))
Manager.NativeManager.NextColumn();

Manager.NativeManager.Text(Resources.GetString("ExportedFrame"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.BeginCombo("###extype", selectedExportTypes[selectedTypeIndex], swig.ComboFlags.None))
{
for(int i = 0; i < selectedExportTypes.Length; i++)
{
Expand All @@ -111,7 +211,30 @@ protected override void UpdateInternal()
Manager.NativeManager.EndCombo();
}

if (Manager.NativeManager.BeginCombo(Resources.GetString("MakeTransparent") + "###tr", selectedAlphaTypes[selectedAlphaIndex], swig.ComboFlags.None))
Manager.NativeManager.Columns(1);

Manager.NativeManager.EndChild();

// Recordingwindow
Manager.NativeManager.BeginChild("##Option", new swig.Vec2(0, 60), true, swig.WindowFlags.MenuBar);
if (Manager.NativeManager.BeginMenuBar())
{
if (Manager.NativeManager.BeginMenu(optionsTitle + "##OptionTitle"))
{
Manager.NativeManager.EndMenu();
}

Manager.NativeManager.EndMenuBar();
}

Manager.NativeManager.Columns(2);
Manager.NativeManager.SetColumnWidth(0, 120);

Manager.NativeManager.Text(Resources.GetString("MakeTransparent"));

Manager.NativeManager.NextColumn();

if (Manager.NativeManager.BeginCombo("###tr", selectedAlphaTypes[selectedAlphaIndex], swig.ComboFlags.None))
{
for (int i = 0; i < selectedAlphaTypes.Length; i++)
{
Expand All @@ -125,6 +248,10 @@ protected override void UpdateInternal()
Manager.NativeManager.EndCombo();
}

Manager.NativeManager.Columns(1);

Manager.NativeManager.EndChild();

Manager.Viewer.SetViewerParamater(viewerParameter);

if(Manager.NativeManager.Button(Resources.GetString("Record") + "###btn"))
Expand Down
13 changes: 11 additions & 2 deletions Dev/Editor/EffekseerMP/swig/EffekseerNativePINVOKE.cs
Expand Up @@ -813,8 +813,17 @@ protected class SWIGWStringHelper {
[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_End___")]
public static extern void GUIManager_End(global::System.Runtime.InteropServices.HandleRef jarg1);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild___")]
public static extern bool GUIManager_BeginChild(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_0___")]
public static extern bool GUIManager_BeginChild__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, bool jarg4, int jarg5);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_1___")]
public static extern bool GUIManager_BeginChild__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, bool jarg4);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_2___")]
public static extern bool GUIManager_BeginChild__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_BeginChild__SWIG_3___")]
public static extern bool GUIManager_BeginChild__SWIG_3(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);

[global::System.Runtime.InteropServices.DllImport("Viewer", EntryPoint="CSharp_Effekseerfswig_GUIManager_EndChild___")]
public static extern void GUIManager_EndChild(global::System.Runtime.InteropServices.HandleRef jarg1);
Expand Down
20 changes: 19 additions & 1 deletion Dev/Editor/EffekseerMP/swig/GUIManager.cs
Expand Up @@ -129,8 +129,26 @@ public class GUIManager : global::System.IDisposable {
EffekseerNativePINVOKE.GUIManager_End(swigCPtr);
}

public bool BeginChild(string str_id, Vec2 size_arg, bool border, WindowFlags extra_flags) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_0(swigCPtr, str_id, Vec2.getCPtr(size_arg), border, (int)extra_flags);
if (EffekseerNativePINVOKE.SWIGPendingException.Pending) throw EffekseerNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}

public bool BeginChild(string str_id, Vec2 size_arg, bool border) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_1(swigCPtr, str_id, Vec2.getCPtr(size_arg), border);
if (EffekseerNativePINVOKE.SWIGPendingException.Pending) throw EffekseerNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}

public bool BeginChild(string str_id, Vec2 size_arg) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_2(swigCPtr, str_id, Vec2.getCPtr(size_arg));
if (EffekseerNativePINVOKE.SWIGPendingException.Pending) throw EffekseerNativePINVOKE.SWIGPendingException.Retrieve();
return ret;
}

public bool BeginChild(string str_id) {
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild(swigCPtr, str_id);
bool ret = EffekseerNativePINVOKE.GUIManager_BeginChild__SWIG_3(swigCPtr, str_id);
return ret;
}

Expand Down

0 comments on commit a394d3d

Please sign in to comment.