Merge branch 'Preview4_0' of https://github.com/Areloch/Torque3D into Preview4_0

This commit is contained in:
AzaezelX 2019-06-17 02:58:39 -05:00
commit 51bed8c95c
198 changed files with 10183 additions and 601 deletions

View file

@ -89,7 +89,11 @@ ImplementEnumType(ReflectionModeEnum,
//-----------------------------------------------------------------------------
// Object setup and teardown
//-----------------------------------------------------------------------------
ReflectionProbe::ReflectionProbe()
ReflectionProbe::ReflectionProbe() :
cubeDescId(0),
reflectorDesc(nullptr),
mSphereVertCount(0),
mSpherePrimitiveCount(0)
{
// Flag this object so that it will always
// be sent across the network to clients
@ -247,11 +251,11 @@ bool ReflectionProbe::_setReflectionMode(void *object, const char *index, const
{
ReflectionProbe* probe = reinterpret_cast<ReflectionProbe*>(object);
if (data == "Static Cubemap")
if (!dStrcmp(data,"Static Cubemap"))
{
probe->mReflectionModeType = StaticCubemap;
}
else if (data == "Baked Cubemap")
else if (!dStrcmp(data, "Baked Cubemap"))
{
//Clear our cubemap if we changed it to be baked, just for cleanliness
probe->mReflectionModeType = BakedCubemap;
@ -589,6 +593,8 @@ void ReflectionProbe::processDynamicCubemap()
else
mProbeInfo->mIsEnabled = false;
mCubemapDirty = false;
//Update the probe manager with our new texture!
//if (!mProbeInfo->mIsSkylight && mProbeInfo->mPrefilterCubemap->isInitialized() && mProbeInfo->mIrradianceCubemap->isInitialized())
// PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
@ -637,9 +643,10 @@ void ReflectionProbe::processBakedCubemap()
{
mProbeInfo->mIsEnabled = true;
mCubemapDirty = false;
//Update the probe manager with our new texture!
if (!mProbeInfo->mIsSkylight)
PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
PROBEMGR->updateProbeTexture(mProbeInfo);
}
}
@ -729,9 +736,10 @@ void ReflectionProbe::processStaticCubemap()
{
mProbeInfo->mIsEnabled = true;
mCubemapDirty = false;
//Update the probe manager with our new texture!
if (!mProbeInfo->mIsSkylight)
PROBEMGR->updateProbeTexture(mProbeInfo->mProbeIdx);
PROBEMGR->updateProbeTexture(mProbeInfo);
}
}
@ -739,7 +747,7 @@ bool ReflectionProbe::createClientResources()
{
if (mProbeInfo == nullptr)
{
mProbeInfo = PROBEMGR->registerProbe(mProbeShapeType == ProbeRenderInst::Skylight);
mProbeInfo = PROBEMGR->registerProbe();
if (!mProbeInfo)
return false;

View file

@ -151,9 +151,6 @@ protected:
U32 mDynamicLastBakeMS;
U32 mRefreshRateMS;
GBitmap* mCubeFaceBitmaps[6];
U32 mCubemapResolution;
F32 mMaxDrawDistance;
bool mResourcesCreated;

View file

@ -26,7 +26,7 @@
#include "gfx/D3D11/gfxD3D11EnumTranslate.h"
#include "gfx/bitmap/imageUtils.h"
GFXD3D11Cubemap::GFXD3D11Cubemap() : mTexture(NULL), mSRView(NULL), mDSView(NULL)
GFXD3D11Cubemap::GFXD3D11Cubemap() : mTexture(NULL), mSRView(NULL), mDSView(NULL), mTexSize(0)
{
mDynamic = false;
mAutoGenMips = false;
@ -568,4 +568,4 @@ void GFXD3D11CubemapArray::zombify()
void GFXD3D11CubemapArray::resurrect()
{
// Static cubemaps are handled by D3D
}
}

View file

@ -41,17 +41,22 @@ void GFXCardProfiler::loadProfileScript(const char* aScriptName)
void *data = NULL;
U32 dataSize = 0;
Torque::FS::ReadFile( scriptName.c_str(), data, dataSize, true );
if(data == NULL)
{
#if TORQUE_DEBUG
Con::warnf(" - No card profile %s exists", scriptName.c_str());
#endif
return;
}
const char *script = static_cast<const char *>(data);
#if TORQUE_DEBUG
Con::printf(" - Loaded card profile %s", scriptName.c_str());
#endif
Con::evaluate(script, false, NULL);
delete[] script;

View file

@ -89,6 +89,7 @@ IMPLEMENT_CALLBACK( GuiSliderCtrl, onMouseDragged, void, (), (),
GuiSliderCtrl::GuiSliderCtrl()
: mRange( 0., 1.f ),
mTicks( 10 ),
mRenderTicks(true),
mSnap( false ),
mValue( 0.5f ),
mThumbSize( 8, 20 ),
@ -98,7 +99,9 @@ GuiSliderCtrl::GuiSliderCtrl()
mDisplayValue( false ),
mMouseOver( false ),
mDepressed( false ),
mMouseDragged( false )
mMouseDragged( false ),
mUseFillBar(false),
mFillBarColor(ColorI(255,255,255))
{
}
@ -117,6 +120,12 @@ void GuiSliderCtrl::initPersistFields()
addProtectedField( "value", TypeF32, Offset( mValue, GuiSliderCtrl ),
_setValue, defaultProtectedGetFn,
"The value corresponding to the current slider position." );
addField("useFillBar", TypeBool, Offset(mUseFillBar, GuiSliderCtrl),
"Whether to render the tick marks.");
addField("fillBarColor", TypeColorI, Offset(mFillBarColor, GuiSliderCtrl),
"Whether to render the tick marks.");
addField("renderTicks", TypeBool, Offset(mRenderTicks, GuiSliderCtrl),
"Whether to render the tick marks.");
endGroup( "Slider" );
@ -365,9 +374,18 @@ void GuiSliderCtrl::onRender(Point2I offset, const RectI &updateRect)
GFXDrawUtil* drawUtil = GFX->getDrawUtil();
if (mUseFillBar)
{
drawUtil->drawRectFill(RectI(offset.x, offset.y, getWidth() * mValue, getHeight()), mFillBarColor);
renderChildControls(offset, updateRect);
return;
}
if( mHasTexture )
{
if(mTicks > 0)
if(mTicks > 0 && mRenderTicks)
{
// TODO: tick marks should be positioned based on the bitmap dimensions.
Point2I mid(ext.x, ext.y/2);
@ -443,11 +461,14 @@ void GuiSliderCtrl::onRender(Point2I offset, const RectI &updateRect)
PrimBuild::vertex2i( pos.x + mid.x, pos.y + mid.y );
// tick marks
for( U32 t = 0; t <= ( mTicks + 1 ); t++ )
if (mRenderTicks)
{
S32 x = (S32)( F32( mid.x - 1 ) / F32( mTicks + 1 ) * F32( t ) );
PrimBuild::vertex2i( pos.x + x, pos.y + mid.y - mShiftPoint );
PrimBuild::vertex2i( pos.x + x, pos.y + mid.y + mShiftPoint );
for (U32 t = 0; t <= (mTicks + 1); t++)
{
S32 x = (S32)(F32(mid.x - 1) / F32(mTicks + 1) * F32(t));
PrimBuild::vertex2i(pos.x + x, pos.y + mid.y - mShiftPoint);
PrimBuild::vertex2i(pos.x + x, pos.y + mid.y + mShiftPoint);
}
}
PrimBuild::end();
}
@ -462,11 +483,14 @@ void GuiSliderCtrl::onRender(Point2I offset, const RectI &updateRect)
PrimBuild::vertex2i( pos.x + mid.x, pos.y + mid.y );
// tick marks
for( U32 t = 0; t <= ( mTicks + 1 ); t++ )
if (mRenderTicks)
{
S32 y = (S32)( F32( mid.y - 1 ) / F32( mTicks + 1 ) * F32( t ) );
PrimBuild::vertex2i( pos.x + mid.x - mShiftPoint, pos.y + y );
PrimBuild::vertex2i( pos.x + mid.x + mShiftPoint, pos.y + y );
for (U32 t = 0; t <= (mTicks + 1); t++)
{
S32 y = (S32)(F32(mid.y - 1) / F32(mTicks + 1) * F32(t));
PrimBuild::vertex2i(pos.x + mid.x - mShiftPoint, pos.y + y);
PrimBuild::vertex2i(pos.x + mid.x + mShiftPoint, pos.y + y);
}
}
PrimBuild::end();
mDisplayValue = false;

View file

@ -39,6 +39,7 @@ class GuiSliderCtrl : public GuiControl
Point2F mRange;
U32 mTicks;
bool mRenderTicks;
bool mSnap;
F32 mValue;
RectI mThumb;
@ -51,6 +52,8 @@ class GuiSliderCtrl : public GuiControl
bool mMouseOver;
bool mMouseDragged;
bool mHasTexture;
bool mUseFillBar;
ColorI mFillBarColor;
enum
{

View file

@ -1246,7 +1246,7 @@ void GuiTextEditCtrl::onLoseFirstResponder()
//execute the validate command
if( mValidateCommand.isNotEmpty() )
evaluate( mValidateCommand );
evaluate( mValidateCommand.c_str() );
onValidate_callback();

View file

@ -286,7 +286,7 @@ void PopupMenu::showPopup(GuiCanvas *owner, S32 x /* = -1 */, S32 y /* = -1 */)
Sim::findObject("PopUpMenuControl", backgroundCtrl);
GuiControlProfile* profile;
Sim::findObject("GuiMenubarProfile", profile);
Sim::findObject("ToolsGuiMenuBarProfile", profile);
if (!profile)
return;

View file

@ -541,4 +541,4 @@ MaterialParameters* ProcessedCustomMaterial::allocMaterialParameters()
}
}
return ret;
}
}

View file

@ -1360,7 +1360,7 @@ void ProcessedShaderMaterial::setSceneInfo(SceneRenderState * state, const Scene
LIGHTMGR->setLightInfo(this, mMaterial, sgData, state, pass, shaderConsts);
PROBEMGR->setProbeInfo(this, mMaterial, sgData, state, pass, shaderConsts);
//PROBEMGR->setProbeInfo(this, mMaterial, sgData, state, pass, shaderConsts);
}
void ProcessedShaderMaterial::setBuffers( GFXVertexBufferHandleBase *vertBuffer, GFXPrimitiveBufferHandle *primBuffer )

View file

@ -183,6 +183,16 @@ void PostEffect::EffectConst::set(const F32 &newVal)
mValueType = FloatType;
}
void PostEffect::EffectConst::set(const int& newVal)
{
if (mIntVal == newVal)
return;
mIntVal = newVal;
mDirty = true;
mValueType = IntType;
}
void PostEffect::EffectConst::set(const Point4F &newVal)
{
if (mPointVal == newVal)
@ -326,6 +336,21 @@ void PostEffect::EffectConst::setToBuffer( GFXShaderConstBufferRef buff )
const char* err = avar("PostEffect::EffectConst::setToBuffer $s type is not implemented", mName.c_str());
Con::errorf(err);
GFXAssertFatal(0, err);
#endif
}
}
else if (mValueType == IntType)
{
if (type == GFXSCT_Int)
{
buff->set(mHandle, mIntVal);
}
else
{
#if TORQUE_DEBUG
const char* err = avar("PostEffect::EffectConst::setToBuffer $s type is not implemented", mName.c_str());
Con::errorf(err);
GFXAssertFatal(0, err);
#endif
}
}
@ -1676,6 +1701,20 @@ void PostEffect::setShaderConst(const String &name, const F32 &val)
iter->value->set(val);
}
void PostEffect::setShaderConst(const String& name, const int& val)
{
PROFILE_SCOPE(PostEffect_SetShaderConst_Int);
EffectConstTable::Iterator iter = mEffectConsts.find(name);
if (iter == mEffectConsts.end())
{
EffectConst* newConst = new EffectConst(name, val);
iter = mEffectConsts.insertUnique(name, newConst);
}
iter->value->set(val);
}
void PostEffect::setShaderConst(const String &name, const Point4F &val)
{
PROFILE_SCOPE(PostEffect_SetShaderConst_Point);

View file

@ -230,6 +230,14 @@ protected:
set(val);
}
EffectConst(const String& name, const int& val)
: mName(name),
mHandle(NULL),
mDirty(true)
{
set(val);
}
EffectConst(const String &name, const Point4F &val)
: mName(name),
mHandle(NULL),
@ -264,6 +272,7 @@ protected:
void set( const String &newVal );
void set(const F32 &newVal);
void set(const int& newVal);
void set(const Point4F &newVal);
void set(const MatrixF &newVal);
void set(const Vector<Point4F> &newVal);
@ -277,6 +286,7 @@ protected:
String mStringVal;
S32 mIntVal;
F32 mFloatVal;
Point4F mPointVal;
MatrixF mMatrixVal;
@ -287,6 +297,7 @@ protected:
enum
{
StringType,
IntType,
FloatType,
PointType,
MatrixType,
@ -427,6 +438,7 @@ public:
///
void setShaderConst( const String &name, const String &val );
void setShaderConst(const String &name, const F32 &val);
void setShaderConst(const String& name, const int& val);
void setShaderConst(const String &name, const Point4F &val);
void setShaderConst(const String &name, const MatrixF &val);
void setShaderConst(const String &name, const Vector<Point4F> &val);

View file

@ -87,7 +87,8 @@ ProbeRenderInst::ProbeRenderInst() :
mAtten(0.0),
mCubemapIndex(0),
mIsSkylight(false),
mProbeIdx(0)
mProbeIdx(0),
mProbeShapeType(Box)
{
}
@ -132,7 +133,8 @@ ProbeShaderConstants::ProbeShaderConstants()
mBRDFTextureMap(NULL),
mSkylightSpecularMap(NULL),
mSkylightIrradMap(NULL),
mHasSkylight(NULL)
mHasSkylight(NULL),
mWorldToObjArraySC(NULL)
{
}
@ -202,7 +204,10 @@ RenderProbeMgr::RenderProbeMgr()
mLastShader(nullptr),
mLastConstants(nullptr),
mProbesDirty(false),
mHasSkylight(false)
mHasSkylight(false),
mSkylightCubemapIdx(-1),
mCubeMapCount(0),
mDefaultSkyLight(nullptr)
{
mEffectiveProbeCount = 0;
mMipCount = 0;
@ -314,51 +319,47 @@ void RenderProbeMgr::addElement(RenderInst *inst)
}*/
}
ProbeRenderInst* RenderProbeMgr::registerProbe(const bool &isSkylight)
ProbeRenderInst* RenderProbeMgr::registerProbe()
{
ProbeRenderInst newProbe;
newProbe.mIsSkylight = isSkylight;
mRegisteredProbes.push_back(newProbe);
newProbe.mProbeIdx = mRegisteredProbes.size();
if (!newProbe.mIsSkylight)
const U32 cubeIndex = _findNextEmptyCubeSlot();
if (cubeIndex == INVALID_CUBE_SLOT)
{
const U32 cubeIndex = _findNextEmptyCubeSlot();
if (cubeIndex == INVALID_CUBE_SLOT)
{
Con::warnf("RenderProbeMgr::addProbe: Invalid cubemap slot.");
return nullptr;
}
//check if we need to resize the cubemap array
if (cubeIndex >= mCubeSlotCount)
{
//alloc temp array handles
GFXCubemapArrayHandle irr = GFXCubemapArrayHandle(GFX->createCubemapArray());
GFXCubemapArrayHandle prefilter = GFXCubemapArrayHandle(GFX->createCubemapArray());
irr->init(mCubeSlotCount + PROBE_ARRAY_SLOT_BUFFER_SIZE, PROBE_IRRAD_SIZE, PROBE_FORMAT);
prefilter->init(mCubeSlotCount + PROBE_ARRAY_SLOT_BUFFER_SIZE, PROBE_PREFILTER_SIZE, PROBE_FORMAT);
mIrradianceArray->copyTo(irr);
mPrefilterArray->copyTo(prefilter);
//assign the temp handles to the new ones, this will destroy the old ones as well
mIrradianceArray = irr;
mPrefilterArray = prefilter;
mCubeSlotCount += PROBE_ARRAY_SLOT_BUFFER_SIZE;
}
newProbe.mCubemapIndex = cubeIndex;
//mark cubemap slot as taken
mCubeMapSlots[cubeIndex] = true;
mCubeMapCount++;
Con::warnf("RenderProbeMgr::registerProbe: Registered probe %u to cubeIndex %u", newProbe.mProbeIdx, cubeIndex);
Con::warnf("RenderProbeMgr::addProbe: Invalid cubemap slot.");
return nullptr;
}
//check if we need to resize the cubemap array
if (cubeIndex >= mCubeSlotCount)
{
//alloc temp array handles
GFXCubemapArrayHandle irr = GFXCubemapArrayHandle(GFX->createCubemapArray());
GFXCubemapArrayHandle prefilter = GFXCubemapArrayHandle(GFX->createCubemapArray());
irr->init(mCubeSlotCount + PROBE_ARRAY_SLOT_BUFFER_SIZE, PROBE_IRRAD_SIZE, PROBE_FORMAT);
prefilter->init(mCubeSlotCount + PROBE_ARRAY_SLOT_BUFFER_SIZE, PROBE_PREFILTER_SIZE, PROBE_FORMAT);
mIrradianceArray->copyTo(irr);
mPrefilterArray->copyTo(prefilter);
//assign the temp handles to the new ones, this will destroy the old ones as well
mIrradianceArray = irr;
mPrefilterArray = prefilter;
mCubeSlotCount += PROBE_ARRAY_SLOT_BUFFER_SIZE;
}
newProbe.mCubemapIndex = cubeIndex;
//mark cubemap slot as taken
mCubeMapSlots[cubeIndex] = true;
mCubeMapCount++;
Con::warnf("RenderProbeMgr::registerProbe: Registered probe %u to cubeIndex %u", newProbe.mProbeIdx, cubeIndex);
mProbesDirty = true;
return &mRegisteredProbes.last();
@ -380,7 +381,7 @@ void RenderProbeMgr::unregisterProbe(U32 probeIdx)
mRegisteredProbes.erase(probeIdx);
//rebuild our probe data
_setupStaticParameters();
mProbesDirty = true;
}
//
@ -413,9 +414,10 @@ void RenderProbeMgr::_setupStaticParameters()
U32 probeCount = mRegisteredProbes.size();
mEffectiveProbeCount = 0;
mMipCount = 0;
mMipCount = 1;
mHasSkylight = false;
mSkylightCubemapIdx = -1;
if (probePositionsData.size() != MAXPROBECOUNT)
{
@ -432,21 +434,7 @@ void RenderProbeMgr::_setupStaticParameters()
probeWorldToObjData.fill(MatrixF::Identity);
probeBBMinData.fill(Point4F::Zero);
probeBBMaxData.fill(Point4F::Zero);
probeConfigData.fill(Point4F::Zero);
cubeMaps.clear();
irradMaps.clear();
Vector<U32> cubemapIdxes;
if (probeCount != 0 && mRegisteredProbes[0].mPrefilterCubemap != nullptr)
{
//Get our mipCount
mMipCount = mRegisteredProbes[0].mPrefilterCubemap.getPointer()->getMipMapLevels();
}
else
{
mMipCount = 1;
}
probeConfigData.fill(Point4F(-1,0,0,0));
for (U32 i = 0; i < probeCount; i++)
{
@ -457,12 +445,12 @@ void RenderProbeMgr::_setupStaticParameters()
if (!curEntry.mIsEnabled)
continue;
if (curEntry.mProbeShapeType == ProbeRenderInst::ProbeShapeType::Skylight || curEntry.mIsSkylight)
U32 mips = mRegisteredProbes[i].mPrefilterCubemap.getPointer()->getMipMapLevels();
mMipCount = mips != 0 && mips >= mMipCount ? mips : 0;
if (curEntry.mIsSkylight)
{
skylightPos = curEntry.getPosition();
skylightPrefilterMap = curEntry.mPrefilterCubemap;
skylightIrradMap = curEntry.mIrradianceCubemap;
mHasSkylight = true;
mSkylightCubemapIdx = curEntry.mCubemapIndex;
continue;
}
@ -483,32 +471,32 @@ void RenderProbeMgr::_setupStaticParameters()
curEntry.mAtten,
curEntry.mCubemapIndex);
cubeMaps.push_back(curEntry.mPrefilterCubemap);
irradMaps.push_back(curEntry.mIrradianceCubemap);
cubemapIdxes.push_back(i);
mEffectiveProbeCount++;
}
mProbesDirty = false;
}
void RenderProbeMgr::updateProbeTexture(U32 probeIdx)
void RenderProbeMgr::updateProbeTexture(ProbeRenderInst* probeInfo)
{
if (probeIdx >= mRegisteredProbes.size())
if (probeInfo->mIrradianceCubemap.isNull() || !probeInfo->mIrradianceCubemap->isInitialized())
{
Con::errorf("RenderProbeMgr::updateProbeTexture() - tried to update a probe's texture with an invalid or uninitialized irradiance map!");
return;
}
//We don't stuff skylights into the array, so we can just skip out on this if it's a skylight
if (mRegisteredProbes[probeIdx].mIsSkylight)
if (probeInfo->mPrefilterCubemap.isNull() || !probeInfo->mPrefilterCubemap->isInitialized())
{
Con::errorf("RenderProbeMgr::updateProbeTexture() - tried to update a probe's texture with an invalid or uninitialized specular map!");
return;
}
const U32 cubeIndex = mRegisteredProbes[probeIdx].mCubemapIndex;
mIrradianceArray->updateTexture(mRegisteredProbes[probeIdx].mIrradianceCubemap, cubeIndex);
mPrefilterArray->updateTexture(mRegisteredProbes[probeIdx].mPrefilterCubemap, cubeIndex);
const U32 cubeIndex = probeInfo->mCubemapIndex;
mIrradianceArray->updateTexture(probeInfo->mIrradianceCubemap, cubeIndex);
mPrefilterArray->updateTexture(probeInfo->mPrefilterCubemap, cubeIndex);
Con::warnf("UpdatedProbeTexture - probeIdx: %u on cubeIndex %u, Irrad validity: %d, Prefilter validity: %d", probeIdx, cubeIndex,
mRegisteredProbes[probeIdx].mIrradianceCubemap->isInitialized(), mRegisteredProbes[probeIdx].mPrefilterCubemap->isInitialized());
Con::warnf("UpdatedProbeTexture - probeIdx: %u on cubeIndex %u, Irrad validity: %d, Prefilter validity: %d", probeInfo->mProbeIdx, cubeIndex,
probeInfo->mIrradianceCubemap->isInitialized(), probeInfo->mPrefilterCubemap->isInitialized());
}
void RenderProbeMgr::_setupPerFrameParameters(const SceneRenderState *state)
@ -688,7 +676,7 @@ void RenderProbeMgr::_update4ProbeConsts(const SceneData &sgData,
if (curEntry.mIsSkylight)
{
if (curEntry.mPrefilterCubemap.isValid() && curEntry.mPrefilterCubemap.isValid())
if (curEntry.mPrefilterCubemap->isInitialized() && curEntry.mIrradianceCubemap->isInitialized())
{
GFX->setCubeTexture(probeShaderConsts->mSkylightSpecularMap->getSamplerRegister(), curEntry.mPrefilterCubemap);
GFX->setCubeTexture(probeShaderConsts->mSkylightIrradMap->getSamplerRegister(), curEntry.mIrradianceCubemap);
@ -758,7 +746,7 @@ void RenderProbeMgr::render( SceneRenderState *state )
_setupStaticParameters();
// Early out if nothing to draw.
if (!RenderProbeMgr::smRenderReflectionProbes || !state->isDiffusePass() || (!mRegisteredProbes.size() || mEffectiveProbeCount == 0 || mCubeMapCount != 0 ) && !mHasSkylight)
if (!RenderProbeMgr::smRenderReflectionProbes || !state->isDiffusePass() || (mEffectiveProbeCount == 0 && mSkylightCubemapIdx == -1))
{
getProbeArrayEffect()->setSkip(true);
return;
@ -772,7 +760,7 @@ void RenderProbeMgr::render( SceneRenderState *state )
// the vector light material as we use lazy creation.
//_setupPerFrameParameters(state);
//Visualization
//Visualization
String useDebugAtten = Con::getVariable("$Probes::showAttenuation", "0");
mProbeArrayEffect->setShaderMacro("DEBUGVIZ_ATTENUATION", useDebugAtten);
@ -784,36 +772,31 @@ void RenderProbeMgr::render( SceneRenderState *state )
String useDebugContrib = Con::getVariable("$Probes::showProbeContrib", "0");
mProbeArrayEffect->setShaderMacro("DEBUGVIZ_CONTRIB", useDebugContrib);
if(mHasSkylight && mEffectiveProbeCount == 0)
mProbeArrayEffect->setShaderMacro("SKYLIGHT_ONLY", "1");
//Array rendering
//U32 probeCount = mRegisteredProbes.size();
mProbeArrayEffect->setTexture(3, mBRDFTexture);
mProbeArrayEffect->setCubemapArrayTexture(4, mPrefilterArray);
mProbeArrayEffect->setCubemapArrayTexture(5, mIrradianceArray);
mProbeArrayEffect->setShaderConst("$hasSkylight", (float)mHasSkylight);
if (mHasSkylight)
{
mProbeArrayEffect->setCubemapTexture(6, skylightPrefilterMap);
mProbeArrayEffect->setCubemapTexture(7, skylightIrradMap);
}
mProbeArrayEffect->setShaderConst("$numProbes", (float)mEffectiveProbeCount);
mProbeArrayEffect->setShaderConst("$numProbes", (S32)mEffectiveProbeCount);
mProbeArrayEffect->setShaderConst("$skylightCubemapIdx", mSkylightCubemapIdx);
mProbeArrayEffect->setShaderConst("$cubeMips", (float)mMipCount);
//also set up some colors
Vector<Point4F> contribColors;
contribColors.setSize(MAXPROBECOUNT);
if (mEffectiveProbeCount != 0)
{
mProbeArrayEffect->setTexture(3, mBRDFTexture);
mProbeArrayEffect->setCubemapArrayTexture(4, mPrefilterArray);
mProbeArrayEffect->setCubemapArrayTexture(5, mIrradianceArray);
if (useDebugContrib == String("1"))
{
MRandomLCG RandomGen;
RandomGen.setSeed(mEffectiveProbeCount);
//also set up some colors
Vector<Point4F> contribColors;
contribColors.setSize(MAXPROBECOUNT);
for (U32 i = 0; i < mEffectiveProbeCount; i++)
{
//we're going to cheat here a little for consistent debugging behavior. The first 3 probes will always have R G and then B for their colors, every other will be random
@ -826,11 +809,11 @@ void RenderProbeMgr::render( SceneRenderState *state )
else
contribColors[i] = Point4F(RandomGen.randF(0, 1), RandomGen.randF(0, 1), RandomGen.randF(0, 1), 1);
}
mProbeArrayEffect->setShaderConst("$probeContribColors", contribColors);
}
}
mProbeArrayEffect->setShaderConst("$probeContribColors", contribColors);
mProbeArrayEffect->setShaderConst("$inProbePosArray", probePositionsData);
mProbeArrayEffect->setShaderConst("$inRefPosArray", probeRefPositionsData);
mProbeArrayEffect->setShaderConst("$worldToObjArray", probeWorldToObjData);

View file

@ -199,13 +199,9 @@ class RenderProbeMgr : public RenderBinManager
Vector<Point4F> probeBBMinData;
Vector<Point4F> probeBBMaxData;
Vector<Point4F> probeConfigData;
Vector<GFXCubemapHandle> cubeMaps;
Vector<GFXCubemapHandle> irradMaps;
bool mHasSkylight;
GFXCubemapHandle skylightIrradMap;
GFXCubemapHandle skylightPrefilterMap;
Point4F skylightPos;
bool mHasSkylight;
S32 mSkylightCubemapIdx;
AlignedArray<Point4F> mProbePositions;
AlignedArray<Point4F> mProbeBBMin;
@ -286,7 +282,7 @@ public:
/// Returns the active LM.
static inline RenderProbeMgr* getProbeManager();
ProbeRenderInst* registerProbe(const bool& isSkylight);
ProbeRenderInst* registerProbe();
void unregisterProbe(U32 probeIdx);
virtual void setProbeInfo(ProcessedMaterial *pmat,
@ -296,7 +292,7 @@ public:
U32 pass,
GFXShaderConstBuffer *shaderConsts);
void updateProbeTexture(U32 probeIdx);
void updateProbeTexture(ProbeRenderInst* probeInfo);
/// Debug rendering
static bool smRenderReflectionProbes;

View file

@ -709,4 +709,4 @@ DefineEngineMethod(Settings, clearGroups, void, (), , "settingObj.clearGroups();
DefineEngineMethod(Settings, getCurrentGroups, const char*, (), , "settingObj.getCurrentGroups();")
{
return object->getCurrentGroups();
}
}

View file

@ -27,6 +27,9 @@ function CoreModule::onCreate(%this)
ModuleDatabase.LoadExplicit( "Core_GameObjects" );
ModuleDatabase.LoadExplicit( "Core_ClientServer" );
new Settings(ProjectSettings) { file = "core/settings.xml"; };
ProjectSettings.read();
%prefPath = getPrefpath();
if ( isFile( %prefPath @ "/clientPrefs.cs" ) )
exec( %prefPath @ "/clientPrefs.cs" );

View file

@ -47,18 +47,12 @@ function onActivateAdvancedLM()
// Enable the offscreen target so that AL will work
// with MSAA back buffers and for HDR rendering.
AL_FormatToken.enable();
// Activate Deferred Shading
AL_DeferredShading.enable();
}
function onDeactivateAdvancedLM()
{
// Disable the offscreen render target.
AL_FormatToken.disable();
// Deactivate Deferred Shading
AL_DeferredShading.disable();
}
function setAdvancedLighting()

View file

@ -322,8 +322,6 @@ singleton ShaderData( PFX_ReflectionProbeArray )
samplerNames[3] = "$BRDFTexture";
samplerNames[4] = "$specularCubemapAR";
samplerNames[5] = "$irradianceCubemapAR";
samplerNames[6] = "$skylightSpecularMap";
samplerNames[7] = "$skylightIrradMap";
pixVersion = 2.0;
};
@ -345,7 +343,6 @@ singleton GFXStateBlockData( PFX_ReflectionProbeArrayStateBlock )
zEnable = false;
zWriteEnable = false;
samplersDefined = true;
samplerStates[0] = SamplerClampPoint;
samplerStates[1] = SamplerClampPoint;
@ -353,6 +350,4 @@ singleton GFXStateBlockData( PFX_ReflectionProbeArrayStateBlock )
samplerStates[3] = SamplerClampPoint;
samplerStates[4] = SamplerClampLinear;
samplerStates[5] = SamplerClampLinear;
samplerStates[6] = SamplerClampLinear;
samplerStates[7] = SamplerClampLinear;
};

View file

@ -19,7 +19,8 @@ uniform vec3 eyePosWorld;
//cubemap arrays require all the same size. so shared mips# value
uniform float cubeMips;
uniform float numProbes;
uniform int numProbes;
uniform samplerCubeArray specularCubemapAR;
uniform samplerCubeArray irradianceCubemapAR;
@ -34,9 +35,7 @@ uniform vec4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
uniform vec4 probeContribColors[MAX_PROBES];
#endif
uniform samplerCube skylightSpecularMap;
uniform samplerCube skylightIrradMap;
uniform float hasSkylight;
uniform float skylightCubemapIdx;
out vec4 OUT_col;
@ -56,6 +55,7 @@ void main()
float alpha = 1;
#if SKYLIGHT_ONLY == 0
int i = 0;
float blendFactor[MAX_PROBES];
float blendSum = 0;
@ -64,8 +64,9 @@ void main()
float probehits = 0;
//Set up our struct data
float contribution[MAX_PROBES];
if (alpha > 0)
{
//if (alpha > 0)
//{
//Process prooooobes
for (i = 0; i < numProbes; ++i)
{
@ -83,6 +84,8 @@ void main()
if (contribution[i]>0.0)
probehits++;
}
else
continue;
contribution[i] = max(contribution[i],0);
@ -106,20 +109,21 @@ void main()
}
// Normalize blendVal
#if DEBUGVIZ_ATTENUATION == 0 //this can likely be removed when we fix the above normalization behavior
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
#endif
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
float invBlendSumWeighted = 1.0f / blendFacSum;
for (i = 0; i < numProbes; ++i)
{
blendFactor[i] *= invBlendSumWeighted;
contribution[i] *= blendFactor[i];
alpha -= contribution[i];
}
}
else
alpha -= blendSum;
#if DEBUGVIZ_ATTENUATION == 1
float contribAlpha = 1;
@ -142,12 +146,14 @@ void main()
}
//Skylight coloration for anything not covered by probes above
finalContribColor += vec3(0.3, 0.3, 0.3) * contribAlpha;
if(skylightCubemapIdx != -1)
finalContribColor += vec3(0.3, 0.3, 0.3) * contribAlpha;
OUT_col = vec4(finalContribColor, 1);
return;
#endif
}
//}
#endif
vec3 irradiance = vec3(0, 0, 0);
vec3 specular = vec3(0, 0, 0);
@ -159,27 +165,27 @@ void main()
float lod = 0;
#endif
#if SKYLIGHT_ONLY == 0
alpha = 1;
for (i = 0; i < numProbes; ++i)
{
float contrib = contribution[i];
if (contrib != 0)
{
float cubemapIdx = probeConfigData[i].a;
int cubemapIdx = probeConfigData[i].a;
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], bbMinArray[i].xyz, bbMaxArray[i].xyz, inRefPosArray[i].xyz);
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib;
//irradiance += vec3(1,1,1) * contrib;
//specular += vec3(1,1,1) * contrib;
alpha -= contrib;
}
}
#endif
if (hasSkylight == 1 && alpha > 0.001)
if (skylightCubemapIdx != -1 && alpha > 0.001)
{
irradiance += textureLod(skylightIrradMap, surface.R, 0).xyz * alpha;
specular += textureLod(skylightSpecularMap, surface.R, lod).xyz * alpha;
irradiance += textureLod(irradianceCubemapAR, vec4(surface.R, skylightCubemapIdx), 0).xyz * alpha;
specular += textureLod(specularCubemapAR, vec4(surface.R, skylightCubemapIdx), lod).xyz * alpha;
}
#if DEBUGVIZ_SPECCUBEMAP == 1 && DEBUGVIZ_DIFFCUBEMAP == 0

View file

@ -16,7 +16,8 @@ uniform float3 eyePosWorld;
//cubemap arrays require all the same size. so shared mips# value
uniform float cubeMips;
uniform float numProbes;
uniform int numProbes;
TORQUE_UNIFORM_SAMPLERCUBEARRAY(specularCubemapAR, 4);
TORQUE_UNIFORM_SAMPLERCUBEARRAY(irradianceCubemapAR, 5);
@ -31,9 +32,7 @@ uniform float4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
uniform float4 probeContribColors[MAX_PROBES];
#endif
TORQUE_UNIFORM_SAMPLERCUBE(skylightSpecularMap, 6);
TORQUE_UNIFORM_SAMPLERCUBE(skylightIrradMap, 7);
uniform float hasSkylight;
uniform float skylightCubemapIdx;
float4 main(PFXVertToPix IN) : SV_TARGET
{
@ -47,11 +46,12 @@ float4 main(PFXVertToPix IN) : SV_TARGET
//early out if emissive
if (getFlag(surface.matFlag, 0))
{
discard;
return TORQUE_TEX2D(colorBuffer, IN.uv0.xy);
}
float alpha = 1;
#if SKYLIGHT_ONLY == 0
int i = 0;
float blendFactor[MAX_PROBES];
float blendSum = 0;
@ -60,8 +60,9 @@ float4 main(PFXVertToPix IN) : SV_TARGET
float probehits = 0;
//Set up our struct data
float contribution[MAX_PROBES];
if (alpha > 0)
{
//if (alpha > 0)
//{
//Process prooooobes
for (i = 0; i < numProbes; ++i)
{
@ -79,6 +80,8 @@ float4 main(PFXVertToPix IN) : SV_TARGET
if (contribution[i]>0.0)
probehits++;
}
else
continue;
contribution[i] = max(contribution[i],0);
@ -91,34 +94,32 @@ float4 main(PFXVertToPix IN) : SV_TARGET
// Weight1 = normalized inverted NDF, so we have 1 at center, 0 at boundary
// and respect constraint A.
if (probehits>1.0)
{
for (i = 0; i < numProbes; i++)
{
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
blendFactor[i] *= ((contribution[i]) / invBlendSum);
blendFactor[i] = saturate(blendFactor[i]);
blendFacSum += blendFactor[i];
}
if (probehits > 1.0)
{
for (i = 0; i < numProbes; i++)
{
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
blendFactor[i] *= ((contribution[i]) / invBlendSum);
blendFactor[i] = saturate(blendFactor[i]);
blendFacSum += blendFactor[i];
}
// Normalize blendVal
#if DEBUGVIZ_ATTENUATION == 0 //this can likely be removed when we fix the above normalization behavior
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
#endif
// Normalize blendVal
if (blendFacSum == 0.0f) // Possible with custom weight
{
blendFacSum = 1.0f;
}
float invBlendSumWeighted = 1.0f / blendFacSum;
for (i = 0; i < numProbes; ++i)
{
blendFactor[i] *= invBlendSumWeighted;
contribution[i] *= blendFactor[i];
alpha -= contribution[i];
}
float invBlendSumWeighted = 1.0f / blendFacSum;
for (i = 0; i < numProbes; ++i)
{
blendFactor[i] *= invBlendSumWeighted;
contribution[i] *= blendFactor[i];
alpha -= contribution[i];
}
}
else
alpha -= blendSum;
alpha -= blendSum;
#if DEBUGVIZ_ATTENUATION == 1
float contribAlpha = 1;
@ -140,11 +141,13 @@ float4 main(PFXVertToPix IN) : SV_TARGET
}
//Skylight coloration for anything not covered by probes above
finalContribColor += float3(0.3, 0.3, 0.3) * contribAlpha;
if(skylightCubemapIdx != -1)
finalContribColor += float3(0.3, 0.3, 0.3) * contribAlpha;
return float4(finalContribColor, 1);
#endif
}
//}
#endif
float3 irradiance = float3(0, 0, 0);
float3 specular = float3(0, 0, 0);
@ -156,6 +159,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
float lod = 0;
#endif
#if SKYLIGHT_ONLY == 0
alpha = 1;
for (i = 0; i < numProbes; ++i)
{
@ -170,11 +174,12 @@ float4 main(PFXVertToPix IN) : SV_TARGET
alpha -= contrib;
}
}
#endif
if (hasSkylight && alpha > 0.001)
if(skylightCubemapIdx != -1 && alpha >= 0.001)
{
irradiance += TORQUE_TEXCUBELOD(skylightIrradMap, float4(surface.R, 0)).xyz * alpha;
specular += TORQUE_TEXCUBELOD(skylightSpecularMap, float4(surface.R, lod)).xyz * alpha;
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, surface.R, skylightCubemapIdx, 0).xyz * alpha;
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, surface.R, skylightCubemapIdx, lod).xyz * alpha;
}
#if DEBUGVIZ_SPECCUBEMAP == 1 && DEBUGVIZ_DIFFCUBEMAP == 0
@ -198,6 +203,5 @@ float4 main(PFXVertToPix IN) : SV_TARGET
float3 diffuse = kD * irradiance * surface.baseColor.rgb;
float4 finalColor = float4(diffuse + specular * surface.ao, 1.0);
//finalColor.rgb += abs(surface.N);
return finalColor;
}

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<ProjectSettings>
<Group name="AssetManagement">
<Group name="Modules">
<Setting name="coreModulePath">core/</Setting>
</Group>
</Group>
<Group name="Gameplay">
<Group name="GameModes">
<Setting name="defaultModeName">a</Setting>
</Group>
</Group>
</ProjectSettings>

