Allow closing of notifications by clicking on them #617

Merged
merged 4 commits into from Aug 6, 2014

Projects

None yet

2 participants

@OzymandiasLlewellyn
Contributor

Adds a DoClick functions to notification icons made by notification/AddLegacy which changes the time left to display on the notification panel. Useful for when notifications might overlap GUI which is needs to be read or clicked on, but the entire panel is not clickable, which makes you less prone to accidentally close the panel.
Example: http://gyazo.com/15ebbcf7c769a127eee247ad49719c35.gif

@OzymandiasLlewellyn OzymandiasLlewellyn Allow closing of notifications by clicking on them
Adds a DoClick functions to notification icons made by notification/AddLegacy which changes the time left to display on the notification panel. Useful for when notifications might overlap GUI which is needs to be read or clicked on, but the entire panel is not clickable, which makes you less prone to accidentally close the panel.
Example: http://gyazo.com/15ebbcf7c769a127eee247ad49719c35.gif
337fc62
@robotboy655
Collaborator

Return back the Material() calls, it precaches the materials.

@OzymandiasLlewellyn
Contributor

Actually it causes an error because SetMaterial in this context calls SetImage which needs a string because it calls Material, for some reason DImage and DImageButton do not handle this the same

@robotboy655
Collaborator
@OzymandiasLlewellyn OzymandiasLlewellyn Added SetMaterial to DImageButton
from DImage
1d8193a
@OzymandiasLlewellyn OzymandiasLlewellyn Materials are now cached again
with DImageButton's inclusion of SetMaterial this now will work
fcade8f
@OzymandiasLlewellyn
Contributor

Like that I assume you mean?

@robotboy655
Collaborator
function PANEL:SetMaterial( Mat )
    self.m_Image:SetImage( Mat )
end
@OzymandiasLlewellyn
Contributor

You do realize that the original had PANEL.SetMaterial = PANEL.SetImage
and that SetImage was throwing the error because it wasn't expecting a Material.

@robotboy655
Collaborator

Oh crap, sorry, it's

function PANEL:SetMaterial( Mat )
    self.m_Image:SetMaterial( Mat )
end
@OzymandiasLlewellyn
Contributor

This pull got out of hand quickly / I am terrible at GitHub

@robotboy655 robotboy655 merged commit fdd418f into garrynewman:master Aug 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment