Skip to content

Commit

Permalink
TGUI fixes pt2 (#16545)
Browse files Browse the repository at this point in the history
* TGUI fixes pt2

* a thing of beauty

* a

* stuff 2

---------

Co-authored-by: Matt Atlas <[email protected]>
  • Loading branch information
NonQueueingMatt and Matt Atlas authored Jun 27, 2023
1 parent 3308daa commit b78541a
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 16 deletions.
2 changes: 1 addition & 1 deletion code/game/verbs/ooc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
window.reinitialize()

/client/verb/fix_stat_panel()
set name = "Fix Stat Panel"
set name = "Fix-Stat-Panel"
set hidden = TRUE

init_verbs()
8 changes: 4 additions & 4 deletions code/modules/client/darkmode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Thanks to spacemaniac and mcdonald for help with the JS side of this.

/client/proc/force_white_theme() //There's no way round it. We're essentially changing the skin by hand. It's painful but it works, and is the way Lummox suggested.
//Main windows
winset(src, "infowindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = none")
winset(src, "infowindow", "text-color = [COLOR_DARKMODE_TEXT];text-color = #000000")
winset(src, "mainwindow", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = none")
winset(src, "mainwindow", "text-color = [COLOR_DARKMODE_TEXT];text-color = #000000")
winset(src, "rpane", "background-color = [COLOR_DARKMODE_DARKBACKGROUND];background-color = none")
winset(src, "rpane", "text-color = [COLOR_DARKMODE_TEXT];text-color = #000000")
winset(src, "info", "background-color = [COLOR_DARKMODE_BACKGROUND];background-color = none")
Expand Down Expand Up @@ -73,8 +73,8 @@ Thanks to spacemaniac and mcdonald for help with the JS side of this.

/client/proc/force_dark_theme() //Inversely, if theyre using white theme and want to swap to the superior dark theme, let's get WINSET() ing
//Main windows
winset(src, "infowindow", "background-color = none;background-color = [COLOR_DARKMODE_BACKGROUND]")
winset(src, "infowindow", "text-color = #000000;text-color = [COLOR_DARKMODE_TEXT]")
winset(src, "mainwindow", "background-color = none;background-color = [COLOR_DARKMODE_BACKGROUND]")
winset(src, "mainwindow", "text-color = #000000;text-color = [COLOR_DARKMODE_TEXT]")
winset(src, "rpane", "background-color = none;background-color = [COLOR_DARKMODE_BACKGROUND]")
winset(src, "rpane", "text-color = #000000;text-color = [COLOR_DARKMODE_TEXT]")
winset(src, "info", "background-color = none;background-color = [COLOR_DARKMODE_BACKGROUND]")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@
var/datum/asset/changelog = get_asset_datum(/datum/asset/simple/changelog)
changelog.send(src)

var/datum/browser/changelog_win = new(src, "changes", "Changelog", 675, 650)
changelog_win.set_content('html/changelog.html')
var/datum/browser/changelog_win = new(mob, "changes", "Changelog", 675, 650)
changelog_win.set_content(file2text('html/changelog.html'))
changelog_win.open()
if(prefs.lastchangelog != changelog_hash)
prefs.lastchangelog = changelog_hash
Expand Down
42 changes: 42 additions & 0 deletions html/changelogs/mattatlas-fixthingsforreal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
################################
# 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: MattAtlas

# 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:
- bugfix: "Fixed there not being a print bounties button."
- bugfix: "Fixed the changelog not showing up."
10 changes: 4 additions & 6 deletions tgui/packages/tgui-panel/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const setClientTheme = (name) => {
if (name === 'light') {
return Byond.winset({
// Main windows
'infowindow.background-color': 'none',
'infowindow.text-color': '#000000',
'mainwindow.background-color': 'none',
'mainwindow.text-color': '#000000',
'info.background-color': 'none',
'info.text-color': '#000000',
'rpane.background-color': 'none',
Expand All @@ -46,7 +46,6 @@ export const setClientTheme = (name) => {
'browseroutput.text-color': '#000000',
'outputwindow.background-color': 'none',
'outputwindow.text-color': '#000000',
'mainwindow.background-color': 'none',
// Buttons
'changelog.background-color': 'none',
'changelog.text-color': '#000000',
Expand Down Expand Up @@ -81,8 +80,8 @@ export const setClientTheme = (name) => {
if (name === 'dark') {
Byond.winset({
// Main windows
'infowindow.background-color': COLOR_DARK_BG,
'infowindow.text-color': COLOR_DARK_TEXT,
'mainwindow.background-color': COLOR_DARK_BG,
'mainwindow.text-color': COLOR_DARK_TEXT,
'info.background-color': COLOR_DARK_BG,
'info.text-color': COLOR_DARK_TEXT,
'rpane.background-color': COLOR_DARK_BG,
Expand All @@ -93,7 +92,6 @@ export const setClientTheme = (name) => {
'browseroutput.text-color': COLOR_DARK_TEXT,
'outputwindow.background-color': COLOR_DARK_BG,
'outputwindow.text-color': COLOR_DARK_TEXT,
'mainwindow.background-color': COLOR_DARK_BG,
// Buttons
'changelog.background-color': '#494949',
'changelog.text-color': COLOR_DARK_TEXT,
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/CargoControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ export const Bounties = (props, context) => {
return (
<Section
title="Operations Bounties"
button={
buttons={
<Button
content="Print"
icon="Print"
Expand Down
4 changes: 2 additions & 2 deletions tgui/packages/tgui/interfaces/Voting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ export const StartVoteWindow = (props, context) => {
<Box>
<Button
content="Restart"
disabled={!data.is_staff || !data.allow_vote_restart}
disabled={!data.allow_vote_restart}
onClick={(value) => act('restart')}
/>
</Box>
<Box>
<Button
content="Crew Transfer"
disabled={!data.is_staff || !data.allow_vote_restart}
disabled={data.allow_vote_restart}
tooltip="Disallowed on Code Red or above."
onClick={(value) => act('crew_transfer')}
/>
Expand Down

0 comments on commit b78541a

Please sign in to comment.