Lobby Menu Improvements (#9246)

The lobby menu now fades in and out smoothly.
    Removes the old background object which was left in by accident.
    The buttons now get bigger when you mouse over them. Responsiveness!
This commit is contained in:
MarinaGryphon
2020-07-04 00:51:29 +03:00
committed by GitHub
parent 36fbc59ad8
commit 546b70652e
8 changed files with 74 additions and 39 deletions
@@ -134,7 +134,6 @@ var/datum/controller/subsystem/atlas/SSatlas
/datum/controller/subsystem/atlas/proc/load_map_meta()
// This needs to be done after current_map is set, but before mapload.
lobby_image = new /obj/effect/lobby_image
admin_departments = list(
"[current_map.boss_name]",
+1 -34
View File
@@ -1,26 +1,3 @@
/var/obj/effect/lobby_image
/obj/effect/lobby_image
name = "Aurorastation"
desc = "This shouldn't be read"
icon = 'icons/misc/title.dmi'
screen_loc = "WEST,SOUTH"
/obj/effect/lobby_image/New()
..()
if (current_map.lobby_icon)
icon = current_map.lobby_icon
var/list/known_icon_states = icon_states(icon)
for(var/lobby_screen in current_map.lobby_screens)
if(!(lobby_screen in known_icon_states))
error("Lobby screen '[lobby_screen]' did not exist in the icon set [icon].")
current_map.lobby_screens -= lobby_screen
if(current_map.lobby_screens.len)
icon_state = pick(current_map.lobby_screens)
else
icon_state = known_icon_states[1]
/mob/abstract/new_player
var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled
@@ -37,7 +14,6 @@
mind.current = src
loc = null
show_title()
my_client = client
sight |= SEE_TURFS
@@ -45,13 +21,4 @@
spawn(40)
if(client)
client.playtitlemusic()
/mob/abstract/new_player/proc/show_title()
set waitfor = FALSE
if (lobby_image)
client.screen += lobby_image
return
sleep(5)
.()
client.playtitlemusic()
@@ -3,7 +3,6 @@
// see login.dm
if(my_client)
my_client.screen -= lobby_image
my_client = null
..()
+27 -2
View File
@@ -51,6 +51,7 @@
/obj/screen/new_player/title
name = "Title"
screen_loc = "WEST,SOUTH"
var/lobby_index = 1
/obj/screen/new_player/title/Initialize()
icon = current_map.lobby_icon
@@ -61,12 +62,32 @@
current_map.lobby_screens -= lobby_screen
if(length(current_map.lobby_screens))
icon_state = pick(current_map.lobby_screens)
if(current_map.lobby_transitions && isnum(current_map.lobby_transitions))
icon_state = current_map.lobby_screens[lobby_index]
if(Master.initializing)
spawn(current_map.lobby_transitions)
Update()
else
addtimer(CALLBACK(src, .proc/Update), current_map.lobby_transitions, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_OVERRIDE)
else
icon_state = pick(current_map.lobby_screens)
else
icon_state = known_icon_states[1]
icon_state = LAZYACCESS(known_icon_states, 1)
. = ..()
/obj/screen/new_player/title/proc/Update()
lobby_index += 1
if (lobby_index > length(current_map.lobby_screens))
lobby_index = 1
animate(src, alpha = 0, time = 1 SECOND)
animate(alpha = 255, icon_state = current_map.lobby_screens[lobby_index], time = 1 SECOND)
if(Master.initializing)
spawn(current_map.lobby_transitions)
Update()
else
addtimer(CALLBACK(src, .proc/Update), current_map.lobby_transitions, TIMER_UNIQUE | TIMER_CLIENT_TIME | TIMER_OVERRIDE)
/obj/screen/new_player/selection/join_game
name = "Join Game"
icon_state = "unready"
@@ -105,10 +126,14 @@
/obj/screen/new_player/selection/MouseEntered(location,control,params) //Yellow color for the font
color = "#ffb200"
var/matrix/M = matrix()
M.Scale(1.1, 1.1)
animate(src, transform = M, time = 1, easing = CUBIC_EASING)
return ..()
/obj/screen/new_player/selection/MouseExited(location,control,params)
color = null
animate(src, transform = null, time = 1, easing = CUBIC_EASING)
return ..()
/obj/screen/new_player/selection/join_game/New(var/datum/hud/H)
+43
View File
@@ -0,0 +1,43 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: MoondancerPony
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- rscadd: "Makes the lobby screen fade smoothly."
- rscadd: "Makes the lobby buttons bigger when you mouse over them."
- rscdel: "Removed the old lobby background which was left in by accident."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 KiB

After

Width:  |  Height:  |  Size: 50 KiB

+1
View File
@@ -66,6 +66,7 @@
var/lobby_icon // The icon which contains the lobby image(s)
var/list/lobby_screens = list("title") // The list of lobby screen to pick() from. If left unset the first icon state is always selected.
var/lobby_transitions = FALSE // If a number, transition between the lobby screens with this delay instead of picking just one.
var/use_overmap = FALSE //If overmap should be used (including overmap space travel override)
var/overmap_size = 20 //Dimensions of overmap zlevel if overmap is used.
+2 -1
View File
@@ -8,7 +8,8 @@
path = "aurora"
lobby_icon = 'icons/misc/aurora.dmi'
lobby_screens = list("corp_titles")
lobby_screens = list("nanotrasen", "idris", "hephaestus", "zavodskoi")
lobby_transitions = 10 SECONDS
station_levels = list(2, 3, 4, 5, 6, 7)
admin_levels = list(1)