Cannot find an entry in there that deals with camera pan or even if middle mouse button is assigned to anything. Even dug up the old SupCom manual to see if it lists the middle mouse button as that function (it doesn’t).
What is also weird is that if I start FA retail version, the middle button works fine. It actually does both functions (rotate template and pan the camera) at the same time. I think the recent update may have broken something.
What is also weird is that GAZ_UI is no longer listed on my FAF version Mod Manager. There is just no entry. The mod folder is installed in the right place and I am able to select the mod under the FA retail version. The recent update must somehow block that from being displayed. That is something that should not be done, it sets a bad precedent.
Back to the issue at hand, here is the code that is in GAZ_UI for the template rotator.
GAZ_UI\hook\lua\ui\game\construction.lua , line 286
- Code: Select all
--template rotator
if options.gui_template_rotator != 0 then
local oldOnClickHandler = OnClickHandler
function OnClickHandler(button, modifiers)
oldOnClickHandler(button, modifiers)
local item = button.Data
if item.type == "templates" then
local activeTemplate = item.template.templateData
local worldview = import('/lua/ui/game/worldview.lua').viewLeft
local oldHandleEvent = worldview.HandleEvent
worldview.HandleEvent = function(self, event)
if event.Type == 'ButtonPress' then
if event.Modifiers.Middle then
ClearBuildTemplates()
local tempTemplate = table.deepcopy(activeTemplate)
for i = 3, table.getn(activeTemplate) do
local index = i
activeTemplate[index][3] = 0 - tempTemplate[index][4]
activeTemplate[index][4] = tempTemplate[index][3]
end
SetActiveBuildTemplate(activeTemplate)
elseif event.Modifiers.Shift then
else
worldview.HandleEvent = oldHandleEvent
end
end
end
end
end
end
Where this is implemented in FAF is as follows,
faforever.nxt\lua\ui\game\construction.lua , line 1310
- Code: Select all
elseif item.type == 'templates' then
ClearBuildTemplates()
if modifiers.Right then
if button.OptionMenu then
button.OptionMenu:Destroy()
button.OptionMenu = nil
else
button.OptionMenu = CreateTemplateOptionsMenu(button)
end
for _, otherBtn in controls.choices.Items do
if button != otherBtn and otherBtn.OptionMenu then
otherBtn.OptionMenu:Destroy()
otherBtn.OptionMenu = false
end
end
else
import('/lua/ui/game/commandmode.lua').StartCommandMode('build', {name=item.template.templateData[3][1]})
SetActiveBuildTemplate(item.template.templateData)
end
if options.gui_template_rotator != 0 then
local item = button.Data
local activeTemplate = item.template.templateData
local worldview = import('/lua/ui/game/worldview.lua').viewLeft
local oldHandleEvent = worldview.HandleEvent
worldview.HandleEvent = function(self, event)
if event.Type == 'ButtonPress' then
if event.Modifiers.Middle then
ClearBuildTemplates()
local tempTemplate = table.deepcopy(activeTemplate)
for i = 3, table.getn(activeTemplate) do
local index = i
activeTemplate[index][3] = 0 - tempTemplate[index][4]
activeTemplate[index][4] = tempTemplate[index][3]
end
SetActiveBuildTemplate(activeTemplate)
elseif event.Modifiers.Shift then
else
worldview.HandleEvent = oldHandleEvent
end
end
end
end
In the FAF file, it is within an if..elseif where it begins on line 1194. Perhaps there is an issue with the condition.
Does your template rotate via middle mouse button work Anaryl?