mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 16:05:07 +00:00
Moves info buttons to the Escape menu (#91234)
## About The Pull Request This is my second contribution to the move towards removing the stat panel (first one being https://github.com/tgstation/tgstation/pull/90572 ) This moves the info buttons at the top right of the game's screen (Changelog, Rules, Wiki, etc) to the Escape menu, except for Fullscreen which is now a pref instead. This means you can set Fullscreen to be on permanently and every launch will automatically fullscreen you (the viewport will be a little off because it only fixes it once initialization is complete). This follows through rounds and auto updates if you set your game to fullscreen with the OOC button or F11, so players will learn about the pref after playing a round with fullscreen enabled. What the game now looks like ##### Alt ideas for sprites: Changelog can be a newspaper and Forums can be a newscaster https://github.com/user-attachments/assets/7871a226-1e0b-410d-a690-88f3616bebb0 This is something I wanted to do since the Esc menu was added but just never got around to it, but here it is. ## Why It's Good For The Game These buttons don't warrant being in the player's face 24/7 and since we've want to remove the stat panel and this has to be somewhere, I thought it would be a better fit in the Escape menu. It helps make the Esc menu the tool players use to access their OOC tools and overall I think improves the appearance of the game's screen to something more like an actual game would look like, especially when our comparison is SS14. ## Changelog 🆑 qol: Info buttons previously at the top right of your screen (Changelog, wiki, forums) is now in the Escape menu. qol: Fullscreen is now a preferences and will follow you through rounds. /🆑
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
screen_objects += screen_object
|
||||
client?.screen += screen_object
|
||||
return screen_object
|
||||
|
||||
/// Gives the screen object to the client, but does not qdel it when it's cleared
|
||||
/datum/screen_object_holder/proc/give_protected_screen_object(atom/screen_object)
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
protected_screen_objects += screen_object
|
||||
client?.screen += screen_object
|
||||
return screen_object
|
||||
|
||||
/datum/screen_object_holder/proc/remove_screen_object(atom/screen_object)
|
||||
ASSERT(istype(screen_object))
|
||||
@@ -40,6 +42,7 @@
|
||||
screen_objects -= screen_object
|
||||
protected_screen_objects -= screen_object
|
||||
client?.screen -= screen_object
|
||||
qdel(screen_object)
|
||||
|
||||
/datum/screen_object_holder/proc/clear()
|
||||
client?.screen -= screen_objects
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
/datum/config_entry/string/banappeals
|
||||
|
||||
/datum/config_entry/string/wikiurl
|
||||
default = "http://tgstation13.org/wiki"
|
||||
default = "https://wiki.tgstation13.org"
|
||||
|
||||
/datum/config_entry/string/forumurl
|
||||
default = "http://tgstation13.org/phpBB/index.php"
|
||||
|
||||
@@ -58,3 +58,6 @@
|
||||
|
||||
/datum/client_interface/proc/get_award_status(achievement_type, mob/user, value = 1)
|
||||
return FALSE
|
||||
|
||||
/datum/client_interface/proc/set_fullscreen(logging_in = FALSE)
|
||||
return TRUE
|
||||
|
||||
@@ -175,8 +175,6 @@
|
||||
/// Messages currently seen by this client
|
||||
var/list/seen_messages
|
||||
|
||||
//Hide top bars
|
||||
var/fullscreen = FALSE
|
||||
//Hide status bar (bottom left)
|
||||
var/show_status_bar = TRUE
|
||||
|
||||
|
||||
@@ -562,6 +562,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
loot_panel = new(src)
|
||||
|
||||
view_size = new(src, getScreenSize(prefs.read_preference(/datum/preference/toggle/widescreen)))
|
||||
set_fullscreen(logging_in = TRUE)
|
||||
view_size.resetFormat()
|
||||
view_size.setZoomMode()
|
||||
Master.UpdateTickRate()
|
||||
@@ -1200,8 +1201,18 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
set name = "Toggle Fullscreen"
|
||||
set category = "OOC"
|
||||
|
||||
fullscreen = !fullscreen
|
||||
var/is_on = prefs.read_preference(/datum/preference/toggle/fullscreen_mode)
|
||||
prefs.write_preference(GLOB.preference_entries[/datum/preference/toggle/fullscreen_mode], !is_on)
|
||||
set_fullscreen()
|
||||
|
||||
/client/proc/set_fullscreen(logging_in = FALSE)
|
||||
var/fullscreen = prefs?.read_preference(/datum/preference/toggle/fullscreen_mode)
|
||||
//no need to set every login to not fullscreen, they already aren't.
|
||||
//we also dont need to call attempt_auto_fit_viewport, Login does that for us.
|
||||
if(logging_in)
|
||||
if(fullscreen)
|
||||
winset(src, "mainwindow", "menu=;is-fullscreen=[fullscreen ? "true" : "false"]")
|
||||
return
|
||||
winset(src, "mainwindow", "menu=;is-fullscreen=[fullscreen ? "true" : "false"]")
|
||||
attempt_auto_fit_viewport()
|
||||
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/auto_fit_viewport/apply_to_client_updated(client/client, value)
|
||||
INVOKE_ASYNC(client, /client/verb/fit_viewport)
|
||||
INVOKE_ASYNC(client, TYPE_VERB_REF(/client, fit_viewport))
|
||||
|
||||
16
code/modules/client/preferences/screen.dm
Normal file
16
code/modules/client/preferences/screen.dm
Normal file
@@ -0,0 +1,16 @@
|
||||
/datum/preference/toggle/widescreen
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "widescreenpref"
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/widescreen/apply_to_client(client/client, value)
|
||||
client.view_size?.setDefault(getScreenSize(value))
|
||||
|
||||
/datum/preference/toggle/fullscreen_mode
|
||||
default_value = FALSE
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "fullscreen_mode"
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/fullscreen_mode/apply_to_client(client/client, value)
|
||||
client.set_fullscreen()
|
||||
@@ -1,7 +0,0 @@
|
||||
/datum/preference/toggle/widescreen
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "widescreenpref"
|
||||
savefile_identifier = PREFERENCE_PLAYER
|
||||
|
||||
/datum/preference/toggle/widescreen/apply_to_client(client/client, value)
|
||||
client.view_size?.setDefault(getScreenSize(value))
|
||||
@@ -418,7 +418,7 @@ ADMIN_VERB(reset_ooc_color, R_FUN, "Reset Player OOC Color", "Returns player OOC
|
||||
|
||||
/// Attempt to automatically fit the viewport, assuming the user wants it
|
||||
/client/proc/attempt_auto_fit_viewport()
|
||||
if (!prefs.read_preference(/datum/preference/toggle/auto_fit_viewport))
|
||||
if (!prefs?.read_preference(/datum/preference/toggle/auto_fit_viewport))
|
||||
return
|
||||
if(fully_created)
|
||||
INVOKE_ASYNC(src, VERB_REF(fit_viewport))
|
||||
|
||||
@@ -30,6 +30,8 @@ GLOBAL_LIST_EMPTY(escape_menus)
|
||||
|
||||
atom/movable/plane_master_controller/plane_master_controller
|
||||
|
||||
list/resource_panels
|
||||
show_resources = FALSE
|
||||
menu_page = PAGE_HOME
|
||||
|
||||
/datum/escape_menu/New(client/client)
|
||||
|
||||
@@ -53,6 +53,116 @@
|
||||
)
|
||||
)
|
||||
|
||||
//Bottom right buttons, from right to left, starting with the button to open the list.
|
||||
page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Resources",
|
||||
"Open/Close list of resources",
|
||||
/* pixel_offset = */ list(260, -190),
|
||||
CALLBACK(src, PROC_REF(toggle_resources)),
|
||||
/* button_overlay = */ "resources",
|
||||
))
|
||||
|
||||
/datum/escape_menu/proc/toggle_resources()
|
||||
show_resources = !show_resources
|
||||
if(!show_resources)
|
||||
//collapsing it
|
||||
for(var/atom/movable/screen/escape_menu/lobby_button/small/collapsible/button as anything in resource_panels)
|
||||
button.collapse(page_holder)
|
||||
resource_panels.Cut()
|
||||
return
|
||||
//list of offsets we give, so missing icons don't leave a random gap.
|
||||
var/list/offset_order = list(
|
||||
-60,
|
||||
-120,
|
||||
-180,
|
||||
-240,
|
||||
-300,
|
||||
-360,
|
||||
-420,
|
||||
-480,
|
||||
)
|
||||
resource_panels = list()
|
||||
|
||||
var/githuburl = CONFIG_GET(string/githuburl)
|
||||
if(githuburl)
|
||||
resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Report Bug",
|
||||
"Report a bug/issue",
|
||||
/* pixel_offset = */ list(260, -190),
|
||||
CALLBACK(client, TYPE_VERB_REF(/client, reportissue)),
|
||||
/* button_overlay = */ "bug",
|
||||
/* end_point */ offset_order[1],
|
||||
))
|
||||
offset_order -= offset_order[1]
|
||||
resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Github",
|
||||
"Open the repository for the game",
|
||||
/* pixel_offset = */ list(260, -190),
|
||||
CALLBACK(client, TYPE_VERB_REF(/client, github)),
|
||||
/* button_overlay = */ "github",
|
||||
/* end_point */ offset_order[1],
|
||||
))
|
||||
offset_order -= offset_order[1]
|
||||
|
||||
var/forumurl = CONFIG_GET(string/forumurl)
|
||||
if(forumurl)
|
||||
resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Forums",
|
||||
"Visit the server's forums",
|
||||
/* pixel_offset = */ list(260, -190),
|
||||
CALLBACK(client, TYPE_VERB_REF(/client, forum)),
|
||||
/* button_overlay = */ "forums",
|
||||
/* end_point */ offset_order[1],
|
||||
))
|
||||
offset_order -= offset_order[1]
|
||||
|
||||
var/rulesurl = CONFIG_GET(string/rulesurl)
|
||||
if(rulesurl)
|
||||
resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Rules",
|
||||
"View the server rules",
|
||||
/* pixel_offset = */ list(260, -190),
|
||||
CALLBACK(client, TYPE_VERB_REF(/client, rules)),
|
||||
/* button_overlay = */ "rules",
|
||||
/* end_point */ offset_order[1],
|
||||
))
|
||||
offset_order -= offset_order[1]
|
||||
|
||||
var/wikiurl = CONFIG_GET(string/wikiurl)
|
||||
if(wikiurl)
|
||||
resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Wiki",
|
||||
"See the wiki for the game",
|
||||
/* pixel_offset = */ list(260, -190),
|
||||
CALLBACK(client, TYPE_VERB_REF(/client, wiki)),
|
||||
/* button_overlay = */ "wiki",
|
||||
/* end_point */ offset_order[1],
|
||||
))
|
||||
offset_order -= offset_order[1]
|
||||
|
||||
resource_panels += page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button/small/collapsible(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Change Log",
|
||||
"See all changes to the server",
|
||||
/* pixel_offset = */ list(260, -190),
|
||||
CALLBACK(client, TYPE_VERB_REF(/client, changelog)),
|
||||
/* button_overlay = */ "changelog",
|
||||
/* end_point */ offset_order[1],
|
||||
))
|
||||
|
||||
/datum/escape_menu/proc/home_resume()
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -8,35 +8,35 @@
|
||||
else
|
||||
stack_trace("The leave body menu was opened before the atoms SS. This shouldn't be possible, as the leave body menu should only be accessible when you have a body.")
|
||||
|
||||
page_holder.give_screen_object(new /atom/movable/screen/escape_menu/leave_body_button(
|
||||
page_holder.give_screen_object(new /atom/movable/screen/escape_menu/lobby_button(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Suicide",
|
||||
"Perform a dramatic suicide in game",
|
||||
/* pixel_offset = */ -105,
|
||||
/* pixel_offset = */ list(-105, -1),
|
||||
CALLBACK(src, PROC_REF(leave_suicide)),
|
||||
/* button_overlay = */ dead_clown,
|
||||
))
|
||||
|
||||
page_holder.give_screen_object(
|
||||
new /atom/movable/screen/escape_menu/leave_body_button(
|
||||
new /atom/movable/screen/escape_menu/lobby_button(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Ghost",
|
||||
"Exit quietly, leaving your body",
|
||||
/* pixel_offset = */ 0,
|
||||
/* pixel_offset = */ list(0, -1),
|
||||
CALLBACK(src, PROC_REF(leave_ghost)),
|
||||
/* button_overlay = */ "ghost",
|
||||
)
|
||||
)
|
||||
|
||||
page_holder.give_screen_object(
|
||||
new /atom/movable/screen/escape_menu/leave_body_button(
|
||||
new /atom/movable/screen/escape_menu/lobby_button(
|
||||
null,
|
||||
/* hud_owner = */ null,
|
||||
"Back",
|
||||
/* tooltip_text = */ null,
|
||||
/* pixel_offset = */ 105,
|
||||
/* pixel_offset = */ list(105, -1),
|
||||
CALLBACK(src, PROC_REF(open_home_page)),
|
||||
/* button_overlay = */ "back",
|
||||
)
|
||||
@@ -73,58 +73,3 @@
|
||||
// Not guaranteed to be human. Everything defines verb/suicide separately. Fuck you, still.
|
||||
var/mob/living/carbon/human/human_user = client?.mob
|
||||
human_user?.suicide()
|
||||
|
||||
/atom/movable/screen/escape_menu/leave_body_button
|
||||
icon = 'icons/hud/escape_menu_leave_body.dmi'
|
||||
icon_state = "template"
|
||||
maptext_width = 96
|
||||
maptext_y = -32
|
||||
|
||||
VAR_PRIVATE
|
||||
datum/callback/on_click_callback
|
||||
hovered = FALSE
|
||||
tooltip_text
|
||||
|
||||
/atom/movable/screen/escape_menu/leave_body_button/Initialize(
|
||||
mapload,
|
||||
datum/hud/hud_owner,
|
||||
button_text,
|
||||
tooltip_text,
|
||||
pixel_offset,
|
||||
on_click_callback,
|
||||
button_overlay,
|
||||
)
|
||||
. = ..()
|
||||
|
||||
src.on_click_callback = on_click_callback
|
||||
src.tooltip_text = tooltip_text
|
||||
|
||||
add_overlay(button_overlay)
|
||||
|
||||
maptext = MAPTEXT_VCR_OSD_MONO("<b style='font-size: 16px; text-align: center'>[button_text]</b>")
|
||||
screen_loc = "CENTER:[pixel_offset],CENTER-1"
|
||||
|
||||
/atom/movable/screen/escape_menu/leave_body_button/Destroy()
|
||||
on_click_callback = null
|
||||
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/escape_menu/leave_body_button/Click(location, control, params)
|
||||
on_click_callback?.InvokeAsync()
|
||||
|
||||
/atom/movable/screen/escape_menu/leave_body_button/MouseEntered(location, control, params)
|
||||
if (hovered)
|
||||
return
|
||||
|
||||
hovered = TRUE
|
||||
|
||||
// The UX on this is pretty shit, but it's okay enough for now.
|
||||
// Regularly goes way too far from your cursor. Not designed for large icons.
|
||||
openToolTip(usr, src, params, content = tooltip_text)
|
||||
|
||||
/atom/movable/screen/escape_menu/leave_body_button/MouseExited(location, control, params)
|
||||
if (!hovered)
|
||||
return
|
||||
|
||||
hovered = FALSE
|
||||
closeToolTip(usr)
|
||||
|
||||
135
code/modules/escape_menu/lobby_buttons.dm
Normal file
135
code/modules/escape_menu/lobby_buttons.dm
Normal file
@@ -0,0 +1,135 @@
|
||||
/atom/movable/screen/escape_menu/lobby_button
|
||||
icon = 'icons/hud/escape_menu_leave_body.dmi'
|
||||
icon_state = "template"
|
||||
maptext_width = 96
|
||||
maptext_y = -32
|
||||
|
||||
VAR_PROTECTED
|
||||
font_size = 16
|
||||
datum/callback/on_click_callback
|
||||
hovered = FALSE
|
||||
tooltip_text
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/Initialize(
|
||||
mapload,
|
||||
datum/hud/hud_owner,
|
||||
button_text,
|
||||
tooltip_text,
|
||||
list/pixel_offset,
|
||||
on_click_callback,
|
||||
button_overlay,
|
||||
)
|
||||
. = ..()
|
||||
|
||||
src.on_click_callback = on_click_callback
|
||||
src.tooltip_text = tooltip_text
|
||||
|
||||
add_overlay(button_overlay)
|
||||
|
||||
add_maptext(button_text)
|
||||
|
||||
screen_loc = "CENTER:[pixel_offset[1]],CENTER:[pixel_offset[2]]"
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/Destroy()
|
||||
on_click_callback = null
|
||||
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/Click(location, control, params)
|
||||
on_click_callback?.InvokeAsync()
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/MouseEntered(location, control, params)
|
||||
if (hovered)
|
||||
return
|
||||
|
||||
hovered = TRUE
|
||||
|
||||
// The UX on this is pretty shit, but it's okay enough for now.
|
||||
// Regularly goes way too far from your cursor. Not designed for large icons.
|
||||
openToolTip(usr, src, params, content = tooltip_text)
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/MouseExited(location, control, params)
|
||||
if (!hovered)
|
||||
return
|
||||
|
||||
hovered = FALSE
|
||||
closeToolTip(usr)
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/proc/add_maptext(button_text)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
animate(src,
|
||||
maptext = MAPTEXT_VCR_OSD_MONO("<b style='font-size: [font_size]px; text-align: center'>[button_text]</b>"),
|
||||
flags = ANIMATION_CONTINUE,
|
||||
)
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/small
|
||||
icon = 'icons/hud/escape_menu_icons.dmi'
|
||||
font_size = 9
|
||||
maptext_width = 80
|
||||
maptext_x = -20
|
||||
maptext_y = -14
|
||||
|
||||
///Amount of time between animations when we fade in and out.
|
||||
#define COLLAPSIBLE_BUTTON_DURATION (0.4 SECONDS)
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/small/collapsible
|
||||
maptext_width = 48
|
||||
maptext_x = -5
|
||||
maptext_y = -44 //we change this during animation to bring it up
|
||||
layer = parent_type::layer - 0.01
|
||||
|
||||
///Reference point we animate the x from during the animation we play on its creation.
|
||||
var/end_point
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/small/collapsible/Initialize(
|
||||
mapload,
|
||||
datum/hud/hud_owner,
|
||||
button_text,
|
||||
tooltip_text,
|
||||
list/pixel_offset,
|
||||
on_click_callback,
|
||||
button_overlay,
|
||||
end_point,
|
||||
)
|
||||
src.end_point = end_point
|
||||
return ..()
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/small/collapsible/add_maptext(button_text)
|
||||
//more than 6 characters, lets bump the maptext down a bit, because we're smaller buttons we would be overlaying over the icon itself otherwise.
|
||||
if(length(button_text) > 6)
|
||||
maptext_y -= 12
|
||||
//let's take the icons out
|
||||
animate(src,
|
||||
transform = transform.Translate(x = end_point, y = 0),
|
||||
time = COLLAPSIBLE_BUTTON_DURATION,
|
||||
easing = CUBIC_EASING|EASE_OUT,
|
||||
)
|
||||
. = ..()
|
||||
//now we'll pull out the maptext
|
||||
animate(src,
|
||||
maptext_y = (maptext_y + 30),
|
||||
time = (COLLAPSIBLE_BUTTON_DURATION / 2),
|
||||
easing = CUBIC_EASING|EASE_IN,
|
||||
flags = ANIMATION_CONTINUE,
|
||||
)
|
||||
|
||||
/atom/movable/screen/escape_menu/lobby_button/small/collapsible/proc/collapse(datum/screen_object_holder/page_holder)
|
||||
//timers are delayed until MC is done, so we'll directly qdel during setup so it doesn't freeze on players.
|
||||
if(MC_RUNNING())
|
||||
animate(src,
|
||||
maptext_y = (maptext_y -30),
|
||||
time = (COLLAPSIBLE_BUTTON_DURATION / 2),
|
||||
easing = CUBIC_EASING|EASE_IN,
|
||||
)
|
||||
animate(src,
|
||||
transform = matrix(),
|
||||
maptext = null,
|
||||
time = COLLAPSIBLE_BUTTON_DURATION,
|
||||
easing = CUBIC_EASING|EASE_OUT,
|
||||
flags = ANIMATION_CONTINUE,
|
||||
)
|
||||
addtimer(CALLBACK(page_holder, TYPE_PROC_REF(/datum/screen_object_holder, remove_screen_object), src), COLLAPSIBLE_BUTTON_DURATION)
|
||||
else
|
||||
page_holder.remove_screen_object(src)
|
||||
|
||||
#undef COLLAPSIBLE_BUTTON_DURATION
|
||||
BIN
icons/hud/escape_menu_icons.dmi
Normal file
BIN
icons/hud/escape_menu_icons.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -1,62 +1,64 @@
|
||||
//Please use mob or src (not usr) in these procs. This way they can be called in the same fashion as procs.
|
||||
/client/verb/wiki(query as text)
|
||||
/client/verb/wiki()
|
||||
set name = "wiki"
|
||||
set desc = "Type what you want to know about. This will open the wiki in your web browser. Type nothing to go to the main page."
|
||||
set desc = "Brings you to the Wiki"
|
||||
set hidden = TRUE
|
||||
|
||||
var/wikiurl = CONFIG_GET(string/wikiurl)
|
||||
if(wikiurl)
|
||||
if(query)
|
||||
var/output = wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
|
||||
src << link(output)
|
||||
else if (query != null)
|
||||
src << link(wikiurl)
|
||||
else
|
||||
if(!wikiurl)
|
||||
to_chat(src, span_danger("The wiki URL is not set in the server configuration."))
|
||||
return
|
||||
return
|
||||
|
||||
var/query = tgui_input_text(src,
|
||||
"Type what you want to know about. This will open the wiki in your web browser. Type nothing to go to the main page.",
|
||||
"Wiki",
|
||||
max_length = MAX_MESSAGE_LEN,
|
||||
)
|
||||
if(isnull(query)) //cancelled out
|
||||
return
|
||||
var/output = wikiurl
|
||||
if(query != "")
|
||||
output += "?title=Special%3ASearch&profile=default&search=[query]"
|
||||
DIRECT_OUTPUT(src, link(output))
|
||||
|
||||
/client/verb/forum()
|
||||
set name = "forum"
|
||||
set desc = "Visit the forum."
|
||||
set hidden = TRUE
|
||||
|
||||
var/forumurl = CONFIG_GET(string/forumurl)
|
||||
if(forumurl)
|
||||
if(tgui_alert(src, "This will open the forum in your browser. Are you sure?",, list("Yes","No"))!="Yes")
|
||||
return
|
||||
src << link(forumurl)
|
||||
else
|
||||
if(!forumurl)
|
||||
to_chat(src, span_danger("The forum URL is not set in the server configuration."))
|
||||
return
|
||||
return
|
||||
DIRECT_OUTPUT(src, link(forumurl))
|
||||
|
||||
/client/verb/rules()
|
||||
set name = "rules"
|
||||
set desc = "Show Server Rules."
|
||||
set hidden = TRUE
|
||||
|
||||
var/rulesurl = CONFIG_GET(string/rulesurl)
|
||||
if(rulesurl)
|
||||
if(tgui_alert(src, "This will open the rules in your browser. Are you sure?",, list("Yes","No"))!="Yes")
|
||||
return
|
||||
src << link(rulesurl)
|
||||
else
|
||||
if(!rulesurl)
|
||||
to_chat(src, span_danger("The rules URL is not set in the server configuration."))
|
||||
return
|
||||
return
|
||||
DIRECT_OUTPUT(src, link(rulesurl))
|
||||
|
||||
/client/verb/github()
|
||||
set name = "github"
|
||||
set desc = "Visit Github"
|
||||
set hidden = TRUE
|
||||
|
||||
var/githuburl = CONFIG_GET(string/githuburl)
|
||||
if(githuburl)
|
||||
if(tgui_alert(src, "This will open the Github repository in your browser. Are you sure?",, list("Yes","No"))!="Yes")
|
||||
return
|
||||
src << link(githuburl)
|
||||
else
|
||||
if(!githuburl)
|
||||
to_chat(src, span_danger("The Github URL is not set in the server configuration."))
|
||||
return
|
||||
return
|
||||
DIRECT_OUTPUT(src, link(githuburl))
|
||||
|
||||
/client/verb/reportissue()
|
||||
set name = "report-issue"
|
||||
set desc = "Report an issue"
|
||||
set hidden = TRUE
|
||||
|
||||
var/githuburl = CONFIG_GET(string/githuburl)
|
||||
if(!githuburl)
|
||||
to_chat(src, span_danger("The Github URL is not set in the server configuration."))
|
||||
@@ -97,10 +99,10 @@
|
||||
|
||||
DIRECT_OUTPUT(src, link(jointext(concatable, "")))
|
||||
|
||||
|
||||
/client/verb/changelog()
|
||||
set name = "Changelog"
|
||||
set category = "OOC"
|
||||
|
||||
if(!GLOB.changelog_tgui)
|
||||
GLOB.changelog_tgui = new /datum/changelog()
|
||||
|
||||
|
||||
@@ -161,79 +161,6 @@ window "info_and_buttons"
|
||||
splitter = 2
|
||||
show-splitter = false
|
||||
|
||||
window "infobuttons"
|
||||
elem "infobuttons"
|
||||
type = MAIN
|
||||
pos = 291,0
|
||||
size = 640x30
|
||||
anchor1 = 0,0
|
||||
anchor2 = 100,100
|
||||
saved-params = "pos;size;is-minimized;is-maximized"
|
||||
is-pane = true
|
||||
elem "changelog"
|
||||
type = BUTTON
|
||||
pos = 0,5
|
||||
size = 87x25
|
||||
anchor1 = 0,0
|
||||
anchor2 = 15,100
|
||||
saved-params = "is-checked"
|
||||
text = "Changelog"
|
||||
command = "changelog"
|
||||
elem "rules"
|
||||
type = BUTTON
|
||||
pos = 92,5
|
||||
size = 88x25
|
||||
anchor1 = 15,0
|
||||
anchor2 = 29,100
|
||||
saved-params = "is-checked"
|
||||
text = "Rules"
|
||||
command = "rules"
|
||||
elem "wiki"
|
||||
type = BUTTON
|
||||
pos = 185,5
|
||||
size = 87x25
|
||||
anchor1 = 29,0
|
||||
anchor2 = 43,100
|
||||
saved-params = "is-checked"
|
||||
text = "Wiki"
|
||||
command = "wiki"
|
||||
elem "forum"
|
||||
type = BUTTON
|
||||
pos = 277,5
|
||||
size = 87x25
|
||||
anchor1 = 43,0
|
||||
anchor2 = 57,100
|
||||
saved-params = "is-checked"
|
||||
text = "Forum"
|
||||
command = "forum"
|
||||
elem "github"
|
||||
type = BUTTON
|
||||
pos = 369,5
|
||||
size = 87x25
|
||||
anchor1 = 57,0
|
||||
anchor2 = 71,100
|
||||
saved-params = "is-checked"
|
||||
text = "GitHub"
|
||||
command = "github"
|
||||
elem "report-issue"
|
||||
type = BUTTON
|
||||
pos = 461,5
|
||||
size = 87x25
|
||||
anchor1 = 71,0
|
||||
anchor2 = 85,100
|
||||
saved-params = "is-checked"
|
||||
text = "Report Issue"
|
||||
command = "report-issue"
|
||||
elem "fullscreen-toggle"
|
||||
type = BUTTON
|
||||
pos = 553,5
|
||||
size = 89x25
|
||||
anchor1 = 85,0
|
||||
anchor2 = 99,100
|
||||
saved-params = "is-checked"
|
||||
text = "Fullscreen"
|
||||
command = "fullscreen"
|
||||
|
||||
window "infowindow"
|
||||
elem "infowindow"
|
||||
type = MAIN
|
||||
|
||||
@@ -3920,6 +3920,7 @@
|
||||
#include "code\modules\client\preferences\runechat.dm"
|
||||
#include "code\modules\client\preferences\scaling_method.dm"
|
||||
#include "code\modules\client\preferences\scarred_eye.dm"
|
||||
#include "code\modules\client\preferences\screen.dm"
|
||||
#include "code\modules\client\preferences\screentips.dm"
|
||||
#include "code\modules\client\preferences\security_department.dm"
|
||||
#include "code\modules\client\preferences\silicon_gender.dm"
|
||||
@@ -3934,7 +3935,6 @@
|
||||
#include "code\modules\client\preferences\underwear_color.dm"
|
||||
#include "code\modules\client\preferences\uplink_location.dm"
|
||||
#include "code\modules\client\preferences\voice.dm"
|
||||
#include "code\modules\client\preferences\widescreen.dm"
|
||||
#include "code\modules\client\preferences\window_flashing.dm"
|
||||
#include "code\modules\client\preferences\middleware\_middleware.dm"
|
||||
#include "code\modules\client\preferences\middleware\antags.dm"
|
||||
@@ -4152,6 +4152,7 @@
|
||||
#include "code\modules\escape_menu\escape_menu.dm"
|
||||
#include "code\modules\escape_menu\home_page.dm"
|
||||
#include "code\modules\escape_menu\leave_body.dm"
|
||||
#include "code\modules\escape_menu\lobby_buttons.dm"
|
||||
#include "code\modules\escape_menu\subsystem.dm"
|
||||
#include "code\modules\escape_menu\title.dm"
|
||||
#include "code\modules\events\_event.dm"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { CheckboxInput, FeatureToggle } from '../base';
|
||||
|
||||
export const widescreenpref: FeatureToggle = {
|
||||
name: 'Enable widescreen',
|
||||
category: 'UI',
|
||||
component: CheckboxInput,
|
||||
};
|
||||
|
||||
export const fullscreen_mode: FeatureToggle = {
|
||||
name: 'Toggle Fullscreen',
|
||||
category: 'UI',
|
||||
description: 'Toggles Fullscreen for the game, can also be toggled with F11.',
|
||||
component: CheckboxInput,
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
import { CheckboxInput, FeatureToggle } from '../base';
|
||||
|
||||
export const widescreenpref: FeatureToggle = {
|
||||
name: 'Enable widescreen',
|
||||
category: 'UI',
|
||||
component: CheckboxInput,
|
||||
};
|
||||
Reference in New Issue
Block a user