mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Add useful comments to most header lib procs and macros
This commit is contained in:
@@ -22,7 +22,9 @@ end*/
|
||||
return var;
|
||||
end*/
|
||||
|
||||
// Parse keyboard shortcut definition
|
||||
/**
|
||||
Parses keyboard shortcut definition (key code + optional modifier key) from a string into an integer for later use in other hotkey procedures.
|
||||
*/
|
||||
procedure parse_hotkey(variable string) begin
|
||||
variable lst;
|
||||
variable n;
|
||||
@@ -35,7 +37,9 @@ procedure parse_hotkey(variable string) begin
|
||||
return n;
|
||||
end
|
||||
|
||||
// Check if shortcut is pressed
|
||||
/**
|
||||
Checks if a given shortcut is currently pressed (see parse_hotkey).
|
||||
*/
|
||||
procedure hotkey_pressed(variable n) begin
|
||||
if (n < 0x10000) then
|
||||
return key_pressed(n);
|
||||
@@ -43,7 +47,9 @@ procedure hotkey_pressed(variable n) begin
|
||||
return key_pressed(n bwand 0xFFFF) and key_pressed((n bwand 0xFFFF0000) / 0x10000);
|
||||
end
|
||||
|
||||
// same as above, but suited for hs_keypress hook when keycode is already known
|
||||
/**
|
||||
Checks if a shortcut is currently pressed, given that *key* is already pressed.
|
||||
*/
|
||||
procedure hotkey_pressed_now(variable n, variable key) begin
|
||||
if (n < 0x10000) then
|
||||
return key == n;
|
||||
@@ -59,7 +65,9 @@ procedure hotkey_pressed_now(variable n, variable key) begin
|
||||
end
|
||||
end
|
||||
|
||||
// Loads ini section as map of keys and values parsed as integers (0 values will be skipped!)
|
||||
/**
|
||||
Loads ini section as map of keys and values parsed as integers (0 values will be skipped!)
|
||||
*/
|
||||
procedure get_ini_section_int_to_int(variable file, variable section, variable fixArray := false) begin
|
||||
variable ar, ar2 := temp_array_map, k, v;
|
||||
ar := get_ini_section(file, section);
|
||||
|
||||
Reference in New Issue
Block a user