View file

@ -92,7 +92,7 @@ new Scene(PbrMatTestLevel) {
surface = "0.5 -0.5 0.5 0.5 4 0 -1.49012e-08 1 0 0 1 1 0 1 1";
};
new Skylight() {
Enabled = "0";
Enabled = "1";
ReflectionMode = "Baked Cubemap";
position = "0 0 3.83134";
rotation = "1 0 0 0";
@ -101,6 +101,19 @@ new Scene(PbrMatTestLevel) {
persistentId = "658580df-7bda-11e9-9951-fcefa3e1cde4";
reflectionPath = "data/pbr/levels/PbrMatTest/probes/";
};
new BoxEnvironmentProbe() {
Enabled = "1";
refOffset = "0 0 0";
refScale = "10 10 10";
ReflectionMode = "Baked Cubemap";
position = "-0.0289133 -0.122873 1.6924";
rotation = "1 0 0 0";
scale = "10 10 10";
canSave = "1";
canSaveDynamicFields = "1";
persistentId = "079c3eaf-874e-11e9-8bbc-bdd5fc1d7642";
attenuation = "1";
};
new TSStatic() {
shapeName = "data/pbr/shapes/material_ball.dae";
playAmbient = "1";
@ -256,18 +269,5 @@ new Scene(PbrMatTestLevel) {
canSave = "1";
canSaveDynamicFields = "1";
};
new BoxEnvironmentProbe() {
Enabled = "0";
refOffset = "0 0 0";
refScale = "10 10 10";
ReflectionMode = "Baked Cubemap";
position = "-0.0289133 -0.122873 1.6924";
rotation = "1 0 0 0";
scale = "10 10 10";
canSave = "1";
canSaveDynamicFields = "1";
persistentId = "079c3eaf-874e-11e9-8bbc-bdd5fc1d7642";
attenuation = "1";
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,53 @@
$PostFXManager::Settings::ColorCorrectionRamp = "core/postFX/images/null_color_ramp.png";
$PostFXManager::Settings::DOF::BlurCurveFar = "35.2804";
$PostFXManager::Settings::DOF::BlurCurveNear = "15.3488";
$PostFXManager::Settings::DOF::BlurMax = "0.897196";
$PostFXManager::Settings::DOF::BlurMin = "0.261682";
$PostFXManager::Settings::DOF::EnableAutoFocus = "1";
$PostFXManager::Settings::DOF::EnableDOF = "";
$PostFXManager::Settings::DOF::FocusRangeMax = "200.943";
$PostFXManager::Settings::DOF::FocusRangeMin = "60.7571";
$PostFXManager::Settings::EnableDOF = "1";
$PostFXManager::Settings::EnabledSSAO = "1";
$PostFXManager::Settings::EnableHDR = "1";
$PostFXManager::Settings::EnableLightRays = "0";
$PostFXManager::Settings::EnablePostFX = "1";
$PostFXManager::Settings::EnableSSAO = "1";
$PostFXManager::Settings::EnableVignette = "1";
$PostFXManager::Settings::HDR::adaptRate = "2.08";
$PostFXManager::Settings::HDR::blueShiftColor = "1.05 0.97 1.27";
$PostFXManager::Settings::HDR::brightPassThreshold = "0.842105";
$PostFXManager::Settings::HDR::enableBloom = 1;
$PostFXManager::Settings::HDR::enableBlueShift = 0;
$PostFXManager::Settings::HDR::enableToneMapping = "0";
$PostFXManager::Settings::HDR::gaussMean = "0.378947";
$PostFXManager::Settings::HDR::gaussMultiplier = "0.0529101";
$PostFXManager::Settings::HDR::gaussStdDev = "0.380952";
$PostFXManager::Settings::HDR::keyValue = "0.423469";
$PostFXManager::Settings::HDR::minLuminace = "0.0204082";
$PostFXManager::Settings::HDR::whiteCutoff = "0.30102";
$PostFXManager::Settings::LightRays::brightScalar = 0.75;
$PostFXManager::Settings::LightRays::decay = 1;
$PostFXManager::Settings::LightRays::density = 0.94;
$PostFXManager::Settings::LightRays::numSamples = 40;
$PostFXManager::Settings::LightRays::weight = 5.65;
$PostFXManager::Settings::SSAO::blurDepthTol = 0.001;
$PostFXManager::Settings::SSAO::blurNormalTol = 0.95;
$PostFXManager::Settings::SSAO::lDepthMax = 2;
$PostFXManager::Settings::SSAO::lDepthMin = 0.2;
$PostFXManager::Settings::SSAO::lDepthPow = 0.2;
$PostFXManager::Settings::SSAO::lNormalPow = 2;
$PostFXManager::Settings::SSAO::lNormalTol = -0.5;
$PostFXManager::Settings::SSAO::lRadius = 1;
$PostFXManager::Settings::SSAO::lStrength = 10;
$PostFXManager::Settings::SSAO::overallStrength = 2;
$PostFXManager::Settings::SSAO::quality = "2";
$PostFXManager::Settings::SSAO::sDepthMax = 1;
$PostFXManager::Settings::SSAO::sDepthMin = 0.1;
$PostFXManager::Settings::SSAO::sDepthPow = 1;
$PostFXManager::Settings::SSAO::sNormalPow = 1;
$PostFXManager::Settings::SSAO::sNormalTol = 0;
$PostFXManager::Settings::SSAO::sRadius = 0.1;
$PostFXManager::Settings::SSAO::sStrength = 6;
$PostFXManager::Settings::Vignette::VMax = 0.85391;
$PostFXManager::Settings::Vignette::VMin = 0.2;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

View file

@ -89,7 +89,9 @@
isContainer="false"
internalName="slider"
canSave="true"
canSaveDynamicFields="false" />
canSaveDynamicFields="false"
renderTicks="false"
useFillBar="true" />
<GuiTextCtrl
text="5"
maxLength="1024"

View file

@ -66,34 +66,38 @@ function OptionsMenu::onWake(%this)
%array = OptionsSettingStack;
%array.clear();
%controllerMenuBtn = new GuiButtonCtrl(){
%keyboardMenuBtn = new GuiButtonCtrl(){
text = "Keyboard and Mouse";
profile = GuiMenuButtonProfile;
extent = %array.extent.x SPC "35";
};
%displayMenuBtn = new GuiButtonCtrl(){
%controllerMenuBtn = new GuiButtonCtrl(){
text = "Controller";
profile = GuiMenuButtonProfile;
extent = %array.extent.x SPC "35";
command="DisplayMenu::loadSettings();";
};
%keyboardMenuBtn = new GuiButtonCtrl(){
%displayMenuBtn = new GuiButtonCtrl(){
text = "Display";
profile = GuiMenuButtonProfile;
extent = %array.extent.x SPC "35";
command="DisplayMenu::loadSettings();";
};
%graphicsMenuBtn = new GuiButtonCtrl(){
text = "Graphics";
profile = GuiMenuButtonProfile;
extent = %array.extent.x SPC "35";
command="GraphicsMenu::loadSettings();";
};
%audioMenuBtn = new GuiButtonCtrl(){
text = "Audio";
profile = GuiMenuButtonProfile;
extent = %array.extent.x SPC "35";
command="AudioMenu::loadSettings();";
};
%gameplayMenuBtn = new GuiButtonCtrl(){
@ -236,7 +240,7 @@ function OptionsMenu::addSettingOption(%this, %arrayTarget, %optionName, %defaul
return %option;
}
function OptionsMenu::addSliderOption(%this, %arrayTarget, %optionName, %variable, %range, %ticks, %value, %class)
function OptionsMenu::addSliderOption(%this, %arrayTarget, %optionName, %variable, %range, %ticks, %value, %class)
{
%option = TAMLRead("data/ui/scripts/guis/graphicsMenuSettingsSlider.taml");
@ -620,3 +624,63 @@ function AudioMenuSoundDevice::onSelect( %this, %id, %text )
SPC $pref::SFX::device
SPC $pref::SFX::useHardware );
}
//==============================================================================
// DISPLAY MENU
//==============================================================================
function DisplayMenu::loadSettings()
{
OptionsSettingStack.clear();
OptionsMenu.addSettingOption(OptionsSettingStack, "Resolution", "1024 x 768", "", $pref::Video::Resolution);
OptionsMenu.addSettingOption(OptionsSettingStack, "Full Screen", "Off", "", $pref::Video::FullScreen);
OptionsMenu.addSettingOption(OptionsSettingStack, "Refresh Rate", "60", "", $pref::Video::RefreshRate);
OptionsMenu.addSettingOption(OptionsSettingStack, "VSync", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSliderOption(OptionsSettingStack, "Field of View", $pref::Video::FOV, "65 120", 55, 75);
OptionsMenu.addSliderOption(OptionsSettingStack, "Brightness", $pref::Video::Brightness, "0 1", 10, 5);
OptionsMenu.addSliderOption(OptionsSettingStack, "Contrast", $pref::Video::Contrast, "0 1", 10, 5);
}
//==============================================================================
// GRAPHICS MENU
//==============================================================================
function GraphicsMenu::loadSettings()
{
OptionsSettingStack.clear();
OptionsMenu.addSettingOption(OptionsSettingStack, "Shadow Quality", "High", "", $pref::Video::Resolution);
OptionsMenu.addSettingOption(OptionsSettingStack, "Shadow Caching", "Off", "", $pref::Video::FullScreen);
OptionsMenu.addSettingOption(OptionsSettingStack, "Soft Shadows", "60", "", $pref::Video::RefreshRate);
OptionsMenu.addSettingOption(OptionsSettingStack, "Model Detail", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSliderOption(OptionsSettingStack, "Texture Detail", $pref::Video::FOV, "65 120", 55, 75);
OptionsMenu.addSettingOption(OptionsSettingStack, "Terrain Detail", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Decal Lifetime", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Ground Clutter Density", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Material Quality", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "HDR", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Parallax", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Ambient Occlusion", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Light Rays", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Depth of Field", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Vignetting", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Water Reflections", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Anti Aliasing", "Off", "", $pref::Video::Vsync);
OptionsMenu.addSettingOption(OptionsSettingStack, "Anisotropic Filtering", "Off", "", $pref::Video::Vsync);
}
//==============================================================================
// AUDIO MENU
//==============================================================================
function AudioMenu::loadSettings()
{
OptionsSettingStack.clear();
OptionsMenu.addSliderOption(OptionsSettingStack, "Master Volume", $pref::Video::Brightness, "0 1", 10, 5);
OptionsMenu.addSliderOption(OptionsSettingStack, "Menu Volume", $pref::Video::Brightness, "0 1", 10, 5);
OptionsMenu.addSliderOption(OptionsSettingStack, "Effects Volume", $pref::Video::Brightness, "0 1", 10, 5);
OptionsMenu.addSliderOption(OptionsSettingStack, "Music Volume", $pref::Video::Brightness, "0 1", 10, 5);
}

View file

@ -426,4 +426,11 @@ new GuiControlProfile(GuiMenuScrollProfile)
bitmap = "./images/scrollBar";
hasBitmapArray = true;
category = "Core";
};
singleton GuiControlProfile(SliderBitmapGUIProfile)
{
bitmap = "data/ui/art/optionsMenuSliderBitmapArray.png";
hasBitmapArray = true;
opaque = false;
};

View file

@ -0,0 +1,34 @@
<AssetImportConfigs>
<Config Name="TestConfig">
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="1" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
<Materials ImportMaterials="1" IgnoreMaterials="" CreateComposites="1" UseDiffuseSuffixOnOriginImg="1" UseExistingMaterials="1" />
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
<Images ImageType="GUI" DiffuseTypeSuffixes="_ALBEDO,_DIFFUSE,_ALB,_DIF,_Base_Color,_COLOR,_COL" NormalTypeSuffixes="_NORMAL,_NORM" SpecularTypeSuffixes="_SPECULAR,_SPEC" MetalnessTypeSuffixes="_METAL,_MET,_METALNESS,_METALLIC" RoughnessTypeSuffixes="_ROUGH,_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH,_SMOOTHNESS" AOTypeSuffixes="_AO,_AMBIENT,_AMBIENTOCCLUSION,_Ambient_Occlusion" CompositeTypeSuffixes="_COMP,_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="1" PopulateMaterialMaps="1" />
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
</Config>
<Config Name="SecondTest">
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="0" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
<Materials ImportMaterials="1" IgnoreMaterials="" CreateComposites="1" UseDiffuseSuffixOnOriginImg="" UseExistingMaterials="" />
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
<Images ImageType="N/A" DiffuseTypeSuffixes="_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL" NormalTypeSuffixes="_NORMAL,_NORM" SpecularTypeSuffixes="_SPECULAR,_SPEC" MetalnessTypeSuffixes="_METAL,_MET,_METALNESS,_METALLIC" RoughnessTypeSuffixes="_ROUGH,_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH,_SMOOTHNESS" AOTypeSuffixes="_AO,_AMBIENT,_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP,_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="" PopulateMaterialMaps="" />
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
</Config>
<Config Name="GUI_Image_Import">
<Mesh ImportMesh="0" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="0" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
<Materials ImportMaterials="0" IgnoreMaterials="" CreateComposites="1" UseDiffuseSuffixOnOriginImg="1" UseExistingMaterials="1" />
<Animations ImportAnimations="0" SeparateAnimations="1" SeparateAnimationPrefix="" />
<Collisions GenerateCollisions="0" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
<Images ImageType="GUI" DiffuseTypeSuffixes="_ALBEDO;_DIFFUSE;_ALB;_DIF;_COLOR;_COL;_BASECOLOR;_BASE_COLOR" NormalTypeSuffixes="_NORMAL;_NORM" SpecularTypeSuffixes="_SPECULAR;_SPEC" MetalnessTypeSuffixes="_METAL;_MET;_METALNESS;_METALLIC" RoughnessTypeSuffixes="_ROUGH;_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH;_SMOOTHNESS" AOTypeSuffixes="_AO;_AMBIENT;_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP;_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="0" PopulateMaterialMaps="0" />
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
</Config>
<Config Name="CogflictsMesh">
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="0" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
<Materials ImportMaterials="1" IgnoreMaterials="ColorEffect*;" CreateComposites="1" UseDiffuseSuffixOnOriginImg="1" UseExistingMaterials="1" />
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
<Images ImageType="N/A" DiffuseTypeSuffixes="_ALBEDO;_DIFFUSE;_ALB;_DIF;_COLOR;_COL;_BASECOLOR;_BASE_COLOR;_Al" NormalTypeSuffixes="_NORMAL;_NORM;_N" SpecularTypeSuffixes="_SPECULAR;_SPEC" MetalnessTypeSuffixes="_METAL;_MET;_METALNESS;_METALLIC" RoughnessTypeSuffixes="_ROUGH;_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH;_SMOOTHNESS" AOTypeSuffixes="_AO;_AMBIENT;_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP;_COMPOSITE;_C" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="1" PopulateMaterialMaps="1" />
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
</Config>
</AssetImportConfigs>

View file

@ -323,7 +323,7 @@
minExtent = "64 64";
horizSizing = "relative";
vertSizing = "height";
profile = "GuiDefaultProfile";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
@ -345,7 +345,7 @@
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
@ -414,7 +414,7 @@
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.showFilterPopup();";
@ -530,7 +530,7 @@
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
@ -657,7 +657,7 @@
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.toggleTagFilterPopup();";
@ -798,7 +798,7 @@
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";

View file

@ -85,7 +85,7 @@
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
profile = "ToolsGuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
@ -243,7 +243,7 @@
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
profile = "ToolsGuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
@ -574,7 +574,7 @@
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
profile = "ToolsGuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";

View file

@ -66,7 +66,7 @@
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiScrollProfile";
profile = "Tools";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";

View file

@ -66,7 +66,7 @@
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiScrollProfile";
profile = "ToolsGuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";

View file

@ -196,7 +196,7 @@
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiScrollProfile";
profile = "ToolsGuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";

View file

@ -22,6 +22,7 @@
if( !isObject( ToolsGuiDefaultNonModalProfile ) )
new GuiControlProfile (ToolsGuiDefaultNonModalProfile : ToolsGuiDefaultProfile)
{
opaque = false;
modal = false;
};

View file

@ -150,7 +150,7 @@ function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %ta
AssetBrowser.fieldTargetObject = %targetObj;
AssetBrowser.fieldTargetName = %fieldName;
Canvas.add(AssetBrowser);
Canvas.pushDialog(AssetBrowser);
AssetBrowser.setVisible(1);
AssetBrowserWindow.setVisible(1);
AssetBrowserWindow.selectWindow();

View file

@ -497,6 +497,9 @@ function ImportAssetWindow::onWake(%this)
return;
$AssetBrowser::importConfigsFile = "tools/assetBrowser/assetImportConfigs.xml";
$AssetBrowser::currentImportConfig = "";
new Settings(AssetImportSettings) { file = $AssetBrowser::importConfigsFile; };
AssetImportSettings.read();
%this.reloadImportOptionConfigs();
}
@ -510,17 +513,15 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
if(%xmlDoc.loadFile($AssetBrowser::importConfigsFile))
{
//StateMachine element
%xmlDoc.pushFirstChildElement("AssetImportConfigs");
%xmlDoc.pushFirstChildElement("AssetImportSettings");
//Configs
//Config Groups
%configCount = 0;
while(%xmlDoc.pushChildElement(%configCount))
{
%configObj = new ScriptObject(){};
%configObj.Name = %xmlDoc.attribute("Name");
%configName = %xmlDoc.attribute("name");
%xmlDoc.pushFirstChildElement("Mesh");
/*%xmlDoc.pushFirstChildElement("Mesh");
%configObj.ImportMesh = %xmlDoc.attribute("ImportMesh");
%configObj.DoUpAxisOverride = %xmlDoc.attribute("DoUpAxisOverride");
%configObj.UpAxisOverride = %xmlDoc.attribute("UpAxisOverride");
@ -583,12 +584,12 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
%configObj.VolumeAdjust = %xmlDoc.attribute("VolumeAdjust");
%configObj.PitchAdjust = %xmlDoc.attribute("PitchAdjust");
%configObj.Compressed = %xmlDoc.attribute("Compressed");
%xmlDoc.popElement();
%xmlDoc.popElement();*/
%xmlDoc.popElement();
%configCount++;
ImportAssetWindow.importConfigsList.add(%configObj);
ImportAssetWindow.importConfigsList.add(%configName);
}
%xmlDoc.popElement();
@ -596,8 +597,8 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
for(%i = 0; %i < ImportAssetWindow.importConfigsList.count(); %i++)
{
%configObj = ImportAssetWindow.importConfigsList.getKey(%i);
ImportAssetConfigList.add(%configObj.Name);
%configName = ImportAssetWindow.importConfigsList.getKey(%i);
ImportAssetConfigList.add(%configName);
}
%importConfigIdx = ImportAssetWindow.activeImportConfigIndex;
@ -607,7 +608,7 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
ImportAssetConfigList.setSelected(%importConfigIdx);
}
function ImportAssetWindow::setImportOptions(%this, %optionsObj)
function ImportAssetWindow::setImportOptions(%this, %configName)
{
//Todo, editor + load from files for preconfigs

View file

@ -114,7 +114,7 @@
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "menubarProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "195 0";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

After

Width:  |  Height:  |  Size: 6.1 KiB

Before After
Before After

View file

@ -28,7 +28,6 @@ singleton GuiControlProfile (NavPanelProfile)
category = "Editor";
};
singleton GuiControlProfile (NavPanel : NavPanelProfile)
{
bitmap = "./navPanel";
@ -64,53 +63,3 @@ singleton GuiControlProfile (NavPanelYellow : NavPanelProfile)
bitmap = "./navPanel_yellow";
category = "Editor";
};
singleton GuiControlProfile (menubarProfile : NavPanelProfile)
{
bitmap = "./menubar";
category = "Editor";
fillColor = "48 48 48";
fontColor = "215 215 215";
fontColorHL = "150 150 150";
borderColor = "34 34 34";
};
singleton GuiControlProfile (editorMenubarProfile : NavPanelProfile)
{
bitmap = "./editor-menubar";
category = "Editor";
};
singleton GuiControlProfile (editorMenu_wBorderProfile : NavPanelProfile)
{
bitmap = "./menu-fullborder";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutProfile : NavPanelProfile)
{
bitmap = "./inspector-style-rollout";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutListProfile : NavPanelProfile)
{
bitmap = "./inspector-style-rollout-list";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutDarkProfile : NavPanelProfile)
{
bitmap = "./inspector-style-rollout-dark";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutInnerProfile : NavPanelProfile)
{
bitmap = "./inspector-style-rollout_inner";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutNoHeaderProfile : NavPanelProfile)
{
bitmap = "./inspector-style-rollout-noheader";
category = "Editor";
};
singleton GuiControlProfile (IconDropdownProfile : NavPanelProfile)
{
bitmap = "./icon-dropdownbar";
category = "Editor";
};

View file

@ -22,19 +22,31 @@
function ESettingsWindow::startup( %this )
{
new ArrayObject(EditorSettingsPageList);
new ArrayObject(GameSettingsPageList);
%this.addEditorSettingsPage("Axis", "Axis Gizmo");
%this.addEditorSettingsPage("General", "General Settings");
%this.addEditorSettingsPage("Camera", "Camera Settings");
%this.addEditorSettingsPage("SceneEditor", "Scene Editor");
%this.addEditorSettingsPage("ShapeEditor", "Shape Editor");
%this.addEditorSettingsPage("NavEditor", "Navigation Editor");
%this.addEditorSettingsPage("Theme", "Theme");
%this.addGameSettingsPage("GameGeneral", "General");
%this.addGameSettingsPage("Gameplay", "Gameplay");
%this.addGameSettingsPage("Paths", "Paths");
%this.addGameSettingsPage("UI", "UI");
%this.addGameSettingsPage("LevelDefaults", "Level Defaults");
%this.addGameSettingsPage("GameOptions", "Game Options");
%this.addGameSettingsPage("AssetManagement", "Asset Management");
%this.mode = "Editor";
}
function ESettingsWindow::onWake( %this )
{
new ArrayObject(SettingsPageList);
%this.addSettingsPage("Axis", "Axis Gizmo");
%this.addSettingsPage("General", "General Settings");
%this.addSettingsPage("Camera", "Camera Settings");
%this.addSettingsPage("SceneEditor", "Scene Editor");
%this.addSettingsPage("ShapeEditor", "Shape Editor");
%this.addSettingsPage("NavEditor", "Navigation Editor");
ESettingsWindowList.setSelectedById( 1 );
}
function ESettingsWindow::hideDialog( %this )
@ -47,7 +59,6 @@ function ESettingsWindow::ToggleVisibility()
if ( ESettingsWindow.visible )
{
ESettingsWindow.setVisible(false);
EditorSettings.write();
}
else
{
@ -59,19 +70,50 @@ function ESettingsWindow::ToggleVisibility()
ESettingsWindowList.setSelectedById( 1 );
}
/*function ESettingsWindow::addTabPage( %this, %page )
function ESettingsWindow::toggleProjectSettings(%this)
{
ESettingsWindowTabBook.add( %page );
ESettingsWindowList.addRow( ESettingsWindowTabBook.getSelectedPage(), %page.text );
ESettingsWindowList.sort(0);
}*/
function ESettingsWindow::addSettingsPage(%this, %settingsPageName, %settingsPageText)
{
SettingsPageList.add(%settingsPageName, %settingsPageText);
%this.ToggleVisibility();
ESettingsWindowList.addRow( SettingsPageList.count(), %settingsPageText );
%count = GameSettingsPageList.count();
for(%i=0; %i < %count; %i++)
{
%settingsPageText = GameSettingsPageList.getValue(%i);
ESettingsWindowList.addRow( %i, %settingsPageText );
}
ESettingsWindowList.sort(0);
ESettingsWindowList.setSelectedById( 1 );
%this.mode = "Project";
ESettingsWindow.text = "Game Project Settings";
}
function ESettingsWindow::toggleEditorSettings(%this)
{
%this.ToggleVisibility();
%count = EditorSettingsPageList.count();
for(%i=0; %i < %count; %i++)
{
%settingsPageText = EditorSettingsPageList.getValue(%i);
ESettingsWindowList.addRow( %i, %settingsPageText );
}
ESettingsWindowList.sort(0);
ESettingsWindowList.setSelectedById( 1 );
%this.mode = "Editor";
ESettingsWindow.text = "Editor Settings";
}
function ESettingsWindow::addEditorSettingsPage(%this, %settingsPageName, %settingsPageText)
{
EditorSettingsPageList.add(%settingsPageName, %settingsPageText);
}
function ESettingsWindow::addGameSettingsPage(%this, %settingsPageName, %settingsPageText)
{
GameSettingsPageList.add(%settingsPageName, %settingsPageText);
}
//-----------------------------------------------------------------------------
@ -79,10 +121,49 @@ function ESettingsWindow::addSettingsPage(%this, %settingsPageName, %settingsPag
function ESettingsWindowList::onSelect( %this, %id, %text )
{
SettingsInspector.clearFields();
%pageName = SettingsPageList.getKey(SettingsPageList.getIndexFromValue(%text));
if(ESettingsWindow.mode $= "Editor")
%pageName = EditorSettingsPageList.getKey(EditorSettingsPageList.getIndexFromValue(%text));
else
%pageName = GameSettingsPageList.getKey(GameSettingsPageList.getIndexFromValue(%text));
eval("ESettingsWindow.get" @ %pageName @ "Settings();");
}
//Read/write field functions
function SettingsInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldData)
{
%moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
if(ESettingsWindow.mode $= "Editor")
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", EditorSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
else
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", ProjectSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
}
function SettingsInspector::changeEditorSetting(%this, %varName, %value)
{
%varName = strreplace(%varName, "-", "/");
echo("Set " @ %varName @ " to be " @ %value);
if(ESettingsWindow.mode $= "Editor")
EditorSettings.setValue(%varName, %value);
else
ProjectSettings.setValue(%varName, %value);
//%id = ESettingsWindowList.getSelectedRow();
//ESettingsWindowList.setSelectedRow(%id);
if(ESettingsWindow.mode $= "Editor")
%success = EditorSettings.write();
else
%success = ProjectSettings.write();
}
//
// COMMON EDITOR SETTINGS
//
function ESettingsWindow::getAxisSettings(%this)
{
SettingsInspector.startGroup("Gizmo");
@ -182,21 +263,89 @@ function ESettingsWindow::getShapeEditorSettings(%this)
SettingsInspector.endGroup();
}
//Read/write field functions
function SettingsInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldData)
function ESettingsWindow::getThemeSettings(%this)
{
%moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", EditorSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
}
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("Theme/headerColor", "Headerbar Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/windowBackgroundColor", "Window Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsColor", "Tabs Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsHLColor", "Tabs Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsSELColor", "Tabs Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerDarkColor", "Divider Dark Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerMidColor", "Divider Mid Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerLightColor", "Divider Light Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/headerTextColor", "Header Text Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextColor", "Field Text Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextHLColor", "Field Text Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextSELColor", "Field Text Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGColor", "Field Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGHLColor", "Field Background Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGSELColor", "Field Background Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipBGColor", "Tooltip Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipTextColor", "Tooltip Text Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipDivColor", "Tooltip Divider Color", "ColorI", "");
SettingsInspector.endGroup();
}
//
// COMMON GAME SETTINGS
//
function ESettingsWindow::getGameGeneralSettings(%this)
{
SettingsInspector.startGroup("General");
SettingsInspector.addSettingsField("General/ProjectName", "Project Name", "string", "");
SettingsInspector.endGroup();
}
function SettingsInspector::changeEditorSetting(%this, %varName, %value)
function ESettingsWindow::getPathsSettings(%this)
{
%varName = strreplace(%varName, "-", "/");
SettingsInspector.startGroup("Paths");
SettingsInspector.addSettingsField("Paths/splashImagePath", "Splash Image", "filename", "");
SettingsInspector.addSettingsField("Paths/iconImagePath", "Icon Image", "filename", "");
SettingsInspector.addSettingsField("Paths/missingTexturePath", "Missing Texture Image", "filename", "");
SettingsInspector.addSettingsField("Paths/noMaterialPath", "No Material Image", "filename", "");
SettingsInspector.addSettingsField("Paths/errorMaterialMath", "Error Material Image", "filename", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getUISettings(%this)
{
SettingsInspector.startGroup("UI");
SettingsInspector.addSettingsField("UI/playGUIName", "Play GUI Name", "string", "");
SettingsInspector.addSettingsField("UI/mainMenuName", "Main Menu GUI Name", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getAssetManagementSettings(%this)
{
SettingsInspector.startGroup("Modules");
SettingsInspector.addSettingsField("AssetManagement/Modules/coreModulePath", "Core Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/gameDataModulePath", "Game Data Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/moduleExtension", "Module Extension", "string", "");
SettingsInspector.endGroup();
echo("Set " @ %varName @ " to be " @ %value);
EditorSettings.setValue(%varName, %value);
%id = ESettingsWindowList.getSelectedRow();
ESettingsWindowList.setSelectedRow(%id);
}
SettingsInspector.startGroup("Assets");
SettingsInspector.addSettingsField("AssetManagement/Assets/assetExtension", "Asset Extension", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Assets/datablockCaching", "Cache Datablocks", "bool", "");
//SettingsInspector.addSettingsField("AssetManagement/Assets/moduleExtension", "Module Extension", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getGameplaySettings(%this)
{
SettingsInspector.startGroup("Game Modes");
SettingsInspector.addSettingsField("Gameplay/GameModes/defaultModeName", "Default Gamemode Name", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getGameOptionsSettings(%this)
{
SettingsInspector.startGroup("Game Modes");
SettingsInspector.addSettingsField("Gameplay/GameModes/defaultModeName", "Default Gamemode Name", "string", "");
SettingsInspector.endGroup();
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 861 B

After

Width:  |  Height:  |  Size: 5.2 KiB

Before After
Before After

View file

@ -99,7 +99,7 @@
};
new GuiScrollCtrl(MBOKCancelDetailsScroll) {
canSaveDynamicFields = "0";
Profile = "GuiScrollProfile";
Profile = "ToolsGuiScrollProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "8 115";

View file

@ -38,26 +38,26 @@ new GuiControlProfile (ToolsGuiDefaultProfile)
// fill color
opaque = true;
fillColor = "50 50 50";
fillColorHL = "91 101 116";
fillColorSEL = "91 101 116";
fillColorNA = "255 0 255 ";
fillColor = EditorSettings.value("Theme/tabsColor");
fillColorHL = EditorSettings.value("Theme/tabsGLColor");
fillColorSEL = EditorSettings.value("Theme/tabsSELColor");
fillColorNA = EditorSettings.value("Theme/tabsSELColor");
// border color
border = 0;
borderColor = "34 34 34";
borderColorHL = "91 101 116";
borderColorNA = "32 32 32";
borderColor = EditorSettings.value("Theme/dividerDarkColor");
borderColorHL = EditorSettings.value("Theme/dividerMidColor");
borderColorNA = EditorSettings.value("Theme/dividerLightColor");
// font
fontType = "Noto Sans";
fontSize = 14;
fontCharset = ANSI;
fontColor = "215 215 215";
fontColorHL = "215 215 215";
fontColorNA = "215 215 215";
fontColorSEL= "255 255 255";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fontColorSEL= EditorSettings.value("Theme/fieldTextSELColor");
// bitmap information
bitmap = "";
@ -118,15 +118,15 @@ if( !isObject( ToolsGuiToolTipProfile ) )
new GuiControlProfile (ToolsGuiToolTipProfile)
{
// fill color
fillColor = "255 255 255";
fillColor = EditorSettings.value("Theme/tooltipBGColor");
// border color
borderColor = "0 0 0";
borderColor = EditorSettings.value("Theme/tooltipDivColor");
// font
fontType = "Noto Sans";
fontSize = 14;
fontColor = "24 24 24";
fontColor = EditorSettings.value("Theme/tooltipTextColor");
category = "Tools";
};
@ -141,7 +141,7 @@ new GuiControlProfile( ToolsGuiModelessDialogProfile )
if( !isObject( ToolsGuiFrameSetProfile ) )
new GuiControlProfile (ToolsGuiFrameSetProfile)
{
fillColor = "48 48 48";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
borderColor = "246 245 244";
border = 1;
opaque = true;
@ -154,11 +154,11 @@ new GuiControlProfile (ToolsGuiWindowProfile)
{
opaque = false;
border = 1;
fillColor = EditorSettings.value("WorldEditor/Theme/windowTitleBGColor");
fillColorHL = EditorSettings.value("WorldEditor/Theme/windowTitleBGHLColor");
fillColorNA = EditorSettings.value("WorldEditor/Theme/windowTitleBGNAColor");
fontColor = EditorSettings.value("WorldEditor/Theme/windowTitleFontColor");
fontColorHL = EditorSettings.value("WorldEditor/Theme/windowTitleFontHLColor");
fillColor = EditorSettings.value("Theme/tabsColor");
fillColorHL = EditorSettings.value("Theme/tabsColor");
fillColorNA = EditorSettings.value("Theme/tabsColor");
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorHL = EditorSettings.value("Theme/headerTextColor");
bevelColorHL = "255 255 255";
bevelColorLL = "0 0 0";
text = "untitled";
@ -186,15 +186,16 @@ new GuiControlProfile (ToolsGuiWindowCollapseProfile : ToolsGuiWindowProfile)
if( !isObject( ToolsGuiTextProfile ) )
new GuiControlProfile (ToolsGuiTextProfile)
{
opaque = true;
justify = "left";
fontColor = "185 185 185";
fontColor = EditorSettings.value("Theme/headerTextColor");
category = "Tools";
};
if( !isObject( ToolsGuiTextBoldCenterProfile ) )
new GuiControlProfile (ToolsGuiTextBoldCenterProfile : ToolsGuiTextProfile)
{
fontColor = "165 165 165";
fontColor = EditorSettings.value("Theme/headerTextColor");
fontType = "Noto Sans Bold";
fontSize = 16;
justify = "center";
@ -218,7 +219,7 @@ new GuiControlProfile (ToolsGuiTextCenterProfile : ToolsGuiTextProfile)
if( !isObject( ToolsGuiInspectorTitleTextProfile ) )
new GuiControlProfile (ToolsGuiInspectorTitleTextProfile)
{
fontColor = "100 100 100";
fontColor = EditorSettings.value("Theme/headerTextColor");
category = "Tools";
};
@ -245,12 +246,12 @@ new GuiControlProfile( ToolsGuiMLTextProfile )
if( !isObject( ToolsGuiTextArrayProfile ) )
new GuiControlProfile( ToolsGuiTextArrayProfile : ToolsGuiTextProfile )
{
fontColor = "165 165 165";
fontColorHL = "215 215 215";
fontColorSEL = "215 215 215";
fillColor = "200 200 200";
fillColorHL = "228 228 235";
fillColorSEL = "200 200 200";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");
border = false;
category = "Tools";
};
@ -272,11 +273,11 @@ new GuiControlProfile( ToolsGuiTextEditProfile )
border = -2; // fix to display textEdit img
//borderWidth = "1"; // fix to display textEdit img
//borderColor = "100 100 100";
fillColor = "42 42 42 0";
fillColorHL = "91 101 116";
fontColor = "215 215 215";
fontColorHL = "115 115 115";
fontColorSEL = "98 100 137";
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");
fontColorNA = "200 200 200";
textOffset = "4 2";
autoSizeWidth = false;
@ -325,9 +326,9 @@ new GuiControlProfile( ToolsGuiButtonProfile )
{
opaque = true;
border = true;
fontColor = "165 165 165";
fontColorHL = "215 215 215";
fontColorNA = "200 200 200";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fixedExtent = false;
justify = "center";
canKeyFocus = false;
@ -348,9 +349,9 @@ new GuiControlProfile( ToolsGuiIconButtonProfile )
{
opaque = true;
border = true;
fontColor = "165 165 165";
fontColorHL = "215 215 215";
fontColorNA = "200 200 200";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fixedExtent = false;
justify = "center";
canKeyFocus = false;
@ -371,10 +372,10 @@ new GuiControlProfile(ToolsGuiEditorTabPage)
{
opaque = true;
border = false;
fillColor = "48 48 48";
fontColor = "215 215 215";
fontColorHL = "150 150 150";
borderColor = "34 34 34";
fillColor = EditorSettings.value("Theme/tabsColor");
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
borderColor = EditorSettings.value("Theme/dividerDarkColor");
fixedExtent = false;
justify = "left";
canKeyFocus = false;
@ -387,13 +388,13 @@ if( !isObject( ToolsGuiCheckBoxProfile ) )
new GuiControlProfile( ToolsGuiCheckBoxProfile )
{
opaque = false;
fillColor = "232 232 232";
fillColor = EditorSettings.value("Theme/fieldBGColor");
border = false;
borderColor = "100 100 100";
borderColor = EditorSettings.value("Theme/dividerDarkColor");
fontSize = 14;
fontColor = "185 185 185";
fontColorHL = "80 80 80";
fontColorNA = "200 200 200";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fixedExtent = true;
justify = "left";
bitmap = "./images/checkbox";
@ -417,7 +418,7 @@ new GuiControlProfile( ToolsGuiCheckBoxListFlipedProfile : ToolsGuiCheckBoxProfi
if( !isObject( ToolsGuiInspectorCheckBoxTitleProfile ) )
new GuiControlProfile( ToolsGuiInspectorCheckBoxTitleProfile : ToolsGuiCheckBoxProfile ){
fontColor = "100 100 100";
fontColor = EditorSettings.value("Theme/fieldTextColor");
category = "Tools";
};
@ -425,9 +426,9 @@ if( !isObject( ToolsGuiRadioProfile ) )
new GuiControlProfile( ToolsGuiRadioProfile )
{
fontSize = 14;
fillColor = "232 232 232";
fontColor = "185 185 185";
fontColorHL = "80 80 80";
fillColor = EditorSettings.value("Theme/fieldBGColor");
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fixedExtent = true;
bitmap = "./images/radioButton";
hasBitmapArray = true;
@ -438,10 +439,10 @@ if( !isObject( ToolsGuiScrollProfile ) )
new GuiControlProfile( ToolsGuiScrollProfile )
{
opaque = true;
fillColor = "48 48 48";
fontColor = "215 215 215";
fontColorHL = "150 150 150";
borderColor = "34 34 34";
fillColor = EditorSettings.value("Theme/tabsColor");
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
borderColor = EditorSettings.value("Theme/dividerDarkColor");
border = true;
bitmap = "./images/scrollBar";
hasBitmapArray = true;
@ -452,10 +453,9 @@ if( !isObject( ToolsGuiOverlayProfile ) )
new GuiControlProfile( ToolsGuiOverlayProfile )
{
opaque = true;
fillColor = "48 48 48";
fontColor = "215 215 215";
fontColorHL = "255 255 255";
fillColor = "0 0 0 100";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextGLColor");
category = "Tools";
};
@ -478,9 +478,9 @@ new GuiControlProfile( ToolsGuiPopupMenuItemBorder : ToolsGuiButtonProfile )
{
opaque = true;
border = true;
fontColor = "215 215 215";
fontColorHL = "215 215 215";
fontColorNA = "255 255 255";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextGLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fixedExtent = false;
justify = "center";
canKeyFocus = false;
@ -500,13 +500,14 @@ new GuiControlProfile( ToolsGuiPopUpMenuDefault : ToolsGuiDefaultProfile )
bitmap = "./images/scrollbar";
hasBitmapArray = true;
profileForChildren = ToolsGuiPopupMenuItemBorder;
fillColor = "48 48 48";//"255 255 255";//100
fillColorHL = "228 228 235 ";//"91 101 116";
fillColorSEL = "98 100 137 ";//"91 101 116";
fillColor = EditorSettings.value("Theme/fieldBGColor");//"255 255 255";//100
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");//"91 101 116";
fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");//"91 101 116";
// font color is black
fontColorHL = "215 215 215 ";//"215 215 215";
fontColorSEL = "255 255 255";//"215 215 215";
borderColor = "100 100 100";
fontColor = EditorSettings.value("Theme/fieldTextColor");//"215 215 215";
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");//"215 215 215";
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");//"215 215 215";
borderColor = EditorSettings.value("Theme/dividerDarkColor");
category = "Tools";
};
@ -548,11 +549,11 @@ new GuiControlProfile( ToolsGuiPopUpMenuEditProfile : ToolsGuiPopUpMenuDefault )
if( !isObject( ToolsGuiListBoxProfile ) )
new GuiControlProfile( ToolsGuiListBoxProfile )
{
fillColorHL = "100 100 100";
fillColorNA = "150 150 150";
fontColor = "215 215 215";
fontColorHL = "215 215 215";
fontColorNA = "50 50 50";
fillColorHL = EditorSettings.value("Theme/windowBackgroundColor");
fillColorNA = EditorSettings.value("Theme/windowBackgroundColor");
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
tab = true;
canKeyFocus = true;
@ -562,11 +563,11 @@ new GuiControlProfile( ToolsGuiListBoxProfile )
if( !isObject( ToolsGuiTabBookProfile ) )
new GuiControlProfile( ToolsGuiTabBookProfile )
{
fillColorHL = "100 100 100";
fillColorNA = "150 150 150";
fontColor = "215 215 215";
fontColorHL = "215 215 215";
fontColorNA = "50 50 50";
fillColorHL = EditorSettings.value("Theme/windowBackgroundColor");
fillColorNA = EditorSettings.value("Theme/windowBackgroundColor");
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fontType = "Noto Sans";
fontSize = 14;
justify = "center";
@ -606,7 +607,7 @@ new GuiControlProfile( ToolsGuiTreeViewProfile )
bitmap = "./images/treeView";
autoSizeHeight = true;
canKeyFocus = true;
fillColor = "48 48 48";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
fillColorHL = "116 116 116";
fillColorSEL = "91 101 116";
fillColorNA = "40 40 40";
@ -632,7 +633,7 @@ new GuiControlProfile( ToolsGuiTextPadProfile )
// Deviate from the Default
opaque=true;
fillColor = "48 48 48";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
border = 0;
category = "Tools";
};
@ -686,7 +687,7 @@ singleton GuiControlProfile( GuiBackFillProfile )
singleton GuiControlProfile( GuiControlListPopupProfile )
{
opaque = true;
fillColor = "48 48 48";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
fillColorHL = "91 101 116";
border = false;
//borderColor = "0 0 0";
@ -719,10 +720,10 @@ singleton GuiControlProfile( GuiInspectorButtonProfile : ToolsGuiButtonProfile )
singleton GuiControlProfile( GuiInspectorSwatchButtonProfile )
{
borderColor = "100 100 100 255";
borderColorNA = "200 200 200 255";
fillColorNA = "255 255 255 0";
borderColorHL = "0 0 0 255";
borderColor = EditorSettings.value("Theme/dividerDarkColor");
borderColorNA = EditorSettings.value("Theme/dividerMidColor");
fillColorNA = EditorSettings.value("Theme/fieldBGColor");
borderColorHL = EditorSettings.value("Theme/dividerLightColor");
category = "Editor";
};
@ -730,8 +731,8 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile )
{
// Transparent Background
opaque = true;
fillColor = "0 0 0 0";
fillColorHL = "91 101 116";
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
// No Border (Rendered by field control)
border = false;
@ -743,10 +744,10 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile )
fontType = "Noto Sans";
fontSize = 14;
fontColor = "215 215 215";
fontColorSEL = "0 140 220";
fontColorHL = "240 240 240";
fontColorNA = "100 100 100";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorHL = EditorSettings.value("Theme/fieldTextSELColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
category = "Editor";
};
singleton GuiControlProfile( GuiDropdownTextEditProfile : ToolsGuiTextEditProfile )
@ -765,9 +766,9 @@ singleton GuiControlProfile( GuiInspectorGroupProfile )
fontType = "Noto Sans";
fontSize = "14";
fontColor = "215 215 215 150";
fontColorHL = "215 215 215 220";
fontColorNA = "128 128 128";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
justify = "left";
opaque = false;
@ -783,16 +784,16 @@ singleton GuiControlProfile( GuiInspectorGroupProfile )
singleton GuiControlProfile( GuiInspectorFieldProfile)
{
// fill color
opaque = false;
fillColor = "48 48 48";
fillColorHL = "91 101 116";
fillColorNA = "244 244 244";
opaque = true;
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
fillColorNA = EditorSettings.value("Theme/fieldBGSELColor");
// border color
border = false;
borderColor = "190 190 190";
borderColorHL = "156 156 156";
borderColorNA = "200 200 200";
borderColor = EditorSettings.value("Theme/dividerDarkColor");
borderColorHL = EditorSettings.value("Theme/dividerMidColor");
borderColorNA = EditorSettings.value("Theme/dividerLightColor");
//bevelColorHL = "255 255 255";
//bevelColorLL = "0 0 0";
@ -801,9 +802,9 @@ singleton GuiControlProfile( GuiInspectorFieldProfile)
fontType = "Noto Sans";
fontSize = 14;
fontColor = "240 240 240";
fontColorHL = "240 240 240";
fontColorNA = "190 190 190";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
textOffset = "10 0";
tab = true;
@ -822,15 +823,15 @@ singleton GuiControlProfile( GuiInspectorMultiFieldProfile : GuiInspectorFieldPr
singleton GuiControlProfile( GuiInspectorMultiFieldDifferentProfile : GuiInspectorFieldProfile )
{
border = true;
borderColor = "190 100 100";
borderColor = EditorSettings.value("Theme/dividerMidColor");
};
singleton GuiControlProfile( GuiInspectorDynamicFieldProfile : GuiInspectorFieldProfile )
{
// Transparent Background
opaque = true;
fillColor = "0 0 0 0";
fillColorHL = "91 101 116";
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
// No Border (Rendered by field control)
border = false;
@ -842,21 +843,21 @@ singleton GuiControlProfile( GuiInspectorDynamicFieldProfile : GuiInspectorField
fontType = "Noto Sans";
fontSize = 14;
fontColor = "215 215 215";
fontColorSEL = "0 140 220";
fontColorHL = "240 240 240";
fontColorNA = "100 100 100";
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorHL = EditorSettings.value("Theme/fieldTextSELColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
category = "Editor";
};
singleton GuiControlProfile( GuiRolloutProfile )
{
border = 0;
borderColor = "200 200 200";
borderColor = EditorSettings.value("Theme/dividerLightColor");
fontColor = "240 240 240";
fontColorHL = "240 240 240";
fontColorNA = "190 190 190";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
hasBitmapArray = true;
bitmap = "tools/editorClasses/gui/images/rollout";
@ -894,12 +895,19 @@ singleton GuiControlProfile( GuiInspectorStackProfile )
opaque = false;
border = false;
category = "Editor";
fillColor = EditorSettings.value("Theme/tabsColor");
fillColorHL = EditorSettings.value("Theme/tabsHLColor");
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
};
singleton GuiControlProfile( GuiInspectorProfile : GuiInspectorFieldProfile )
{
opaque = true;
fillColor = "42 42 42 255";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
border = 0;
cankeyfocus = true;
tab = true;
@ -908,7 +916,7 @@ singleton GuiControlProfile( GuiInspectorProfile : GuiInspectorFieldProfile )
singleton GuiControlProfile( GuiInspectorInfoProfile : GuiInspectorFieldProfile )
{
opaque = true;
fillColor = "48 48 48";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
border = 0;
cankeyfocus = true;
tab = true;
@ -945,7 +953,7 @@ singleton GuiControlProfile( GuiInspectorTypeFileNameProfile )
fontColorHL = "240 240 240";
fontColorNA = "215 215 215";
fillColor = "48 48 48";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
fillColorHL = "91 101 116";
fillColorNA = "244 244 244";
@ -987,7 +995,7 @@ singleton GuiControlProfile( InspectorTypeCheckboxProfile : GuiInspectorFieldPro
singleton GuiControlProfile( GuiToolboxButtonProfile : ToolsGuiButtonProfile )
{
justify = "center";
fontColor = "215 215 215";
fontColor = EditorSettings.value("Theme/fieldTextColor");
border = 0;
textOffset = "0 0";
category = "Editor";
@ -995,10 +1003,10 @@ singleton GuiControlProfile( GuiToolboxButtonProfile : ToolsGuiButtonProfile )
singleton GuiControlProfile( GuiDirectoryTreeProfile : ToolsGuiTreeViewProfile )
{
fontColor = "240 240 240";
fontColorSEL= "250 250 250 175";
fillColorHL = "0 60 150";
fontColorNA = "240 240 240";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorSEL= EditorSettings.value("Theme/fieldTextSELColor");
fillColorHL = EditorSettings.value("Theme/fieldBGColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fontType = "Noto Sans";
fontSize = 14;
category = "Editor";
@ -1006,10 +1014,10 @@ singleton GuiControlProfile( GuiDirectoryTreeProfile : ToolsGuiTreeViewProfile )
singleton GuiControlProfile( GuiDirectoryFileListProfile )
{
fontColor = "240 240 240";
fontColorSEL= "250 250 250 175";
fillColorHL = "0 60 150";
fontColorNA = "240 240 240";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorSEL= EditorSettings.value("Theme/fieldTextSELColor");
fillColorHL = EditorSettings.value("Theme/fieldBGColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
fontType = "Noto Sans";
fontSize = 14;
category = "Editor";
@ -1035,13 +1043,17 @@ singleton GuiControlProfile( GuiInspectorFieldInfoMLTextProfile : ToolsGuiMLText
border = 0;
textOffset = "5 0";
category = "Editor";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");
};
singleton GuiControlProfile( GuiEditorScrollProfile )
{
opaque = true;
fillcolor = GuiInspectorBackgroundProfile.fillColor;
borderColor = ToolsGuiDefaultProfile.borderColor;
fillcolor = EditorSettings.value("Theme/windowBackgroundColor");
borderColor = EditorSettings.value("Theme/dividerDarkColor");
border = 1;
bitmap = "tools/gui/images/scrollBar";
hasBitmapArray = true;
@ -1077,16 +1089,16 @@ singleton GuiControlProfile( GuiCreatorIconButtonProfile )
category = "Editor";
};
singleton GuiControlProfile( GuiMenuBarProfile )
singleton GuiControlProfile( ToolsGuiMenuBarProfile )
{
fillColor = "48 48 48";
fillcolorHL = "42 42 42";
borderColor = "30 30 30 255";
borderColorHL = "30 30 30 255";
fontColor = "215 215 215";
fontColorSEL = "43 107 206";
fontColorHL = "244 244 244";
fontColorNA = "100 100 100";
fillColor = EditorSettings.value("Theme/headerColor");
fillcolorHL = EditorSettings.value("Theme/tabsSELColor");
borderColor = EditorSettings.value("Theme/dividerDarkColor");
borderColorHL = EditorSettings.value("Theme/dividerMidColor");
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
border = 0;
borderThickness = 1;
opaque = true;
@ -1094,3 +1106,90 @@ singleton GuiControlProfile( GuiMenuBarProfile )
category = "Editor";
bitmap = "tools/gui/images/checkbox-menubar";
};
singleton GuiControlProfile( ToolsMenubarProfile : ToolsGuiDefaultProfile )
{
bitmap = "./menubar";
category = "Editor";
fillColor = EditorSettings.value("Theme/headerColor");
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
borderColor = EditorSettings.value("Theme/dividerDarkColor");
};
singleton GuiControlProfile (menubarProfile)
{
opaque = false;
border = -2;
category = "Editor";
bitmap = "./menubar";
category = "Editor";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
borderColor = EditorSettings.value("Theme/dividerDarkColor");
};
singleton GuiControlProfile (editorMenubarProfile)
{
border = -2;
category = "Editor";
bitmap = "./editor-menubar";
category = "Editor";
};
singleton GuiControlProfile (editorMenu_wBorderProfile)
{
border = -2;
category = "Editor";
bitmap = "./menu-fullborder";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutProfile)
{
border = -2;
category = "Editor";
bitmap = "./inspector-style-rollout";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutListProfile)
{
border = -2;
category = "Editor";
bitmap = "./inspector-style-rollout-list";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutDarkProfile)
{
border = -2;
category = "Editor";
bitmap = "./inspector-style-rollout-dark";
fillColor = EditorSettings.value("Theme/windowBackgroundColor");
fontColor = EditorSettings.value("Theme/headerTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
borderColor = EditorSettings.value("Theme/dividerDarkColor");
};
singleton GuiControlProfile (inspectorStyleRolloutInnerProfile)
{
border = -2;
category = "Editor";
bitmap = "./inspector-style-rollout_inner";
category = "Editor";
};
singleton GuiControlProfile (inspectorStyleRolloutNoHeaderProfile)
{
border = -2;
category = "Editor";
bitmap = "./inspector-style-rollout-noheader";
category = "Editor";
};
singleton GuiControlProfile (IconDropdownProfile)
{
border = -2;
category = "Editor";
bitmap = "./icon-dropdownbar";
category = "Editor";
};

View file

@ -58,7 +58,7 @@
anchorLeft = "1";
anchorRight = "0";
isContainer = "1";
profile = "menubarProfile";
profile = "ToolsMenubarProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
@ -755,7 +755,7 @@
};
new GuiControl(GuiEditorSidebar) {
isContainer = "1";
Profile = "menubarProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "width";
VertSizing = "height";
position = "798 0";
@ -1503,7 +1503,7 @@
canSave = "1";
visible = "1";
isContainer = "1";
profile = "menubarProfile";
profile = "ToolsMenubarProfile";
new GuiTextCtrl( GuiEditorStatusBar ) {
profile = "ToolsGuiTextProfile";

View file

@ -72,7 +72,7 @@ function GuiEditCanvas::onCreateMenu(%this)
extent = "1024 20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
profile = "ToolsGuiMenuBarProfile";
new PopupMenu()
{

View file

@ -43,7 +43,7 @@
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
profile = "ToolsGuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";

View file

@ -1,99 +1,52 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<EditorSettings>
<Group name="WorldEditor">
<Setting name="forceLoadDAE">0</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="displayType">6</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="undoLimit">40</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Group name="ObjectIcons">
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
</Group>
<Group name="Render">
<Setting name="renderObjText">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjHandle">1</Setting>
</Group>
<Group name="Grid">
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridSnap">0</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridSize">1</Setting>
</Group>
<Group name="Tools">
<Setting name="snapSoftSize">2</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
</Group>
<Group name="Color">
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
</Group>
<Group name="Images">
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
</Group>
<Group name="Theme">
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
<Setting name="dividerLightColor">96 94 92 255</Setting>
<Setting name="tabsSELColor">59 58 57 255</Setting>
<Setting name="headerColor">50 49 48 255</Setting>
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
<Setting name="tabsHLColor">50 49 48 255</Setting>
<Setting name="fieldTextSELColor">240 240 240 255</Setting>
<Setting name="fieldBGColor">59 58 57 255</Setting>
<Setting name="headerTextColor">236 234 232 255</Setting>
<Setting name="dividerMidColor">50 49 48 255</Setting>
<Setting name="tabsColor">37 36 35 255</Setting>
<Setting name="fieldTextColor">178 175 172 255</Setting>
<Setting name="tooltipBGColor">43 43 43 255</Setting>
<Setting name="dividerDarkColor">17 16 15 255</Setting>
<Setting name="tooltipTextColor">255 255 255 255</Setting>
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
</Group>
<Group name="GuiEditor">
<Setting name="previewResolution">1024 768</Setting>
<Setting name="lastPath">tools/gui</Setting>
<Group name="EngineDevelopment">
<Setting name="showEditorProfiles">0</Setting>
<Setting name="toggleIntoEditor">0</Setting>
<Setting name="showEditorGuis">0</Setting>
</Group>
<Group name="Snapping">
<Setting name="snapToCanvas">1</Setting>
<Setting name="snapToGuides">1</Setting>
<Setting name="snapToCenters">1</Setting>
<Setting name="snapToControls">1</Setting>
<Setting name="snap2GridSize">8</Setting>
<Setting name="sensitivity">2</Setting>
<Setting name="snapToEdges">1</Setting>
<Setting name="snap2Grid">0</Setting>
</Group>
<Setting name="previewResolution">1024 768</Setting>
<Group name="Help">
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
</Group>
<Group name="Snapping">
<Setting name="snapToGuides">1</Setting>
<Setting name="sensitivity">2</Setting>
<Setting name="snap2GridSize">8</Setting>
<Setting name="snapToCenters">1</Setting>
<Setting name="snapToControls">1</Setting>
<Setting name="snapToEdges">1</Setting>
<Setting name="snap2Grid">0</Setting>
<Setting name="snapToCanvas">1</Setting>
</Group>
<Group name="Rendering">
<Setting name="drawGuides">1</Setting>
<Setting name="drawBorderLines">1</Setting>
</Group>
<Group name="EngineDevelopment">
<Setting name="showEditorGuis">0</Setting>
<Setting name="showEditorProfiles">0</Setting>
<Setting name="toggleIntoEditor">0</Setting>
</Group>
<Group name="Library">
<Setting name="viewType">Categorized</Setting>
</Group>
@ -102,25 +55,98 @@
</Group>
</Group>
<Group name="AxisGizmo">
<Setting name="renderWhenUsed">0</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Group name="Grid">
<Setting name="renderPlane">0</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="gridSize">10 10 10</Setting>
<Setting name="snapToGrid">0</Setting>
<Setting name="renderPlane">0</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="gridSize">10 10 10</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
</Group>
</Group>
<Group name="WorldEditor">
<Setting name="forceLoadDAE">0</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="undoLimit">40</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="displayType">6</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Group name="Color">
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
</Group>
<Group name="Tools">
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="snapSoftSize">2</Setting>
</Group>
<Group name="ObjectIcons">
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsStartDist">8</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
</Group>
<Group name="Images">
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
</Group>
<Group name="Render">
<Setting name="renderObjText">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjHandle">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
</Group>
<Group name="Grid">
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridSnap">0</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
</Group>
</Group>
<Group name="NavEditor">
<Setting name="SpawnClass">AIPlayer</Setting>
</Group>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
<Group name="levels">
<Group name="PbrMatTest.mis">
<Setting name="cameraSpeed">5</Setting>
</Group>
<Group name="BlankRoom.mis">
<Setting name="cameraSpeed">25</Setting>
</Group>
@ -129,7 +155,4 @@
<Group name="ConvexEditor">
<Setting name="materialName">Grid_512_Orange</Setting>
</Group>
<Group name="NavEditor">
<Setting name="SpawnClass">AIPlayer</Setting>
</Group>
</EditorSettings>

View file

@ -25,7 +25,7 @@
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "menubarProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "0 0";

View file

@ -23,7 +23,7 @@
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "menubarProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "0 0";
@ -313,7 +313,7 @@
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "menubarProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "width";
VertSizing = "top";
Position = "0 578";

View file

@ -4,7 +4,7 @@
Enabled = "0";
internalName = "ToolsToolbar";
isContainer = "1";
Profile = "editorMenubarProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 31";
@ -20,7 +20,7 @@
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "ToolsGuiDefaultProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "4 3";

View file

@ -4,7 +4,7 @@
internalName = "WorldEditorToolbar";
Enabled = "1";
isContainer = "1";
Profile = "ToolsGuiDefaultProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "306 0";
@ -21,7 +21,7 @@
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "ToolsGuiDefaultProfile";
Profile = "ToolsMenubarProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "0 3";
@ -83,7 +83,7 @@
new GuiControl(SnapToBar){
isContainer = "1";
profile = "ToolsGuiDefaultProfile";
profile = "ToolsMenubarProfile";
Position = "116 3";
Extent = "123 27";
Padding = "4";
@ -296,7 +296,7 @@
new GuiControl(ToggleButtonBar){
isContainer = "1";
profile = "ToolsGuiDefaultProfile";
profile = "ToolsMenubarProfile";
Position = "313 3";
Extent = "65 27";
@ -377,7 +377,7 @@
new GuiControl(ToggleNodeBar){
isContainer = "1";
profile = "ToolsGuiDefaultProfile";
profile = "ToolsMenubarProfile";
Position = "386 3";
Extent = "63 27";
@ -441,7 +441,7 @@
new GuiControl(PrefabBar){
isContainer = "1";
profile = "ToolsGuiDefaultProfile";
profile = "ToolsMenubarProfile";
Position = "386 3";
Extent = "63 27";
visible = true;

View file

@ -274,6 +274,7 @@
canSave = "1";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
profile = "ToolsGuiScrollProfile";
hovertime = "1000";
Docking = "Client";
Margin = "0 0 0 0";

View file

@ -79,6 +79,7 @@
canSave = "1";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
profile = "ToolsGuiScrollProfile";
hovertime = "1000";
Docking = "Client";
Margin = "0 0 0 0";

View file

@ -135,7 +135,12 @@ function initializeWorldEditor()
EVisibility.addOption( "Frustum Lock", "$Scene::lockCull", "" );
EVisibility.addOption( "Disable Zone Culling", "$Scene::disableZoneCulling", "" );
EVisibility.addOption( "Disable Terrain Occlusion", "$Scene::disableTerrainOcclusion", "" );
EVisibility.addOption( "Probes: Attenuation", "$Probes::showAttenuation", "" );
EVisibility.addOption( "Probes: Specular Cubemaps", "$Probes::showSpecularCubemaps", "" );
EVisibility.addOption( "Probes: Diffuse Cubemaps", "$Probes::showDiffuseCubemaps", "" );
EVisibility.addOption( "Probes: Contribution", "$Probes::showProbeContrib", "" );
EVisibility.addOption( "Colorblindness: Protanopia", "$CBV_Protanopia", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Protanomaly", "$CBV_Protanomaly", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Deuteranopia", "$CBV_Deuteranopia", "toggleColorBlindnessViz" );

View file

@ -51,13 +51,11 @@ function toggleColorBufferViz( %enable )
}
else if ( %enable )
{
AL_DeferredShading.disable();
AL_ColorBufferVisualize.enable();
}
else if ( !%enable )
{
AL_ColorBufferVisualize.disable();
AL_DeferredShading.enable();
}
}
@ -360,12 +358,7 @@ function toggleBackbufferViz( %enable )
if ( %enable $= "" )
{
$AL_BackbufferVisualizeVar = AL_DeferredShading.isEnabled() ? true : false;
AL_DeferredShading.toggle();
}
else if ( %enable )
AL_DeferredShading.disable();
else if ( !%enable )
AL_DeferredShading.enable();
}
function toggleColorBlindnessViz( %enable )

View file

@ -116,7 +116,7 @@ function EditorGui::buildMenus(%this)
extent = Canvas.extent.x SPC "20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
profile = "ToolsGuiMenuBarProfile";
};
// File Menu
@ -185,11 +185,12 @@ function EditorGui::buildMenus(%this)
Item[9] = "Select..." TAB "" TAB "EditorGui.toggleObjectSelectionsWindow();";
item[10] = "-";
item[11] = "Audio Parameters..." TAB "" TAB "EditorGui.toggleSFXParametersWindow();";
item[12] = "Editor Settings..." TAB "" TAB "ESettingsWindow.ToggleVisibility();";
item[13] = "Snap Options..." TAB "" TAB "ESnapOptions.ToggleVisibility();";
item[14] = "-";
item[15] = "Game Options..." TAB "" TAB "Canvas.pushDialog(optionsDlg);";
item[16] = "PostEffect Manager" TAB "" TAB "Canvas.pushDialog(PostFXManager);";
item[12] = "Editor Settings..." TAB "" TAB "ESettingsWindow.toggleEditorSettings();";
item[13] = "Game Settings..." TAB "" TAB "ESettingsWindow.toggleProjectSettings();";
item[14] = "Snap Options..." TAB "" TAB "ESnapOptions.ToggleVisibility();";
item[15] = "-";
item[16] = "Game Options..." TAB "" TAB "Canvas.pushDialog(optionsDlg);";
item[17] = "PostEffect Manager" TAB "" TAB "Canvas.pushDialog(PostFXManager);";
};
%this.menuBar.insert(%editMenu);

View file

@ -8,13 +8,11 @@
<OpenFiles>
<File ScrollX="0" ScrollY="0">art\main.cs</File>
<File ScrollX="0" ScrollY="9">core\main.cs</File>
<File ScrollX="0" ScrollY="9">..\..\Empty\game\core\main.cs</File>
<File ScrollX="0" ScrollY="15">..\..\BaseGame\game\core\main.cs</File>
<File ScrollX="0" ScrollY="130">core\scripts\client\postFx\MLAA.cs</File>
<File ScrollX="0" ScrollY="228">core\scripts\client\postFx\ssao.cs</File>
<File ScrollX="0" ScrollY="114">core\scripts\client\postFx\hdr.cs</File>
<File ScrollX="0" ScrollY="0">core\scripts\client\postFx\dof.cs</File>
<File ScrollX="0" ScrollY="9">core\scripts\client\postFx\caustics.cs</File>
<File ScrollX="0" ScrollY="0" Active="true">..\..\..\..\..\RnDBuildTest\My Projects\RnDTest\game\modules\TheFactory\components\FakeGISpotlight.cs</File>
<File ScrollX="0" ScrollY="108" Active="true">tools\worldEditor\main.cs</File>
</OpenFiles>
</TorsionProjectOptions>

View file

@ -0,0 +1,16 @@
function AI_Guard::onCreate(%this)
{
exec("./Scripts/aiPlayer.cs");
exec("./Scripts/guardTrigger.cs");
if(isObject(DatablockFilesList))
{
DatablockFilesList.add( "data/AI_Guard/Datablocks/aiPlayerDatablocks.cs" );
DatablockFilesList.add( "data/AI_Guard/Datablocks/aiPlayerMarker.cs" );
}
}
function AI_Guard::onDestroy(%this)
{
}

View file

@ -0,0 +1,15 @@
<ModuleDefinition
canSave="true"
canSaveDynamicFields="true"
ModuleId="AI_Guard"
VersionId="1"
Group="Game"
scriptFile="AI_Guard.cs"
CreateFunction="onCreate"
DestroyFunction="onDestroy">
<DeclaredAssets
canSave="true"
canSaveDynamicFields="true"
Extension="asset.taml"
Recurse="true" />
</ModuleDefinition>

View file

@ -0,0 +1,53 @@
// aiPlayerDatablocks.cs
// breaks out the datablocks for aiguard.cs to make them easier to edit.
// also manages the trigger controller
//////////////////////////////////////
//
// TRIGGER CONTROLLER
// This code handles the placing and behavior of aiSoldierTriggers
/////////////////////////////////////////
datablock TriggerData(guardTrigger)
{
tickPeriodMS = 100;
};
////////////////////////////////////////
//This is the default datablock for the Guard.
//I changed the stock datablock name from those used in AIPLAYER.CS
//I did this to allow me to create different classes of bots with their own
//thinking and reaction routines for each class.
///////////////////////////////////
//
//You can specifiy as many datablocks as you have characters.
//The first variable after PlayerData must be a unique name. The second variable (after the semicolon)
//must be a valid body type.
datablock PlayerData(DemoPlayer : DefaultPlayerData)
{
maxDamage = 100;
maxForwardSpeed = 14;
maxBackwardSpeed = 13;
maxSideSpeed = 13;
//The art used by this datablock
shapeFile = "data/Soldier/Shapes/soldier_Rigged.DAE";//"art/shapes/actors/Soldier/soldier_rigged.DAE";
//Set the bot's inventory so it can use different weapons
maxInv[Rifle] = 1;
maxInv[BulletAmmo] = 1000;
maxInv[RocketLauncher] = 1;
maxInv[RocketLauncherAmmo] = 1000;
maxInv[GrenadeLauncher] = 1;
maxInv[GrenadeLauncherAmmo] = 1000;
maxInvRifle = "1";
maxInvBulletAmmo = "1000";
maxInvGrenadeLauncher = "1";
maxInvGrenadeLauncherAmmo = "1000";
maxInvRocketLauncher = "1";
maxInvRocketLauncherAmmo = "1000";
};

View file

@ -0,0 +1,16 @@
//The AIPlayer marker is placed in the map during edit mode. When the map is loaded the
//marker is replaced by a guard player. (Assuming that the $AI_GUARD_ENABLED variable is set
//to true.) The marker is hidden or not depending on the value set in $AI_GUARD_MARKER_HIDE.
//The AIPlayer marker can use a dynamic variable - set during map creation - called 'respawn'
//Creating and setting the 'respawn' variable will override the default value set in
//$AI_GUARD_DEFAULTRESPAWN. This allows more freedom in determining which bots respawn and which do not.
datablock StaticShapeData(AIPlayerMarker)
{
// Mission editor category, this datablock will show up in the
// specified category under the "shapes" root category.
category = "AIMarker";
// Basic Item properties
shapeFile = "data/Soldier/Shapes/soldier_Rigged.DAE";//"art/shapes/actors/Soldier/soldier_rigged.DAE";
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
function guardTrigger::onEnterTrigger(%this, %trigger, %obj)
{
echo(%trigger @ " has been triggered!");
// we've been triggered. Now check to see if the player triggered the trigger
// we don't want other enemies to keep spawing more enemies!
%tgtid = AIPlayer::GetClosestPlayer(%trigger);
//echo("nearest human is " @ %tgtid);
// check to see if the player triggered this.
if (%tgtid == %obj)
{
// if triggerMany is set, then we shouldn't do anything. (or do something different.)
// if you want a trigger to always spawn an enemy, set the trigger's triggerMany value to "true"
// default behavior is to trigger once.
if (!%trigger.triggerMany && !%trigger.doneOnce)
{
// set the spawnGroup variable to pass on to the spawn function
%spawnGroup = %trigger.spawnGroup;
// let the game know we've already been triggered once.
%trigger.doneOnce = true;
// spawn the group
AIPlayer::spawnByGroup(%spawnGroup);
}
else
{
// we've been triggered before. Don't do anything
// If you wanted to do something different, this is where you would put it.
}
}
}

View file

@ -0,0 +1,9 @@
function PostFXPack::onCreate(%this)
{
exec("./Scripts/postFXPack.cs");
}
function PostFXPack::onDestroy(%this)
{
}

View file

@ -0,0 +1,15 @@
<ModuleDefinition
canSave="true"
canSaveDynamicFields="true"
ModuleId="PostFXPack"
VersionId="1"
Group="Game"
scriptFile="PostFXPack.cs"
CreateFunction="onCreate"
DestroyFunction="onDestroy">
<DeclaredAssets
canSave="true"
canSaveDynamicFields="true"
Extension="asset.taml"
Recurse="true" />
</ModuleDefinition>

View file

@ -0,0 +1,25 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//*****************************************************************************
// Shaders ( For Custom Materials )
//*****************************************************************************

View file

@ -0,0 +1,351 @@
// PIXELATE
$Pixelate::PixelWidth = 10.0;
$Pixelate::PixelHeight = 10.0;
singleton ShaderData( PixelateShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/pixelateP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( PixelatePostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = PixelateShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function PixelatePostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$pixel_w", $Pixelate::PixelWidth);
%this.setShaderConst("$pixel_h", $Pixelate::PixelHeight);
%this.setShaderConst("$sizeX",getWord($pref::Video::mode, 0));
%this.setShaderConst("$sizeY",getWord($pref::Video::mode, 1));
}
// BLURRED VISION
$BlurredVisionIntensity = 1.0;
singleton ShaderData( BlurredVisionShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/blurredVisionP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( BlurredVisionPostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = BlurredVisionShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function BlurredVisionPostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$BlurredVisionIntensity", $BlurredVisionIntensity);
}
// DREAM VIEW
$DreamViewIntensity = 1.0;
singleton ShaderData( DreamViewShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/dreamviewP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( DreamViewPostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = DreamViewShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function DreamViewPostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$DreamViewIntensity", $DreamViewIntensity);
}
// CROSS STITCH
$CrossStichPostEffect::StitchingSize = 6.0;
$CrossStichPostEffect::Invert = 0;
singleton ShaderData( CrossStitchShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/crossStitchP.hlsl";
pixVersion = 3.0;
};
singleton PostEffect( CrossStitchPostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = CrossStitchShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function CrossStitchPostEffect::setShaderConsts(%this)
{
%this.setShaderConst( "$time", ($Sim::time - %this.timeStart) );
%this.setShaderConst("$sizeX",getWord($pref::Video::mode, 0));
%this.setShaderConst("$sizeY",getWord($pref::Video::mode, 1));
%this.setShaderConst("$stitching_size", $CrossStichPostEffect::StitchingSize);
%this.setShaderConst("$invert", $CrossStichPostEffect::Invert);
}
// POSTERISATION
$PosterisationPostEffect::Gamma = 0.6;
$PosterisationPostEffect::NumColors = 4.0;
singleton ShaderData( PosterisationShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/posterisationP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( PosterisationPostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = PosterisationShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function PosterisationPostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$gamma", $PosterisationPostEffect::Gamma);
%this.setShaderConst("$numColors", $PosterisationPostEffect::NumColors);
}
// NIGHT VISION 2
$NightVisionPostEffect::LuminanceThreshold = 0.2;
$NightVisionPostEffect::ColorAmplification = 4.0;
singleton ShaderData( NightVision2Shader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/nightVision2P.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( NightVision2Fx )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = NightVision2Shader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function NightVision2Fx::setShaderConsts(%this)
{
%this.setShaderConst("$luminanceThreshold", $NightVisionPostEffect::LuminanceThreshold);
%this.setShaderConst("$colorAmplification", $NightVisionPostEffect::ColorAmplification);
}
// LENS CIRCLE
$LensCirclePostEffect::RadiusX = 0.6;
$LensCirclePostEffect::RadiusY = 0.2;
singleton ShaderData( LensCircleShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/lensCircleP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( LensCirclePostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = LensCircleShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function LensCirclePostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$radiusX", $LensCirclePostEffect::RadiusX);
%this.setShaderConst("$radiusY", $LensCirclePostEffect::RadiusY);
}
// CHROMATIC ABERRATION
$ChromaticAberrationPostEffect::Intensity = 0.3;
singleton ShaderData( ChromaticAberrationShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/chromaticAberrationP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( ChromaticAberrationPostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = ChromaticAberrationShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function ChromaticAberrationPostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$intensity", $ChromaticAberrationPostEffect::Intensity);
}
// RGB
$RGBPostEffect::RedLevel = 1.0;
$RGBPostEffect::GreenLevel = 1.0;
$RGBPostEffect::BlueLevel = 1.0;
singleton ShaderData( RGBShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/rgbP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( RGBPostEffect )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = RGBShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
renderPriority = 10;
};
function RGBPostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$redLevel", $RGBPostEffect::RedLevel);
%this.setShaderConst("$greenLevel", $RGBPostEffect::GreenLevel);
%this.setShaderConst("$blueLevel", $RGBPostEffect::BlueLevel);
}
// ZOOM BLUR
$ZoomBlur::Amount = 0.99;
$ZoomBlur::Samples = 6;
singleton ShaderData( ZoomBlurShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/zoomBlurP.hlsl";
samplerNames[0] = "$inputTex";
pixVersion = 3.0;
};
singleton PostEffect( ZoomBlurPostEffect )
{
renderTime = "PFXAfterDiffuse";
shader = ZoomBlurShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
};
function ZoomBlurPostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$amount", $ZoomBlur::Amount);
%this.setShaderConst("$samples", $ZoomBlur::Samples);
}
// NEGATIVE
singleton ShaderData( NegativeShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/negativeP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( NegativePostEffect )
{
renderTime = "PFXAfterDiffuse";
shader = NegativeShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
};
// BLACK AND WHITE
singleton ShaderData( BlackAndWhiteShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/blackAndWhiteP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( BlackAndWhitePostEffect )
{
renderTime = "PFXAfterDiffuse";
shader = BlackAndWhiteShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
};
// MONOCHROME
singleton ShaderData( MonochromeShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/monochromeP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( MonochromePostEffect )
{
renderTime = "PFXAfterDiffuse";
shader = MonochromeShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
};
// EDGE DETECTION
$EdgeDetection::Threshold = 0.01;
singleton ShaderData( EdgeDetectionShader )
{
DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
DXPixelShaderFile = "shaders/common/postFx/Library/edgeDetectionP.hlsl";
pixVersion = 2.0;
};
singleton PostEffect( EdgeDetectionPostEffect )
{
renderTime = "PFXAfterDiffuse";
shader = EdgeDetectionShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
};
function EdgeDetectionPostEffect::setShaderConsts(%this)
{
%this.setShaderConst("$threshold", $EdgeDetection::Threshold);
}

View file

@ -0,0 +1,21 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "../../torque.hlsl"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
base.a = 1.0f;
base.rgb = (base.r + base.g + base.b) / 3.0f;
if (base.r < 0.5)
base.r = 0.0f;
else
base.r = 1.0f;
base.gb = base.r;
return base;
}

View file

@ -0,0 +1,29 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
#include "../../torque.hlsl"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float BlurredVisionIntensity;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.001 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.003 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.005 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.007 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.009 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.011 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.001 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.003 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.005 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.007 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.009 * BlurredVisionIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.011 * BlurredVisionIntensity));
base = base / 15.0; // 9.5
return base;
}

View file

@ -0,0 +1,24 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
uniform float accumTime;
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float intensity;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float2 coords = IN.uv0;
float2 uv = IN.uv0;
coords = (coords - 0.5) * 2.0;
float coordDot = dot(coords, coords);
float2 uvG = uv - TORQUE_TEX2D(backBuffer, IN.uv0).xy * intensity * coords * coordDot;
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
base.g = TORQUE_TEX2D(backBuffer, uvG).g;
return base;
}

View file

@ -0,0 +1,39 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float time;
uniform float sizeX; // rt_w
uniform float sizeY; // rt_h
uniform float stitching_size = 6.0;
uniform int invert = 0;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = float4(0.0, 0.0, 0.0, 0.0);
float size = stitching_size;
float2 cPos = IN.uv0 * float2(sizeX, sizeY);
float2 tlPos = floor(cPos / float2(size, size));
tlPos *= size;
int remX = int(cPos.x % size);
int remY = int(cPos.y % size);
if (remX == 0 && remY == 0)
tlPos = cPos;
float2 blPos = tlPos;
blPos.y += (size - 1.0);
if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y)))))
{
if (invert == 1)
base = float4(0.2, 0.15, 0.05, 1.0);
else
base = TORQUE_TEX2D(backBuffer, tlPos * float2(1.0/sizeX, 1.0/sizeY)) * 1.4;
}
else
{
if (invert == 1)
base = TORQUE_TEX2D(backBuffer, tlPos * float2(1.0/sizeX, 1.0/sizeY)) * 1.4;
else
base = float4(0.0, 0.0, 0.0, 1.0);
}
return base;
}

View file

@ -0,0 +1,30 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
#include "../../torque.hlsl"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float DreamViewIntensity;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.001 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.003 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.005 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.007 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.009 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0+(0.011 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.001 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.003 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.005 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.007 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.009 * DreamViewIntensity));
base += TORQUE_TEX2D(backBuffer, IN.uv0-(0.011 * DreamViewIntensity));
base.rgb = (base.r + base.g + base.b)/3.0;
base = base / 9.5;
return base;
}

View file

@ -0,0 +1,48 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "../../torque.hlsl"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float threshold;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
const int NUM = 9;
const float2 c[NUM] =
{
float2(-0.0078125, 0.0078125),
float2( 0.00 , 0.0078125),
float2( 0.0078125, 0.0078125),
float2(-0.0078125, 0.00 ),
float2( 0.0, 0.0),
float2( 0.0078125, 0.007 ),
float2(-0.0078125,-0.0078125),
float2( 0.00 , -0.0078125),
float2( 0.0078125,-0.0078125),
};
int i;
float3 col[NUM];
for (i=0; i < NUM; i++)
{
col[i] = TORQUE_TEX2D(backBuffer, IN.uv0 + 0.2*c[i]);
}
float3 rgb2lum = float3(0.30, 0.59, 0.11);
float lum[NUM];
for (i = 0; i < NUM; i++)
{
lum[i] = dot(col[i].xyz, rgb2lum);
}
float x = lum[2]+ lum[8]+2*lum[5]-lum[0]-2*lum[3]-lum[6];
float y = lum[6]+2*lum[7]+ lum[8]-lum[0]-2*lum[1]-lum[2];
float edge =(x*x + y*y < threshold)? 1.0:0.0;
base.rgb *= edge;
return base;
}

View file

@ -0,0 +1,14 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float radiusX;
uniform float radiusY;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
float dist = distance(IN.uv0, float2(0.5,0.5));
base.rgb *= smoothstep(radiusX, radiusY, dist);
return base;
}

View file

@ -0,0 +1,13 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "../../torque.hlsl"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
base.rgb = (base.r + base.g + base.b) / 3.0f;
return base;
}

View file

@ -0,0 +1,11 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "../../torque.hlsl"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
base.a = 0;
return float4(1.0f, 1.0f, 1.0f, 1.0f) - base;
}

View file

@ -0,0 +1,48 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
uniform float accumTime;
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float luminanceThreshold; // 0.2
uniform float colorAmplification; // 4.0
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float speed = 100;
float Yres = 1024;
float brightness = 0.2;
float4 finalColor = float4(1.0, 1.0, 1.0, 1.0);
float2 uv;
uv.x = 0.4 * sin(accumTime * 50.0);
uv.y = 0.4 * cos(accumTime * 50.0);
//float m = TORQUE_TEX2D(maskTex, gl_TexCoord[0].st).r;
//vec3 n = texture2D(noiseTex, (gl_TexCoord[0].st*3.5) + uv).rgb;
float3 c = TORQUE_TEX2D(backBuffer, IN.uv0).rgb;
float lum = dot(float3(0.30, 0.59, 0.11), c);
if (lum < luminanceThreshold)
c *= colorAmplification;
float3 visionColor = float3(0.1, 0.95, 0.2);
finalColor.rgb = c * visionColor;
// add noise
float noise = IN.uv0.x * IN.uv0.y * accumTime * speed;
noise = fmod(noise, 10) * fmod(noise, 100);
noise = fmod(noise, 0.01);
float3 color = finalColor.rgb;
color = color + color * saturate(noise.xxx * 200);
// add banding
float sin,cos;
sincos(IN.uv0.y * Yres, sin, cos);
color += color * float3(sin, cos, sin) * brightness;
finalColor.rgb = color;
return finalColor;
}

View file

@ -0,0 +1,21 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float pixel_w;
uniform float pixel_h;
uniform float sizeX;
uniform float sizeY;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float2 uv = IN.uv0;
float3 base = float3(1.0, 0.0, 0.0);
float dx = pixel_w * (1.0 / sizeX);
float dy = pixel_h * (1.0 / sizeY);
float2 coord = float2(dx*floor(uv.x/dx), dy*floor(uv.y/dy));
base = TORQUE_TEX2D(backBuffer, coord).rgb;
return float4(base, 1.0);
}

View file

@ -0,0 +1,17 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float gamma;
uniform float numColors;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float3 base = TORQUE_TEX2D(backBuffer, IN.uv0).rgb;
base = pow(base, float3(gamma, gamma, gamma));
base = base * numColors;
base = floor(base);
base = base / numColors;
base = pow(base, float3(1.0/gamma, 1.0/gamma, 1.0/gamma));
return float4(base, 1.0);
}

View file

@ -0,0 +1,16 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "shadergen:/autogenConditioners.h"
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
uniform float redLevel;
uniform float greenLevel;
uniform float blueLevel;
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
base.r *= redLevel;
base.g *= greenLevel;
base.b *= blueLevel;
return base;
}

View file

@ -0,0 +1,25 @@
#include "shaders/common/postFx/postFx.hlsl"
#include "../../torque.hlsl"
uniform float amount;
uniform float samples;
TORQUE_UNIFORM_SAMPLER2D(backBuffer, 0);
float4 main(PFXVertToPix IN) : TORQUE_TARGET0
{
float b = 0;
float4 base = TORQUE_TEX2D(backBuffer, IN.uv0);
float2 uv = IN.uv0;
[loop] for (int i = 1; i <= samples; i++)
{
uv -= b;
uv *= amount;
b = (1-(1*pow(abs(amount), i))) / 2;
uv += b;
base += TORQUE_TEX2DLOD(backBuffer, float4(uv.x, uv.y, 0, 0));
}
return base / (samples + 1);
}

View file

@ -0,0 +1,5 @@
$RPGDialogEditorPref::ActionPath = "art/dialogs/dla/";
$RPGDialogEditorPref::QuestionPath = "art/dialogs/dlq/";
$RPGDialogEditorPref::PortraitsPath = "art/dialogs/portraits/";
$RPGDialogEditorPref::mainMod="art";
$RPGDialogEditorPref::MaxOptions = 100;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,57 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
//
// Copyright (c) 2001 GarageGames.Com
// Portions Copyright (c) 2001 by Sierra Online, Inc.
//-----------------------------------------------------------------------------
function initRPGDialogEditor()
{
exec("~/scripts/RPGDialogEditor/ui/MainEditorScreenGui.gui");
exec("~/scripts/RPGDialogEditor/ui/EditQuestionGui.gui");
exec("~/scripts/RPGDialogEditor/ui/EditAnswerGui.gui");
exec("~/scripts/RPGDialogEditor/ui/NewScriptPopup.gui");
exec("~/scripts/RPGDialogEditor/ui/SetPathsPopup.gui");
exec("~/scripts/RPGDialogEditor/ui/EditorOpeningGui.gui");
exec("~/scripts/RPGDialogEditor/defaults.cs");
exec("~/scripts/RPGDialogEditor/prefs.cs");
exec("~/scripts/RPGDialogEditor/editorMain.cs");
PopulateActionList();
PopulateQuestionOptionsList();
GlobalActionMap.bind(keyboard, "f5", toggleRPGDialogEditor);
}
function openRPGDialogEditor()
{
$GuiBeforeRPGDialogEditor=Canvas.getContent();
if(TextScript.getvalue()$="Current Q. Script:")
Canvas.setContent(EditorOpeningGui);
else
Canvas.setContent(MainEditorScreenGui);
Canvas.setCursor("DefaultCursor");
}
function closeRPGDialogEditor()
{
Canvas.setContent($GuiBeforeRPGDialogEditor);
Canvas.setCursor("DefaultCursor");
}
function toggleRPGDialogEditor(%val)
{
if (%val)
{
if (Canvas.getContent() == MainEditorScreenGui.getId() ||
Canvas.getContent() == EditQuestionGui.getId() ||
Canvas.getContent() == EditAnswerGui.getId() ||
Canvas.getContent() == EditorOpeningGui.getId())
closeRPGDialogEditor();
else
openRPGDialogEditor();
}
}

View file

@ -0,0 +1,68 @@
//-----------------------------------------------------------------------------
// Torque Game Engine
//
// Copyright (c) 2001 GarageGames.Com
// Portions Copyright (c) 2001 by Sierra Online, Inc.
//-----------------------------------------------------------------------------
function initEditor()
{
exec("~/scripts/RPGDialogEditor/ui/MainEditorScreenGui.gui");
exec("~/scripts/RPGDialogEditor/ui/EditQuestionGui.gui");
exec("~/scripts/RPGDialogEditor/ui/EditAnswerGui.gui");
exec("~/scripts/RPGDialogEditor/ui/NewScriptPopup.gui");
exec("~/scripts/RPGDialogEditor/ui/SetPathsPopup.gui");
exec("~/scripts/RPGDialogEditor/ui/EditorOpeningGui.gui");
exec("~/scripts/RPGDialogEditor/defaults.cs");
exec("~/scripts/RPGDialogEditor/prefs.cs");
exec("~/scripts/RPGDialogEditor/editorMain.cs");
}
function startEditor()
{
// The client mod has already set it's own content, but we'll
// just load something new.
Canvas.setContent(EditorOpeningGui);
Canvas.setCursor("DefaultCursor");
PopulateActionList();
PopulateQuestionOptionsList();
}
//-----------------------------------------------------------------------------
// Package overrides to initialize the mod.
// This module currently loads on top of the client mod, but it probably
// doesn't need to. Should look into having disabling the client and
// doing our own canvas init.
package RPGDialogEditor {
function onStart()
{
Parent::onStart();
echo("\n--------- Initializing MOD: RPGDialogEditor ---------");
if (!isObject(Canvas)) {
// If the parent onStart didn't open a canvas, then we're
// probably not running as a mod. We'll have to do the work
// ourselves.
initCanvas("RPGDialog Editor");
}
initEditor();
startEditor();
}
function onExit()
{
echo("Exporting RPGDialog editor prefs");
export("$RPGDialogEditorPref::*", "~/prefs.cs", False);
if(isEventPending($RPGDialog::RefreshSchedule))
cancel($RPGDialog::RefreshSchedule);
Parent::onExit();
}
}; // package end.
activatePackage(RPGDialogEditor);

View file

@ -0,0 +1,5 @@
$RPGDialogEditorPref::ActionPath = "art/dialogs/dla/";
$RPGDialogEditorPref::mainMod = "art";
$RPGDialogEditorPref::MaxOptions = 100;
$RPGDialogEditorPref::PortraitsPath = "art/dialogs/portraits/";
$RPGDialogEditorPref::QuestionPath = "art/dialogs/dlq/";

View file

@ -0,0 +1,131 @@
new GuiChunkedBitmapCtrl(EditAnswerGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./background";
useVariable = "0";
tile = "0";
new GuiScrollCtrl(AnswerEditScroll) {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "40 50";
extent = "480 500";
minExtent = "8 2";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
constantThumbHeight = "0";
childMargin = "2 2";
new GuiMLTextEditCtrl(AnswerEdit) {
profile = "GuiMLTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 2";
extent = "450 500";
minExtent = "8 2";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "1";
maxChars = "-1";
};
};
new GuiTextEditCtrl(ActionEdit) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "40 20";
extent = "711 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
new GuiButtonCtrl(AnswerEditConfirmButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "523 530";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "OK";
groupNum = "-1";
buttonType = "PushButton";
command = "confirmAnswerEdit();";
};
new GuiButtonCtrl(AnswerEditCancelButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "598 530";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
command = "Canvas.setContent(MainEditorScreenGui);";
};
new GuiButtonCtrl(AnswerEditDeleteButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "673 530";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Delete";
groupNum = "-1";
buttonType = "PushButton";
command = "MessageBoxYesNo( \"Delete Answer\", \"Do you really want to delete this answer?\", \"deleteAnswer(\"@$RPGDialog::EditAnswerNumber@\");\", \"\");";
};
new GuiScrollCtrl(ActionListScroll) {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "521 50";
extent = "230 476";
minExtent = "8 2";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
constantThumbHeight = "0";
childMargin = "2 2";
new GuiTextListCtrl(ActionList) {
profile = "GuiTextListProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "196 401";
minExtent = "8 2";
visible = "1";
helpTag = "0";
enumerate = "0";
resizeCell = "1";
columns = "0";
fitParentWidth = "0";
clipColumnText = "0";
};
};
};

View file

@ -0,0 +1,161 @@
new GuiChunkedBitmapCtrl(EditQuestionGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./background";
useVariable = "0";
tile = "0";
new GuiScrollCtrl(QuestionEditScroll) {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "40 50";
extent = "480 500";
minExtent = "8 2";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
constantThumbHeight = "0";
childMargin = "2 2";
new GuiMLTextEditCtrl(QuestionEdit) {
profile = "GuiMLTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 2";
extent = "450 500";
minExtent = "8 2";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "1";
maxChars = "-1";
};
};
new GuiButtonCtrl(QuestionEditConfirmButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "523 530";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "OK";
groupNum = "-1";
buttonType = "PushButton";
command = "confirmQuestionEdit();";
};
new GuiButtonCtrl(QuestionEditCancelButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "598 530";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
command = "cancelQuestionEdit();";
};
new GuiButtonCtrl(QuestionEditClearButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "673 530";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Clear";
groupNum = "-1";
buttonType = "PushButton";
command = "QuestionEdit.settext(\"\");QuestionEditSound.setValue(\"\");";
};
new GuiScrollCtrl(QuestionOptionsScroll) {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "521 83";
extent = "230 443";
minExtent = "8 2";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
constantThumbHeight = "0";
childMargin = "2 2";
new GuiTextListCtrl(QuestionOptionsList) {
profile = "GuiTextListProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "196 401";
minExtent = "8 2";
visible = "1";
helpTag = "0";
enumerate = "0";
resizeCell = "1";
columns = "0";
fitParentWidth = "0";
clipColumnText = "0";
};
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "524 46";
extent = "50 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Sound Profile:";
maxLength = "255";
};
new GuiPopUpMenuCtrl(QuestionEditSound) {
profile = "GuiPopUpMenuProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "521 62";
extent = "135 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
maxPopupHeight = "500";
};
new GuiButtonCtrl(QuestionEditRemoveSound) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "660 62";
extent = "90 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Remove Sound";
groupNum = "-1";
buttonType = "PushButton";
command = "QuestionEditSound.setValue(\"\");";
};
};

View file

@ -0,0 +1,108 @@
//--- OBJECT WRITE BEGIN ---
new GuiChunkedBitmapCtrl(EditorOpeningGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
bitmap = "./background";
useVariable = "0";
tile = "0";
helpTag = "0";
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "78 10";
extent = "484 160";
minExtent = "8 2";
visible = "1";
bitmap = "./title";
wrap = "0";
helpTag = "0";
};
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "center";
position = "248 147";
extent = "143 186";
minExtent = "8 2";
visible = "1";
bitmap = "./box";
wrap = "0";
helpTag = "0";
new GuiButtonCtrl(NewScriptButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "36 47";
extent = "73 18";
minExtent = "8 2";
visible = "1";
command = "initNewScript();";
text = "New Script";
groupNum = "-1";
buttonType = "PushButton";
helpTag = "0";
};
new GuiButtonCtrl(LoadScriptButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "36 66";
extent = "73 18";
minExtent = "8 2";
visible = "1";
command = "getLoadFilename(\"*.dlq\", LoadScript);";
text = "Load Script...";
groupNum = "-1";
buttonType = "PushButton";
helpTag = "0";
};
new GuiButtonCtrl(SetPathsButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "36 85";
extent = "73 18";
minExtent = "8 2";
visible = "1";
command = "initSetPaths();";
text = "Set Paths...";
groupNum = "-1";
buttonType = "PushButton";
helpTag = "0";
};
new GuiButtonCtrl(QuitButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "36 117";
extent = "73 18";
minExtent = "8 2";
visible = "1";
command = "MessageBoxYesNo( \"Quit Editor\", \"Do you really want to quit the editor?\", \"if($GuiBeforeRPGDialogEditor==0)quit();else closeRPGDialogEditor();\", \"\");";
text = "Quit";
groupNum = "-1";
buttonType = "PushButton";
helpTag = "0";
};
new GuiTextCtrl(Version) {
profile = "GuiTextProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "58 18";
extent = "26 18";
minExtent = "8 2";
visible = "1";
text = "V.1.3";
maxLength = "255";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,265 @@
//--- OBJECT WRITE BEGIN ---
new GuiChunkedBitmapCtrl(MainEditorScreenGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./background";
useVariable = "0";
tile = "0";
new GuiTextCtrl(TextScript) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "162 21";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Current Q. Script:";
maxLength = "255";
};
new GuiTextCtrl(TextScript2) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "162 33";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Current A. Script:";
maxLength = "255";
};
new GuiTextCtrl(TextQuestionNumber) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "162 208";
extent = "46 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Question: 0/0";
maxLength = "255";
};
new GuiButtonCtrl(NewScriptButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "85 52";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "New Script";
groupNum = "-1";
buttonType = "PushButton";
command = "initNewScript();";
};
new GuiButtonCtrl(LoadScriptButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "85 71";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Load Script...";
groupNum = "-1";
buttonType = "PushButton";
command = "getLoadFilename(\"*.dlq\", LoadScript);";
};
new GuiButtonCtrl(NextQuestionButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "610 212";
extent = "29 16";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Next";
groupNum = "-1";
buttonType = "PushButton";
command = "NextQuestion();";
};
new GuiButtonCtrl(PreviousQuestionButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "579 212";
extent = "29 16";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Prev.";
groupNum = "-1";
buttonType = "PushButton";
command = "PreviousQuestion();";
};
new GuiScrollCtrl(QuestionScroll) {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "160 50";
extent = "480 160";
minExtent = "8 2";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
constantThumbHeight = "0";
childMargin = "4 2";
new GuiMLTextCtrl(QuestionText) {
profile = "GuiMLTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "4 2";
extent = "478 116";
minExtent = "8 2";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "1";
maxChars = "-1";
};
};
new GuiScrollCtrl(OptionsScroll) {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 250";
extent = "780 300";
minExtent = "8 2";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
childMargin = "2 2";
new GuiControl(OptionsControl) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "4 2";
extent = "770 290";
minExtent = "8 2";
visible = "1";
helpTag = "0";
};
};
new GuiButtonCtrl(editQuestionButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "642 123";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Edit Question";
groupNum = "-1";
buttonType = "PushButton";
command = "EditQuestion();";
};
new GuiButtonCtrl(newQuestionButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "642 51";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "New Question";
groupNum = "-1";
buttonType = "PushButton";
command = "newQuestion();";
};
new GuiButtonCtrl(newAnswerButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "715 230";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "New Answer";
groupNum = "-1";
buttonType = "PushButton";
command = "newAnswer();";
};
new GuiButtonCtrl(DeleteQuestionButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "642 76";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Del. Question";
groupNum = "-1";
buttonType = "PushButton";
command = "if($RPGDialog::Questions>0) MessageBoxYesNo( \"Delete Question\", \"Do you really want to delete this question?\", \"deleteQuestion();\", \"\");";
};
new GuiButtonCtrl(QuitButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "85 192";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Quit";
groupNum = "-1";
buttonType = "PushButton";
command = "MessageBoxYesNo( \"Quit Editor\", \"Do you really want to quit the editor?\", \"if($GuiBeforeRPGDialogEditor==0)quit();else closeRPGDialogEditor();\", \"\");";
};
new GuiButtonCtrl(SaveScriptButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "85 103";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Save Script";
groupNum = "-1";
buttonType = "PushButton";
command = "SaveScript();";
};
new GuiButtonCtrl(SaveScriptAsButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "85 122";
extent = "73 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Save As...";
groupNum = "-1";
buttonType = "PushButton";
command = "InitSaveAsPhase1();";
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,115 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(NewScriptPopup) {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "center";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
helpTag = "0";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "220 146";
extent = "200 188";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "New Dialog Script";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "0";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 28";
extent = "50 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Question Script:";
maxLength = "255";
};
new GuiTextEditCtrl(NewScriptQuestion) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 44";
extent = "160 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 68";
extent = "30 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Action Script:";
maxLength = "255";
};
new GuiTextEditCtrl(NewScriptAction) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 84";
extent = "160 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "56 156";
extent = "40 16";
minExtent = "8 2";
visible = "1";
command = "NewScript();";
helpTag = "0";
text = "Create";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "104 156";
extent = "40 16";
minExtent = "8 2";
visible = "1";
command = "Canvas.popDialog(NewScriptPopup);";
helpTag = "0";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,169 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(SetPathsPopup) {
profile = "GuiDefaultProfile";
horizSizing = "center";
vertSizing = "center";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
helpTag = "0";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "220 146";
extent = "200 228";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Paths";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "0";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 24";
extent = "67 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Main Mod Folder:";
maxLength = "255";
};
new GuiTextEditCtrl(MainMod) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 40";
extent = "160 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 64";
extent = "101 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Question Script Path:";
maxLength = "255";
};
new GuiTextEditCtrl(QuestionScriptPath) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 80";
extent = "160 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 104";
extent = "89 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Action Script Path:";
maxLength = "255";
};
new GuiTextEditCtrl(ActionScriptPath) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 120";
extent = "160 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 144";
extent = "67 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
text = "Portraits Path:";
maxLength = "255";
};
new GuiTextEditCtrl(PortraitsPath) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 160";
extent = "160 18";
minExtent = "8 2";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "56 192";
extent = "40 16";
minExtent = "8 2";
visible = "1";
command = "SetPaths();";
helpTag = "0";
text = "Set";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "104 192";
extent = "40 16";
minExtent = "8 2";
visible = "1";
command = "Canvas.popDialog(SetPathsPopup);";
helpTag = "0";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Some files were not shown because too many files have changed in this diff Show more