mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Renames some things (#22925)
This commit is contained in:
@@ -261,15 +261,15 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
var/aspect_ratio = view_size[1] / view_size[2]
|
||||
|
||||
// Calculate desired pixel width using window size and aspect ratio
|
||||
var/list/sizes = params2list(winget(src, "mainwindow.mainvsplit;mapwindow", "size"))
|
||||
var/list/sizes = params2list(winget(src, "mainwindow.mainvsplit;paramapwindow", "size"))
|
||||
|
||||
// Client closed the window? Some other error? This is unexpected behaviour, let's CRASH with some info.
|
||||
if(!sizes["mapwindow.size"])
|
||||
CRASH("sizes does not contain mapwindow.size key. This means a winget() failed to return what we wanted. --- sizes var: [sizes] --- sizes length: [length(sizes)]")
|
||||
if(!sizes["paramapwindow.size"])
|
||||
CRASH("sizes does not contain paramapwindow.size key. This means a winget() failed to return what we wanted. --- sizes var: [sizes] --- sizes length: [length(sizes)]")
|
||||
|
||||
var/list/map_size = splittext(sizes["mapwindow.size"], "x")
|
||||
var/list/map_size = splittext(sizes["paramapwindow.size"], "x")
|
||||
|
||||
// Looks like we didn't expect mapwindow.size to be "ixj" where i and j are numbers.
|
||||
// Looks like we didn't expect paramapwindow.size to be "ixj" where i and j are numbers.
|
||||
// If we don't get our expected 2 outputs, let's give some useful error info.
|
||||
if(length(map_size) != 2)
|
||||
CRASH("map_size of incorrect length --- map_size var: [map_size] --- map_size length: [length(map_size)]")
|
||||
@@ -295,7 +295,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
// Apply an ever-lowering offset until we finish or fail
|
||||
var/delta
|
||||
for(var/safety in 1 to 10)
|
||||
var/after_size = winget(src, "mapwindow", "size")
|
||||
var/after_size = winget(src, "paramapwindow", "size")
|
||||
map_size = splittext(after_size, "x")
|
||||
var/produced_width = text2num(map_size[1])
|
||||
|
||||
|
||||
@@ -159,13 +159,13 @@
|
||||
if(href_list["__keydown"])
|
||||
var/keycode = href_list["__keydown"]
|
||||
if(keycode)
|
||||
KeyDown(keycode)
|
||||
Key_Down(keycode)
|
||||
return
|
||||
|
||||
if(href_list["__keyup"])
|
||||
var/keycode = href_list["__keyup"]
|
||||
if(keycode)
|
||||
KeyUp(keycode)
|
||||
Key_Up(keycode)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/client/proc/UpdateView()
|
||||
if(!ViewModsActive)
|
||||
ViewPreferedIconSize = winget(src, "mapwindow.map", "icon-size")
|
||||
ViewPreferedIconSize = winget(src, "paramapwindow.map", "icon-size")
|
||||
|
||||
var/highest_range = 0
|
||||
for(var/mod_id in ViewMods)
|
||||
@@ -43,9 +43,9 @@
|
||||
|
||||
/client/proc/SetView(view_range)
|
||||
if(view_range == prefs.viewrange)
|
||||
winset(src, "mapwindow.map", "icon-size=[ViewPreferedIconSize]")
|
||||
winset(src, "paramapwindow.map", "icon-size=[ViewPreferedIconSize]")
|
||||
else
|
||||
winset(src, "mapwindow.map", "icon-size=0")
|
||||
winset(src, "paramapwindow.map", "icon-size=0")
|
||||
|
||||
view = view_range
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
if(!default_macro_sets) //If you ever remove legacy input mode, you can simplify this a lot
|
||||
default_macro_sets = list(
|
||||
"default" = list(
|
||||
"Any" = "\"KeyDown \[\[*\]\]\"", // Passes any key down to the rebindable input system
|
||||
"Any+UP" = "\"KeyUp \[\[*\]\]\"", // Passes any key up to the rebindable input system
|
||||
"Any" = "\"Key_Down \[\[*\]\]\"", // Passes any key down to the rebindable input system
|
||||
"Any+UP" = "\"Key_Up \[\[*\]\]\"", // Passes any key up to the rebindable input system
|
||||
"Tab" = "\".winset \\\"mainwindow.macro=legacy input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"", // Swaps us to legacy mode, forces input to the input bar, sets the input bar colour to salmon pink
|
||||
"Back" = "\".winset \\\"input.focus=true ? input.text=\\\"\"" // This makes it so backspace can remove default inputs
|
||||
),
|
||||
@@ -47,8 +47,8 @@
|
||||
// We use the static list to make only the keys in it passed to legacy mode
|
||||
for(var/i in 1 to length(legacy_keys))
|
||||
var/key = legacy_keys[i]
|
||||
legacy_default[key] = "\"KeyDown [key]\""
|
||||
legacy_default["[key]+UP"] = "\"KeyUp [key]\""
|
||||
legacy_default[key] = "\"Key_Down [key]\""
|
||||
legacy_default["[key]+UP"] = "\"Key_Up [key]\""
|
||||
|
||||
macro_sets = default_macro_sets
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
winset(src, null, "input.background-color=[COLOR_INPUT_DISABLED]") //screw you, we start in hotkey mode now
|
||||
macro_sets = null //not needed anymore, bye have a great time
|
||||
|
||||
/client/verb/KeyDown(_key as text)
|
||||
/client/verb/Key_Down(_key as text)
|
||||
set name = "Key_Down"
|
||||
set instant = TRUE
|
||||
set hidden = TRUE
|
||||
|
||||
@@ -135,7 +136,8 @@
|
||||
|
||||
mob.input_focus?.key_down(_key, src)
|
||||
|
||||
/client/verb/KeyUp(_key as text)
|
||||
/client/verb/Key_Up(_key as text)
|
||||
set name = "Key_Up"
|
||||
set instant = TRUE
|
||||
set hidden = TRUE
|
||||
|
||||
@@ -143,7 +145,7 @@
|
||||
var/key_combo = ID.key_combos_held[_key]
|
||||
if(key_combo)
|
||||
ID.key_combos_held -= _key
|
||||
KeyUp(key_combo)
|
||||
Key_Up(key_combo)
|
||||
|
||||
ID.keys_held -= _key
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
tooltip.special = special;
|
||||
|
||||
//Go get the map details
|
||||
window.location = 'byond://winget?callback=tooltip.updateCallback;id=mapwindow.map;property=size,view-size';
|
||||
window.location = 'byond://winget?callback=tooltip.updateCallback;id=paramapwindow.map;property=size,view-size';
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -857,7 +857,7 @@ $(function() {
|
||||
) {
|
||||
opts.mouseDownX = null;
|
||||
opts.mouseDownY = null;
|
||||
runByond('byond://winset?mapwindow.map.focus=true');
|
||||
runByond('byond://winset?paramapwindow.map.focus=true');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -935,17 +935,17 @@ $(function() {
|
||||
command = opts.macros[c];
|
||||
|
||||
if (command) {
|
||||
runByond('byond://winset?mapwindow.map.focus=true;command='+command);
|
||||
runByond('byond://winset?paramapwindow.map.focus=true;command='+command);
|
||||
return false;
|
||||
}
|
||||
else if (c.length == 0) {
|
||||
if (!e.shiftKey) {
|
||||
c = c.toLowerCase();
|
||||
}
|
||||
runByond('byond://winset?mapwindow.map.focus=true;mainwindow.input.text='+c);
|
||||
runByond('byond://winset?paramapwindow.map.focus=true;mainwindow.input.text='+c);
|
||||
return false;
|
||||
} else {
|
||||
runByond('byond://winset?mapwindow.map.focus=true');
|
||||
runByond('byond://winset?paramapwindow.map.focus=true');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
@@ -977,7 +977,7 @@ $(function() {
|
||||
var messagesHeight = $messages.outerHeight();
|
||||
$('body,html').scrollTop(messagesHeight);
|
||||
$('#newMessages').remove();
|
||||
runByond("byond://winset?mapwindow.map.focus=true");
|
||||
runByond("byond://winset?paramapwindow.map.focus=true");
|
||||
});
|
||||
|
||||
$('#toggleOptions').click(function(e) {
|
||||
|
||||
+17
-17
@@ -30,50 +30,50 @@ menu "menu"
|
||||
category = "&Icons"
|
||||
elem "stretch"
|
||||
name = "&Stretch to fit"
|
||||
command = ".winset \"mapwindow.map.icon-size=0\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=0\""
|
||||
category = "&Size"
|
||||
is-checked = true
|
||||
can-check = true
|
||||
group = "size"
|
||||
elem "icon128"
|
||||
name = "&128x128 (4x)"
|
||||
command = ".winset \"mapwindow.map.icon-size=128\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=128\""
|
||||
category = "&Size"
|
||||
can-check = true
|
||||
group = "size"
|
||||
elem "icon112"
|
||||
name = "&112x112 (3.5x)"
|
||||
command = ".winset \"mapwindow.map.icon-size=112\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=112\""
|
||||
category = "&Size"
|
||||
can-check = true
|
||||
group = "size"
|
||||
elem "icon96"
|
||||
name = "&96x96 (3x)"
|
||||
command = ".winset \"mapwindow.map.icon-size=96\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=96\""
|
||||
category = "&Size"
|
||||
can-check = true
|
||||
group = "size"
|
||||
elem "icon80"
|
||||
name = "&80x80 (2.5x)"
|
||||
command = ".winset \"mapwindow.map.icon-size=80\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=80\""
|
||||
category = "&Size"
|
||||
can-check = true
|
||||
group = "size"
|
||||
elem "icon64"
|
||||
name = "&64x64 (2x)"
|
||||
command = ".winset \"mapwindow.map.icon-size=64\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=64\""
|
||||
category = "&Size"
|
||||
can-check = true
|
||||
group = "size"
|
||||
elem "icon48"
|
||||
name = "&48x48 (1.5x)"
|
||||
command = ".winset \"mapwindow.map.icon-size=48\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=48\""
|
||||
category = "&Size"
|
||||
can-check = true
|
||||
group = "size"
|
||||
elem "icon32"
|
||||
name = "&32x32"
|
||||
command = ".winset \"mapwindow.map.icon-size=32\""
|
||||
command = ".winset \"paramapwindow.map.icon-size=32\""
|
||||
category = "&Size"
|
||||
can-check = true
|
||||
group = "size"
|
||||
@@ -82,26 +82,26 @@ menu "menu"
|
||||
category = "&Icons"
|
||||
elem "NN"
|
||||
name = "&Nearest Neighbor"
|
||||
command = ".winset \"mapwindow.map.zoom-mode=distort\""
|
||||
command = ".winset \"paramapwindow.map.zoom-mode=distort\""
|
||||
category = "&Scaling"
|
||||
can-check = true
|
||||
is-checked = true
|
||||
group = "scale"
|
||||
elem "PS"
|
||||
name = "&Point Sampling"
|
||||
command = ".winset \"mapwindow.map.zoom-mode=normal\""
|
||||
command = ".winset \"paramapwindow.map.zoom-mode=normal\""
|
||||
category = "&Scaling"
|
||||
can-check = true
|
||||
group = "scale"
|
||||
elem "BL"
|
||||
name = "&Bilinear"
|
||||
command = ".winset \"mapwindow.map.zoom-mode=blur\""
|
||||
command = ".winset \"paramapwindow.map.zoom-mode=blur\""
|
||||
category = "&Scaling"
|
||||
can-check = true
|
||||
group = "scale"
|
||||
elem "textmode"
|
||||
name = "&Text"
|
||||
command = ".winset \"menu.textmode.is-checked=true?mapwindow.map.text-mode=true:mapwindow.map.text-mode=false\""
|
||||
command = ".winset \"menu.textmode.is-checked=true?paramapwindow.map.text-mode=true:paramapwindow.map.text-mode=false\""
|
||||
category = "&Icons"
|
||||
can-check = true
|
||||
elem
|
||||
@@ -116,7 +116,7 @@ menu "menu"
|
||||
can-check = true
|
||||
is-checked = true
|
||||
saved-params = "is-checked"
|
||||
command = ".winset \"menu.statusbar.is-checked=true?mapwindow.status_bar.is-visible=true:mapwindow.status_bar.is-visible=false\""
|
||||
command = ".winset \"menu.statusbar.is-checked=true?paramapwindow.status_bar.is-visible=true:paramapwindow.status_bar.is-visible=false\""
|
||||
elem
|
||||
name = "&Help"
|
||||
elem
|
||||
@@ -147,7 +147,7 @@ window "mainwindow"
|
||||
anchor1 = 0,0
|
||||
anchor2 = 100,100
|
||||
saved-params = "splitter"
|
||||
left = "mapwindow"
|
||||
left = "paramapwindow"
|
||||
right = "rpane"
|
||||
is-vert = true
|
||||
elem "tooltip"
|
||||
@@ -155,8 +155,8 @@ window "mainwindow"
|
||||
size = 999x999
|
||||
is-visible = false
|
||||
|
||||
window "mapwindow"
|
||||
elem "mapwindow"
|
||||
window "paramapwindow"
|
||||
elem "paramapwindow"
|
||||
type = MAIN
|
||||
size = 640x480
|
||||
is-pane = true
|
||||
@@ -173,7 +173,7 @@ window "mapwindow"
|
||||
saved-params = "icon-size"
|
||||
zoom-mode = "distort"
|
||||
style = ".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .clown { color: #FF69Bf;} .tajaran {color: #803B56;} .skrell {color: #00CED1;} .solcom {color: #22228B;} .com_srus {color: #7c4848;} .zombie\t{color: #ff0000;} .soghun {color: #228B22;} .vox {color: #AA00AA;} .diona {color: #804000; font-weight: bold;} .trinary {color: #727272;} .kidan {color: #664205;} .slime {color: #0077AA;} .drask {color: #a3d4eb;} .vulpkanin {color: #B97A57;} .abductor {color: #800080; font-style: italic;} .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; }"
|
||||
on-show = ".winset \"menu.statusbar.is-checked=true?mapwindow.status_bar.is-visible=true:mapwindow.status_bar.is-visible=false\""
|
||||
on-show = ".winset \"menu.statusbar.is-checked=true?paramapwindow.status_bar.is-visible=true:paramapwindow.status_bar.is-visible=false\""
|
||||
elem "status_bar"
|
||||
type = LABEL
|
||||
pos = 0,464
|
||||
|
||||
Reference in New Issue
Block a user