mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-26 10:03:48 +00:00
Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into development
This commit is contained in:
commit
52a37c25d3
17 changed files with 213 additions and 173 deletions
|
|
@ -41,10 +41,10 @@
|
|||
/// code version, the game name, and which type of game it is (TGB, TGE, TGEA, etc.).
|
||||
///
|
||||
/// Version number is major * 1000 + minor * 100 + revision * 10.
|
||||
#define TORQUE_GAME_ENGINE 4001
|
||||
#define TORQUE_GAME_ENGINE 4002
|
||||
|
||||
/// Human readable engine version string.
|
||||
#define TORQUE_GAME_ENGINE_VERSION_STRING "4.0.1"
|
||||
#define TORQUE_GAME_ENGINE_VERSION_STRING "4.0.2"
|
||||
|
||||
/// Gets the engine version number. The version number is specified as a global in version.cc
|
||||
U32 getVersionNumber();
|
||||
|
|
|
|||
|
|
@ -817,16 +817,9 @@ void GuiGameSettingsCtrl::clickKeybind(S32 xPos)
|
|||
S32 columnSplit = mColumnSplit;
|
||||
|
||||
S32 height = getHeight();
|
||||
S32 width = getWidth();
|
||||
|
||||
Point2I button;
|
||||
button.x = columnSplit + (columnSplit / 2.5)/* + (optionWidth / 2)*/;
|
||||
button.y = 0;
|
||||
|
||||
Point2I buttonSize;
|
||||
buttonSize.x = height;
|
||||
buttonSize.y = height;
|
||||
|
||||
RectI rect(button, buttonSize);
|
||||
RectI rect(Point2I::Zero, Point2I(width, height));
|
||||
|
||||
onChange_callback();
|
||||
|
||||
|
|
|
|||
|
|
@ -385,6 +385,8 @@ bool ModuleManager::loadModuleGroup( const char* pModuleGroup )
|
|||
// Create a scope set.
|
||||
SimSet* pScopeSet = new SimSet;
|
||||
pScopeSet->registerObject( pLoadReadyModuleDefinition->getModuleId() );
|
||||
pScopeSet->setClassNamespace("ModuleRoot");
|
||||
|
||||
pReadyEntry->mpModuleDefinition->mScopeSet = pScopeSet->getId();
|
||||
|
||||
// Increase load count.
|
||||
|
|
@ -773,6 +775,8 @@ bool ModuleManager::loadModuleExplicit( const char* pModuleId, const U32 version
|
|||
// Create a scope set.
|
||||
SimSet* pScopeSet = new SimSet;
|
||||
pScopeSet->registerObject( pLoadReadyModuleDefinition->getModuleId() );
|
||||
pScopeSet->setClassNamespace("ModuleRoot");
|
||||
|
||||
pReadyEntry->mpModuleDefinition->mScopeSet = pScopeSet->getId();
|
||||
|
||||
// Increase load count.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,70 @@
|
|||
// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is
|
||||
// connected to it via createAndConnectToLocalServer().
|
||||
|
||||
function Core_ClientServer::clearLoadStatus()
|
||||
{
|
||||
Core_ClientServer.moduleLoadedDone = 0;
|
||||
Core_ClientServer.moduleLoadedFailed = 0;
|
||||
}
|
||||
function Core_ClientServer::onLoadMap(%this)
|
||||
{
|
||||
%this.finishMapLoad();
|
||||
}
|
||||
|
||||
function Core_ClientServer::finishMapLoad(%this)
|
||||
{
|
||||
Core_ClientServer.GetEventManager().postEvent( "mapLoadComplete" );
|
||||
}
|
||||
|
||||
function Core_ClientServer::FailMapLoad(%this, %moduleName, %isFine)
|
||||
{
|
||||
Core_ClientServer.failedModuleName = %moduleName;
|
||||
Core_ClientServer.GetEventManager().postEvent( "mapLoadFail", %isFine );
|
||||
}
|
||||
|
||||
function Core_ClientServerListener::onMapLoadComplete(%this)
|
||||
{
|
||||
Core_ClientServer.moduleLoadedDone++;
|
||||
%numModsNeedingLoaded = 0;
|
||||
%modulesList = ModuleDatabase.findModules();
|
||||
for(%i=0; %i < getWordCount(%modulesList); %i++)
|
||||
{
|
||||
%module = getWord(%modulesList, %i);
|
||||
if (%module.ModuleId.isMethod("finishMapLoad"))
|
||||
%numModsNeedingLoaded++;
|
||||
}
|
||||
if (Core_ClientServer.moduleLoadedDone == %numModsNeedingLoaded)
|
||||
{
|
||||
loadMissionStage3();
|
||||
}
|
||||
}
|
||||
|
||||
function Core_ClientServerListener::onmapLoadFail(%this, %isFine)
|
||||
{
|
||||
if (%isFine)
|
||||
{
|
||||
%this.onMapLoadComplete();
|
||||
return;
|
||||
}
|
||||
|
||||
Core_ClientServer.moduleLoadedFailed++;
|
||||
if (Core_ClientServer.moduleLoadedFailed>1) return; // yeah, we know
|
||||
|
||||
$Server::LoadFailMsg = Core_ClientServer.failedModuleName @" failed to load mission specific data!";
|
||||
error($Server::LoadFailMsg);
|
||||
// Inform clients that are already connected
|
||||
|
||||
for (%clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++)
|
||||
{
|
||||
%cl = ClientGroup.getObject( %clientIndex );
|
||||
%cl.onConnectionDropped($Server::LoadFailMsg);
|
||||
%cl.endMission();
|
||||
%cl.resetGhosting();
|
||||
%cl.clearPaths();
|
||||
}
|
||||
destroyServer();
|
||||
}
|
||||
|
||||
function Core_ClientServer::onCreate( %this )
|
||||
{
|
||||
echo("\n--------- Initializing Directory: scripts ---------");
|
||||
|
|
@ -33,6 +97,11 @@ function Core_ClientServer::onCreate( %this )
|
|||
{
|
||||
initClient();
|
||||
}
|
||||
%this.GetEventManager().registerEvent("mapLoadComplete");
|
||||
%this.GetEventManager().registerEvent("mapLoadFail");
|
||||
%this.listener = new ScriptMsgListener() {class = Core_ClientServerListener;};
|
||||
%this.GetEventManager().subscribe( %this.listener, "mapLoadComplete" );
|
||||
%this.GetEventManager().subscribe( %this.listener, "mapLoadFail" );
|
||||
}
|
||||
|
||||
function Core_ClientServer::onDestroy( %this )
|
||||
|
|
|
|||
|
|
@ -126,7 +126,14 @@ function loadMissionStage2()
|
|||
// Set mission name.
|
||||
if( isObject( theLevelInfo ) )
|
||||
$Server::MissionName = theLevelInfo.levelName;
|
||||
Core_ClientServer.clearLoadStatus();
|
||||
callOnModules("onLoadMap");
|
||||
|
||||
}
|
||||
|
||||
function loadMissionStage3()
|
||||
{
|
||||
echo("*** Stage 3 load");
|
||||
|
||||
%hasGameMode = callGamemodeFunction("onCreateGame");
|
||||
|
||||
|
|
@ -143,8 +150,8 @@ function loadMissionStage2()
|
|||
|
||||
// Go ahead and launch the game
|
||||
%hasGameMode = callGamemodeFunction("onMissionStart");
|
||||
|
||||
}
|
||||
|
||||
function endMission()
|
||||
{
|
||||
if (!isObject( getScene(0) ))
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ $PostFX::HDRPostFX::keyValue = 0.115;
|
|||
|
||||
|
||||
//Explicit HDR Params
|
||||
$PostFX::HDRPostFX::exposureValue = 1.5;
|
||||
$PostFX::HDRPostFX::exposureValue = 1.0;
|
||||
|
||||
$PostFX::HDRPostFX::whitePoint = 2.5;
|
||||
$PostFX::HDRPostFX::whitePoint = 1.0;
|
||||
|
||||
//HDR Color Corrections Vars
|
||||
|
||||
|
|
@ -60,8 +60,8 @@ $PostFX::HDRPostFX::adaptRate = 0.85;
|
|||
// http://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare
|
||||
|
||||
$PostFX::HDRPostFX::enableBloom = true;
|
||||
$PostFX::HDRPostFX::threshold = 1.25;
|
||||
$PostFX::HDRPostFX::intensity = 0.25;
|
||||
$PostFX::HDRPostFX::threshold = 1.0;
|
||||
$PostFX::HDRPostFX::intensity = 1.0;
|
||||
$PostFX::HDRPostFX::radius = 4.0;
|
||||
|
||||
$PostFX::HDRPostFX::enableDirt = true;
|
||||
|
|
|
|||
|
|
@ -1,27 +1,23 @@
|
|||
$PostFX::HDRPostFX::Enabled = 1;
|
||||
$PostFX::HDRPostFX::exposureValue = "1.5";
|
||||
$PostFX::HDRPostFX::whitePoint = "2";
|
||||
$PostFX::HDRPostFX::exposureValue = 1;
|
||||
$PostFX::HDRPostFX::whitePoint = 1;
|
||||
$PostFX::HDRPostFX::logContrast = 1;
|
||||
$PostFX::HDRPostFX::saturationValue = "1";
|
||||
$PostFX::HDRPostFX::colorFilter = "1 1 1 1";
|
||||
$PostFX::HDRPostFX::minLuminace = "0";
|
||||
$PostFX::HDRPostFX::saturationValue = 1;
|
||||
$PostFX::HDRPostFX::colorFilter = "1.0 1.0 1.0";
|
||||
$PostFX::HDRPostFX::minLuminace = "0.5";
|
||||
$PostFX::HDRPostFX::whiteCutoff = 1;
|
||||
$PostFX::HDRPostFX::adaptRate = "0.8";
|
||||
$PostFX::HDRPostFX::adaptRate = "0.134615391";
|
||||
$PostFX::HDRPostFX::tonemapMode = "ACES";
|
||||
$PostFX::HDRPostFX::enableAutoExposure = "0";
|
||||
$PostFX::HDRPostFX::keyValue = "0.200000003";
|
||||
$PostFX::HDRPostFX::enableBloom = "1";
|
||||
$PostFX::HDRPostFX::threshold = "1";
|
||||
$PostFX::HDRPostFX::intensity = "1";
|
||||
$PostFX::HDRPostFX::radius = "5";
|
||||
$PostFX::HDRPostFX::enableDirt = "1";
|
||||
$PostFX::HDRPostFX::enableAutoExposure = "1";
|
||||
$PostFX::HDRPostFX::keyValue = 0.18;
|
||||
$PostFX::HDRPostFX::enableBloom = 1;
|
||||
$PostFX::HDRPostFX::threshold = 1;
|
||||
$PostFX::HDRPostFX::intensity = 1;
|
||||
$PostFX::HDRPostFX::radius = "4";
|
||||
$PostFX::HDRPostFX::enableDirt = 1;
|
||||
$PostFX::HDRPostFX::dirtScale = 2048;
|
||||
$PostFX::HDRPostFX::dirtIntensity = "1";
|
||||
$PostFX::HDRPostFX::dirtImage = "Core_PostFX:lensDirt_image";
|
||||
$PostFX::HDRPostFX::dirtEdgeMinDist = "0.0218579229";
|
||||
$PostFX::HDRPostFX::dirtEdgeMaxDist = "0.0546448082";
|
||||
$PostFX::HDRPostFX::dirtEdgeMinVal = "0.0437158458";
|
||||
$PostFX::VignettePostFX::Enabled = "1";
|
||||
$PostFX::VignettePostFX::VMin = 0.2;
|
||||
$PostFX::VignettePostFX::VMax = "0.9";
|
||||
$PostFX::VignettePostFX::Color = "0 0 0 1";
|
||||
$PostFX::HDRPostFX::dirtIntensity = 2;
|
||||
$PostFX::HDRPostFX::dirtImage = "core/postFX/images/lensDirt.png";
|
||||
$PostFX::HDRPostFX::dirtEdgeMinDist = 0.125;
|
||||
$PostFX::HDRPostFX::dirtEdgeMaxDist = 0.75;
|
||||
$PostFX::HDRPostFX::dirtEdgeMinVal = 0.05;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ void main()
|
|||
}
|
||||
|
||||
#ifdef USE_SSAO_MASK
|
||||
float ssao = 1.0 - texture( ssaoMask, viewportCoordToRenderTarget( IN_uv0.xy, rtParams6 ) ).r;
|
||||
float ssao = 1.0 - texture( ssaoMask, viewportCoordToRenderTarget( IN_uv0.xy, rtParams7 ) ).r;
|
||||
surface.ao = min(surface.ao, ssao);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
}
|
||||
|
||||
#ifdef USE_SSAO_MASK
|
||||
float ssao = 1.0 - TORQUE_TEX2D( ssaoMask, viewportCoordToRenderTarget( IN.uv0.xy, rtParams6 ) ).r;
|
||||
float ssao = 1.0 - TORQUE_TEX2D( ssaoMask, viewportCoordToRenderTarget( IN.uv0.xy, rtParams7 ) ).r;
|
||||
surface.ao = min(surface.ao, ssao);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ function loadAssetsByType(%assetType)
|
|||
}
|
||||
}
|
||||
|
||||
function SimSet::getModulePath(%scopeSet)
|
||||
function ModuleRoot::getModulePath(%scopeSet)
|
||||
{
|
||||
%name = %scopeSet.getName();
|
||||
%moduleDef = ModuleDatabase.findModule(%name);
|
||||
|
|
@ -115,7 +115,7 @@ function SimSet::getModulePath(%scopeSet)
|
|||
return "";
|
||||
}
|
||||
|
||||
function SimSet::registerDatablock(%scopeSet, %datablockFilePath, %isExclusive)
|
||||
function ModuleRoot::registerDatablock(%scopeSet, %datablockFilePath, %isExclusive)
|
||||
{
|
||||
if ($traceModuleCalls)
|
||||
warn("SimSet::registerDatablock");
|
||||
|
|
@ -171,7 +171,7 @@ function SimSet::registerDatablock(%scopeSet, %datablockFilePath, %isExclusive)
|
|||
DatablockFilesList.echo();
|
||||
}
|
||||
|
||||
function SimSet::unRegisterDatablock(%scopeSet, %datablockFilePath)
|
||||
function ModuleRoot::unRegisterDatablock(%scopeSet, %datablockFilePath)
|
||||
{
|
||||
if ($traceModuleCalls)
|
||||
warn("SimSet::unRegisterDatablock");
|
||||
|
|
@ -215,7 +215,7 @@ function SimSet::unRegisterDatablock(%scopeSet, %datablockFilePath)
|
|||
DatablockFilesList.echo();
|
||||
}
|
||||
|
||||
function SimSet::queueExec(%scopeSet, %execFilePath, %isExclusive)
|
||||
function ModuleRoot::queueExec(%scopeSet, %execFilePath, %isExclusive)
|
||||
{
|
||||
if ($traceModuleCalls)
|
||||
warn("SimSet::queueExec");
|
||||
|
|
@ -272,7 +272,7 @@ function SimSet::queueExec(%scopeSet, %execFilePath, %isExclusive)
|
|||
%execFileList.echo();
|
||||
}
|
||||
|
||||
function SimSet::unQueueExec(%scopeSet, %execFilePath)
|
||||
function ModuleRoot::unQueueExec(%scopeSet, %execFilePath)
|
||||
{
|
||||
if ($traceModuleCalls)
|
||||
warn("SimSet::unRegisterDatablock");
|
||||
|
|
@ -317,3 +317,10 @@ function SimSet::unQueueExec(%scopeSet, %execFilePath)
|
|||
%execFileList.echo();
|
||||
}
|
||||
|
||||
function ModuleRoot::GetEventManager(%scopeSet)
|
||||
{
|
||||
if( !isObject( %scopeSet.eventManager ) )
|
||||
%scopeSet.eventManager = new EventManager() { queue = "ModuleEventManager"; };
|
||||
|
||||
return %scopeSet.eventManager;
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
$PostFX::HDRPostFX::Enabled = 1;
|
||||
$PostFX::HDRPostFX::exposureValue = 1.5;
|
||||
$PostFX::HDRPostFX::whitePoint = 2.5;
|
||||
$PostFX::HDRPostFX::exposureValue = 1;
|
||||
$PostFX::HDRPostFX::whitePoint = 1;
|
||||
$PostFX::HDRPostFX::logContrast = 1;
|
||||
$PostFX::HDRPostFX::saturationValue = 1;
|
||||
$PostFX::HDRPostFX::colorFilter = "1.0 1.0 1.0";
|
||||
|
|
@ -11,8 +11,8 @@ $PostFX::HDRPostFX::tonemapMode = "ACES";
|
|||
$PostFX::HDRPostFX::enableAutoExposure = "0";
|
||||
$PostFX::HDRPostFX::keyValue = 0.18;
|
||||
$PostFX::HDRPostFX::enableBloom = 1;
|
||||
$PostFX::HDRPostFX::threshold = 1.25;
|
||||
$PostFX::HDRPostFX::intensity = 0.25;
|
||||
$PostFX::HDRPostFX::threshold = 1;
|
||||
$PostFX::HDRPostFX::intensity = 1;
|
||||
$PostFX::HDRPostFX::radius = 4;
|
||||
$PostFX::HDRPostFX::enableDirt = 1;
|
||||
$PostFX::HDRPostFX::dirtScale = 2048;
|
||||
|
|
|
|||
|
|
@ -828,7 +828,7 @@ function OptionsMenuSettingsList::addOptionRow(%this, %label, %targetPrefVar, %o
|
|||
%enabled = true;
|
||||
|
||||
%optionsRowSize = 30;
|
||||
%optionColumnWidth = %this.extent.x * 0.3;//todo, calculate off longest option text?
|
||||
%optionColumnWidth = %this.extent.x * 0.5;//todo, calculate off longest option text?
|
||||
|
||||
%option = new GuiGameSettingsCtrl() {
|
||||
class = "MenuOptionsButton";
|
||||
|
|
@ -936,7 +936,7 @@ function OptionsMenuSettingsList::addSliderRow(%this, %label, %targetPrefVar, %i
|
|||
%enabled = true;
|
||||
|
||||
%optionsRowSize = 30;
|
||||
%optionColumnWidth = %this.extent.x - 450;//todo, calculate off longest option text?
|
||||
%optionColumnWidth = %this.extent.x * 0.5;//todo, calculate off longest option text?
|
||||
|
||||
%option = new GuiGameSettingsCtrl() {
|
||||
class = "MenuOptionsButton";
|
||||
|
|
@ -965,7 +965,7 @@ function OptionsMenuSettingsList::addKeybindRow(%this, %label, %bitmapName, %cal
|
|||
%enabled = true;
|
||||
|
||||
%optionsRowSize = 40;
|
||||
%optionColumnWidth = %this.extent.x - 450;
|
||||
%optionColumnWidth = %this.extent.x * 0.5;//todo, calculate off longest option text?
|
||||
|
||||
%option = new GuiGameSettingsCtrl() {
|
||||
class = "MenuOptionsButton";
|
||||
|
|
|
|||
|
|
@ -1,121 +1,77 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(RemapDlg) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiContainer(RemapPanel) {
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "162 352";
|
||||
extent = "700 64";
|
||||
minExtent = "8 2";
|
||||
position = "162 332";
|
||||
extent = "700 104";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiInputCtrl(OptRemapInputCtrl) {
|
||||
lockMouse = "0";
|
||||
position = "480 0";
|
||||
extent = "64 64";
|
||||
extent = "64 104";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiInputCtrlProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiChunkedBitmapCtrl() {
|
||||
bitmapAsset = "UI:hudfill_image";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
position = "0 0";
|
||||
extent = "700 64";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
new GuiControl(RemapBoxCtrl) {
|
||||
position = "-1 1";
|
||||
extent = "701 102";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Press escape to cancel";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "247 34";
|
||||
extent = "242 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Re-bind \"\" to...";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "177 8";
|
||||
extent = "384 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "OptRemapText";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapBarCtrl() {
|
||||
BitmapAsset = "UI:panel_image";
|
||||
extent = "701 40";
|
||||
horizSizing = "width";
|
||||
profile = "GuiDefaultProfile";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiBitmapBarCtrl() {
|
||||
BitmapAsset = "UI:panel_low_image";
|
||||
position = "0 40";
|
||||
extent = "701 341";
|
||||
horizSizing = "width";
|
||||
profile = "GuiDefaultProfile";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Press escape to cancel";
|
||||
maxLength = "255";
|
||||
position = "260 67";
|
||||
extent = "181 23";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "MenuMLSubHeaderTextCenter";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Re-bind \"Forward\" to...";
|
||||
maxLength = "255";
|
||||
position = "259 40";
|
||||
extent = "184 23";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "center";
|
||||
vertSizing = "height";
|
||||
profile = "MenuMLSubHeaderTextCenter";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
internalName = "OptRemapText";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -205,12 +205,13 @@ function controlSetChanged()
|
|||
fillRemapList();
|
||||
}
|
||||
|
||||
function doKeyRemap( %rowIndex )
|
||||
function doKeyRemap( %row )
|
||||
{
|
||||
%rowIndex = %row.getParent().getObjectIndex(%row);
|
||||
%rowIndex--; //Offset the rowIndex to account for controlset option
|
||||
%name = $RemapName[%rowIndex];
|
||||
|
||||
RemapDlg-->OptRemapText.setValue( "Re-bind \"" @ %name @ "\" to..." );
|
||||
RemapDlg-->OptRemapText.text = "Re-bind \"" @ %name @ "\" to..." ;
|
||||
OptRemapInputCtrl.index = %rowIndex;
|
||||
Canvas.pushDialog( RemapDlg );
|
||||
|
||||
|
|
@ -223,7 +224,7 @@ function doKeyRemap( %rowIndex )
|
|||
function ControlsMenuRebindButton::onClick(%this)
|
||||
{
|
||||
%name = $RemapName[%this.keybindIndex];
|
||||
RemapDlg-->OptRemapText.setValue( "Re-bind \"" @ %name @ "\" to..." );
|
||||
RemapDlg-->OptRemapText.text = "Re-bind \"" @ %name @ "\" to..." ;
|
||||
|
||||
OptRemapInputCtrl.index = %this.keybindIndex;
|
||||
OptRemapInputCtrl.optionIndex = %this.optionIndex;
|
||||
|
|
@ -305,16 +306,12 @@ function OptRemapInputCtrl::onInputEvent( %this, %device, %action )
|
|||
%prevCmdName = $RemapName[%prevMapIndex];
|
||||
Canvas.pushDialog( RemapConfirmDlg );
|
||||
|
||||
RemapConfirmationText.setText("\"" @ %mapName @ "\" is already bound to \""
|
||||
@ %prevCmdName @ "\"! Do you wish to replace this mapping?");
|
||||
RemapConfirmationYesButton.command = "redoMapping(" @ %device @ ", " @ %actionMap @ ", \"" @ %action @ "\", \"" @
|
||||
%remapWarnText = "\"" @ %mapName @ "\" is already bound to \"" @ %prevCmdName @ "\"! Do you wish to replace this mapping?";
|
||||
%doRemapCommand = "redoMapping(" @ %device @ ", " @ %actionMap @ ", \"" @ %action @ "\", \"" @
|
||||
%cmd @ "\", " @ %prevMapIndex @ ", " @ %this.index @ "); Canvas.popDialog();";
|
||||
RemapConfirmationNoButton.command = "Canvas.popDialog();";
|
||||
%cancelCommand = "Canvas.popDialog();";
|
||||
|
||||
/*MessageBoxYesNo( "Warning",
|
||||
"\"" @ %mapName @ "\" is already bound to \""
|
||||
@ %prevCmdName @ "\"!\nDo you wish to replace this mapping?",
|
||||
%callback, "" );*/
|
||||
MessageBoxYesNo( "Key already in use", %remapWarnText, %doRemapCommand, %cancelCommand );
|
||||
}
|
||||
|
||||
function findRemapCmdIndex( %command )
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@ new GuiControlProfile(MenuMLSubHeaderText)
|
|||
autoSizeHeight = true;
|
||||
};
|
||||
|
||||
new GuiControlProfile(MenuMLSubHeaderTextCenter : MenuMLSubHeaderText)
|
||||
{
|
||||
justify = "center";
|
||||
};
|
||||
|
||||
if( !isObject( GuiMenuButtonProfile ) )
|
||||
new GuiControlProfile( GuiMenuButtonProfile )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,26 +22,31 @@
|
|||
|
||||
project(lpng)
|
||||
|
||||
# addDef(PNG_NO_ASSEMBLER_CODE)
|
||||
|
||||
# Enables NEON for libpng
|
||||
if ( TORQUE_CPU_ARM32 OR TORQUE_CPU_ARM64 )
|
||||
set(PNG_ARM_NEON on CACHE STRING "")
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=1)
|
||||
if (APPLE AND TORQUE_MACOS_UNIVERSAL_BINARY)
|
||||
addPath("${libDir}/lpng/arm")
|
||||
else()
|
||||
set(PNG_ARM_NEON off CACHE STRING "")
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
||||
endif()
|
||||
|
||||
# Enables SSE for libpng - also takes care of compiler warnings.
|
||||
if ( TORQUE_CPU_X32 OR TORQUE_CPU_X64 )
|
||||
set(PNG_INTEL_SSE on CACHE STRING "")
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=1)
|
||||
addPath("${libDir}/lpng/intel")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_PER_ARCH_CFLAGS_x86_64 "-DPNG_INTEL_SSE_OPT=1 -DPNG_ARM_NEON_OPT=0")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_PER_ARCH_CFLAGS_arm64 "-DPNG_ARM_NEON_OPT=1 -DPNG_INTEL_SSE_OPT=0")
|
||||
else()
|
||||
set(PNG_INTEL_SSE off CACHE STRING "")
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=0)
|
||||
# Enables NEON for libpng
|
||||
if ( TORQUE_CPU_ARM32 OR TORQUE_CPU_ARM64 )
|
||||
set(PNG_ARM_NEON on CACHE STRING "" FORCE)
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=1)
|
||||
addPath("${libDir}/lpng/arm")
|
||||
else()
|
||||
set(PNG_ARM_NEON off CACHE STRING "" FORCE)
|
||||
add_definitions(-DPNG_ARM_NEON_OPT=0)
|
||||
endif()
|
||||
|
||||
# Enables SSE for libpng - also takes care of compiler warnings.
|
||||
if ( TORQUE_CPU_X32 OR TORQUE_CPU_X64 )
|
||||
set(PNG_INTEL_SSE on CACHE STRING "" FORCE)
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=1)
|
||||
addPath("${libDir}/lpng/intel")
|
||||
else()
|
||||
set(PNG_INTEL_SSE off CACHE STRING "" FORCE)
|
||||
add_definitions(-DPNG_INTEL_SSE_OPT=0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(PNG_INTEL_SSE)
|
||||
|
|
@ -50,3 +55,4 @@ mark_as_advanced(PNG_ARM_NEON)
|
|||
addInclude(${libDir}/zlib)
|
||||
|
||||
finishLibrary("${libDir}/${PROJECT_NAME}")
|
||||
|
||||
|
|
|
|||
|
|
@ -742,14 +742,14 @@ if (APPLE AND NOT IOS)
|
|||
# Detect architecture if not using universal
|
||||
if (TORQUE_MACOS_UNIVERSAL_BINARY)
|
||||
set(ARCHITECTURE_STRING_APPLE "x86_64;arm64")
|
||||
set(DEPLOYMENT_TARGET_APPLE "10.13")
|
||||
set(DEPLOYMENT_TARGET_APPLE "10.14")
|
||||
else()
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
|
||||
set(ARCHITECTURE_STRING_APPLE "arm64")
|
||||
set(DEPLOYMENT_TARGET_APPLE "11.0")
|
||||
else()
|
||||
set(ARCHITECTURE_STRING_APPLE "x86_64")
|
||||
set(DEPLOYMENT_TARGET_APPLE "10.9")
|
||||
set(DEPLOYMENT_TARGET_APPLE "10.14")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue