a request for someone who went to FAF coding school

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

a request for someone who went to FAF coding school

Postby SeraphimLeftNut » 17 May 2016, 21:02

-- AZ ADDITION
-- Rewrites Button.HandleEvent to trigger OnClick when the mouse is clicked, not released.
-- Makes construction feel more responsive and fixes "dropped clicks".
function CustomHandleEvent(self, event)
local eventHandled = false

if event.Type == 'MouseEnter' then
if self.mAltToggledFlag then
self:SetTexture(self.mAltHighlight)
else
self:SetTexture(self.mHighlight)
end
self:OnRolloverEvent('enter')
self:Play()
if self.mRolloverCue then
local sound = Sound({Cue = self.mRolloverCue, Bank = "Interface",})
PlaySound(sound)
end
self.mMouseOver = true
eventHandled = true
elseif event.Type == 'MouseExit' then
if self.mAltToggledFlag then
self:SetTexture(self.mAltNormal)
else
self:SetTexture(self.mNormal)
end
self:OnRolloverEvent('exit')
self:Play()
self.mMouseOver = false
eventHandled = true
elseif event.Type == 'ButtonPress' or event.Type == 'ButtonDClick' then
self:OnClick(event.Modifiers)
if self.mClickCue then
local sound = Sound({Cue = self.mClickCue, Bank = "Interface",})
PlaySound(sound)
end
self:Play()
eventHandled = true
end

return eventHandled
end

taken from azui mod
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: a request for someone who went to FAF coding school

Postby SeraphimLeftNut » 17 May 2016, 21:48

These "dropped clicks" that were obvious to people 7 years ago and which are now being ignored happen when you move the camera and mouse between the mousedown and mouseup events. You get missed clicks and wrongly placed clicks. All this ofcourse is exacerbated by shitty gpu drivers.
no ui lag: https://www.youtube.com/watch?v=3MdcVdL2kIY
I think this is going to be fun
User avatar
SeraphimLeftNut
Contributor
 
Posts: 975
Joined: 10 Jul 2012, 19:46
Has liked: 3 times
Been liked: 219 times
FAF User Name: TA4Life

Re: a request for someone who went to FAF coding school

Postby Exotic_Retard » 17 May 2016, 21:55

that moment you start making pull requests instead of forum threads the chances of your shit being fixed goes up by 34983945%

however for that the moon must first explode or soon(tm) must arrive or sth
User avatar
Exotic_Retard
Contributor
 
Posts: 1470
Joined: 21 Mar 2013, 22:51
Has liked: 557 times
Been liked: 626 times
FAF User Name: Exotic_Retard

Re: a request for someone who went to FAF coding school

Postby Morax » 18 May 2016, 21:21

Or more realistically, Exotic, Putin will make tea and crumpets with Obama while watching Jersey Shore re-runs on a cruise ship in the Florida Keys.
Maps and Modifications Councilor

M&M Discord Channel

Come join us and help create content with the artists of FAF.
User avatar
Morax
Councillor - Maps and Mods
 
Posts: 2865
Joined: 25 Jul 2014, 18:00
Has liked: 1167 times
Been liked: 662 times
FAF User Name: Morax


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest