Author Topic: MOTD like the ASSMOD one  (Read 4805 times)

0 Members and 1 Guest are viewing this topic.

Offline riki137

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
  • lol wuttermelon
    • SapphireWebsites
MOTD like the ASSMOD one
« on: June 08, 2010, 05:50:03 AM »
I think most important to make able that people can't close it after 0.0ms of loading.
Let's make configurable 3 seconds when "Close" button will appear.
Also with darker background it will look nice.
I dont want to use ASSMod since i like ULX much more, but adding ASSMod just for a motd is weird and bad.
People aren't reading what contains MOTD.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: MOTD like the ASSMOD one
« Reply #1 on: June 08, 2010, 02:56:02 PM »
The colors of the motd are controlled by you. Edit your ulx_motd.txt to contain html color tags and you can set it to any color you want.
As for the delayed button, it's a decent idea and been suggested before. Perhaps it will be done sometime.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline riki137

  • Newbie
  • *
  • Posts: 44
  • Karma: 0
  • lol wuttermelon
    • SapphireWebsites
Re: MOTD like the ASSMOD one
« Reply #2 on: June 18, 2010, 09:24:50 AM »
i mean dark blured background.
and i will be so happy when the delayed button willl be since nobody is reading motd :(

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: MOTD like the ASSMOD one
« Reply #3 on: June 18, 2010, 06:07:24 PM »
i mean dark blured background.
That's what I'm saying. Learn html. Put it in your motd. Change any color you want. Foreground. Background. Text. Whatever.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline jay209015

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 934
  • Karma: 62
    • Dev-Solutions
Re: MOTD like the ASSMOD one
« Reply #4 on: June 18, 2010, 07:06:52 PM »
I think he's talking about outside of the HTML window. It blurs the everything but the MOTD.
An error only becomes a mistake when you refuse to correct it. --JFK

"And thus the downfall of the great ULX dynasty was wrought not by another dynasty, but the slow and steady deterioration of the leaders themselves, followed by the deprecation of the great knowledge they possessed." -Gmod, Chapter 28, verse 34 -- Stickly

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: MOTD like the ASSMOD one
« Reply #5 on: June 18, 2010, 07:17:20 PM »
That's an easy few lines of code:

In ulx\lua\ulx\modules\cl\motdmenu.lua:

Find this piece of code at line 16:
Code: [Select]
window:MakePopup()Then add these lines beneath it:
Code: [Select]
window:SetBackgroundBlur( true )
window:SetDrawOnTop( true )
window:DoModal()

:SetBackgroundBlur is the only thing you really need for the blur effect, the other lines of code just make it so it's always on top, and that you can't switch to any other VGUI/Derma menus.
« Last Edit: June 18, 2010, 09:05:40 PM by Stickly Man! »
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: MOTD like the ASSMOD one
« Reply #6 on: June 18, 2010, 09:45:00 PM »
I think he's talking about outside of the HTML window. It blurs the everything but the MOTD.
OH!
[sarcasm] Then why didn't he say so! [/sarcasm]

Actually though, a bit more detail like "around the html box, the rest of the game/world/map image is blurred to not be seen" would have been helpful for me.

Stick, is it really "Modal" and not "Model"?
(I'm not the derma master like you...just askin!) :P
« Last Edit: June 18, 2010, 09:47:20 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: MOTD like the ASSMOD one
« Reply #7 on: June 18, 2010, 10:08:41 PM »
Yup: http://luabin.foszor.com/code/addons/derma/lua/derma/derma_utils.lua#89
(That's the code for Derma_Message(), which makes a quick blurred popup that you see in gmod) :P

More info: http://wiki.garrysmod.com/?title=Panel.DoModal
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6