Popup Notifications

Popup notifications that can be created by admins and other plugins

Total Downloads: 9,350 - First Release: Jul 22, 2015 - Last Update: Feb 18, 2018

5/5, 30 likes
  1. Its still working...
     
    Last edited by a moderator: Sep 16, 2016
  2. Wulf

    Wulf Community Admin

    It's been unmaintained for quite a few months, just not marked.

    Not officially, which is why it gets marked.
     
  3. k1lly0u updated Popup Notifications with a new update entry:

    0.1.0

     
  4. How do you do a multi-line message from the console?

    When I do this --> popupmsg.toplayer "message \n to \n you" "xxooxx" 60

    I get a multi-line message but the slash "\" from the "\n" shows ( see image )
     

    Attached Files:

  5. Better would be here to use the Hook method for "CreatePopupNotification"..the commandline input for the console command in'st really able to interprete such an approach a this command.
     
  6. Hi, i have a problem with your plugin:

    Code:
    03:47 [Error] Failed to call hook 'CreatePopupNotification' on plugin 'PopupNotifications v0.1.0' (NullReferenceException: Object reference not set to an instance of an object)
    03:47 [Debug]   at Oxide.Plugins.PopupNotifications+Notifier.GetEmptySlot () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PopupNotifications+Notifier.CreateNotification (System.String message, Single showDuration) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PopupNotifications.CreatePopupOnPlayer (System.String message, .BasePlayer player, Single duration) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PopupNotifications.CreatePopupNotification (System.String message, .BasePlayer player, Single duration) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PopupNotifications.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 
     
  7. It is possible to color the text?
     
  8. Just add color tags.
     
  9. killyou
    is possible to get out the X of close of the windows?
     
  10. I'll edit for you when I get to my PC.
     
  11. :)
    thanks friend
    I tried commenting with // some functions on the .cs but I ruined all :p


    By the way,
    the X seems to be CLICKABLE, can you click on that? or just looking
     
  12. You click it to close the popup
     
  13. That's the point of it. Not sure why you want to remove it, but it should be easy.
     
  14. how you click, I have not mouse pointer in-game if im not in the inventory

    I use the Popup just for announce the Kill feed
     
    Last edited by a moderator: Oct 26, 2016
  15. Open chat to activate mouse pointer
     
  16. oww, yes, I dont chat too much!
    Anyway, I want to delete the X, I will be touching the code a little, thanks!

    Im trying to add Shadows under the letters for better see on bright scenarios

    PS: Click on the X dont work for me, I have BetterChat and InfoPanel too... maybe a conflict?


    --------------------------
    BY THE WAY Killyou
    Is possible to translate SkipNightVote?
    I put this on lang/xx
    with correct SkipNightVote.json
    with this strings, but are not loaded:

    Code:
    {
      "noPollOpen": "No hay votación abierta en este momento",
      "alreadyVoted": "You have already voted once.",
      "voteProgress": "Vote progress: {0} / {1} ({2}%/{3}%)",
      "voteOpenTime": "Night time skip vote is now open for {0} minute(s).",
      "voteSuccessful": "Vote was successful, it will be daytime soon.",
      "voteFailed": "Vote failed, not enough players voted to skip night time.",
      "voteReOpenTime": "Vote will re-open in {0} minute(s).",
      "voteNow": "Type <color=#FF2211>/voteday</color> now to skip night time."
    }
    SOrry the offtopic
     
    Last edited by a moderator: Oct 26, 2016
  17. I commented this part

    Code:
                // NewElement.Add(new CuiElement
                //{
                //    Name = buttonName,
                //    Parent = panelName,
                //    Components =
                //        {
                //            new CuiButtonComponent {Command = $"popupmsg.close {slot}", Color = "1.0 0.3 0.0 0.5", FadeIn = 0.3f, ImageType = UnityEngine.UI.Image.Type.Tiled },
                //            new CuiRectTransformComponent {AnchorMin = "0.89 0.79", AnchorMax = "0.99 0.99" }
                //        },
                 //   FadeOut = config.FadeTime
                //});
    and I replaced the X with a SPace:
    Code:
    new CuiTextComponent {Text = " "
    works
    but I want to add shadow behind the text like the chat because is not very clear
     
  18. Code:
    NewElement.Add(new CuiElement
                {
                    Name = CuiHelper.GetGuid(),
                    Parent = panelName,
                    Components =
                        {
                            new CuiTextComponent {Text = text, Align = TextAnchor.MiddleCenter, FontSize = 14 },
                            new CuiOutlineComponent { Distance = "0.1 0.1", Color = "0 0 0 1"}, // <<< This is the closest you will get to a shadow. Play with it
                            new CuiRectTransformComponent { AnchorMin = "0 0", AnchorMax = "1 1" }
                        },
                    FadeOut = config.FadeTime
                });
     
  19. thanks Kill

    this is the most close that Im looking for:

    Code:
      NewElement.Add(new CuiElement
      {
      Name = CuiHelper.GetGuid(),
      Parent = panelName,
      Components =
      {
      new CuiTextComponent {Text = text, Align = TextAnchor.MiddleCenter, FontSize = 13 },
      new CuiOutlineComponent { Distance = "0.5 1.0", Color = "0 0 0 1"}, // maybe a shadow
      new CuiRectTransformComponent { AnchorMin = "0 0", AnchorMax = "1 1" }
      },
      FadeOut = config.FadeTime
      });
      //var buttonName = CuiHelper.GetGuid();
      // NewElement.Add(new CuiElement
      //{
      //  Name = buttonName,
      //  Parent = panelName,
      //  Components =
      //  {
      //  new CuiButtonComponent {Command = $"popupmsg.close {slot}", Color = "1.0 0.3 0.0 0.5", FadeIn = 0.3f, ImageType = UnityEngine.UI.Image.Type.Tiled },
      //  new CuiRectTransformComponent {AnchorMin = "0.89 0.79", AnchorMax = "0.99 0.99" }
      //  },
      //  FadeOut = config.FadeTime
      //});
      //NewElement.Add(new CuiElement
      //{
      //  Name = CuiHelper.GetGuid(),
      //  Parent = buttonName,
      //  Components =
      //  {
      //  new CuiTextComponent {Text = " ", FadeIn = 0.3f, Align = TextAnchor.MiddleCenter, FontSize = 8  },
      //  new CuiRectTransformComponent {AnchorMin = "0 0", AnchorMax = "1 1" }
      //  },
      //  FadeOut = config.FadeTime
      //});
      return NewElement;
      }
      #endregion
    
    Is there the Part of the Close button correctly commented?

    and about shadow, I want something
    like the chat that seems to be a value like
    { Distance = "0.5 -1.0", Color = "0 0 0 1"}
    the negative value for an ofset but is not possible here, and the color black is fine, but you can not set something like "0 0 0 50" for take 50% of transparency ?? I can not get the trick here.
    [DOUBLEPOST=1477473566][/DOUBLEPOST]I think I get it

    "0 0 0 50" for take 50% of transparency
    needs to be "0 0 0 0.5"
    :D

    thanks!!!
     
  20. В каком файле можно поменять Текст сообщения?