Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging master changes into XML_Converter #360

Merged
merged 35 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b1e6497
Cleaning up burrito link code to make it more readable
AsherGlick Feb 26, 2023
6cdcdbb
Add dynamical placement of the menue button
Masgalor Nov 14, 2023
206f56e
Improve comments
Masgalor Nov 14, 2023
f5753b6
Fix typos
Masgalor Nov 14, 2023
4dc4da4
Add a global variable for the ui-size
Masgalor Nov 16, 2023
f01c76d
Add checks to keep the button inside the window
Masgalor Nov 16, 2023
9501993
Add workarounds for KDE
Masgalor Nov 16, 2023
dc9ad35
Declare constants correctly
Masgalor Nov 16, 2023
68ec094
Change the way an position outside the window is handled.
Masgalor Nov 16, 2023
49d4112
Add more infos about window rules
Masgalor Nov 17, 2023
c9fdc71
Makes the kde section more compact
Masgalor Nov 18, 2023
02fc3af
Merge pull request #230 from Masgalor/improve-readme
AsherGlick Nov 18, 2023
8e9b986
Adopt projects coding standards
Masgalor Nov 20, 2023
6b17e81
Add proper check if a dialog is visible
Masgalor Nov 20, 2023
601cead
Change the type of icon_size_preset from array to dictionary
Masgalor Nov 20, 2023
a06daf3
Remove the window-width check.
Masgalor Nov 20, 2023
3c81e5b
Change the way the button position is determined
Masgalor Nov 21, 2023
d0db52d
Add dynamic resize of the minimap
Masgalor Nov 27, 2023
55b2aeb
Merge pull request #225 from Masgalor/dynamic-icon-positon
AsherGlick Nov 28, 2023
5899c48
Update the factors used to rescale the minimap
Masgalor Nov 29, 2023
4185432
Merge pull request #242 from Masgalor/dynamic-minimap-scale
AsherGlick Nov 29, 2023
251771b
quick fix for nested types and bad trl paths
AsherGlick Nov 30, 2023
86c905d
Merge pull request #243 from AsherGlick/nested_type_fix
AsherGlick Nov 30, 2023
2335efa
Update XML parsing to ignore XML prefixes from tags
jmetzmeier Dec 19, 2023
0882ce8
Merge pull request #245 from jmetzmeier/master
AsherGlick Dec 31, 2023
036a89a
removing new field for now
AsherGlick Feb 4, 2024
6f6062b
Merge pull request #126 from AsherGlick/burrito_link_cleanup
AsherGlick Feb 5, 2024
d6508d6
Add basic compatibility with nexus.
Masgalor Aug 6, 2024
6e11713
Reset revision.
Masgalor Aug 6, 2024
878e016
Set a meaningful signature.
Masgalor Aug 7, 2024
a0da407
Set the version to 0.0.0.1 to make clear it is a placeholder.
Masgalor Aug 9, 2024
565cc1c
removing the timestamp from the dll
AsherGlick Aug 19, 2024
ad795bd
Merge pull request #326 from Masgalor/nexus-lite
AsherGlick Aug 21, 2024
12fb1e1
Merge pull request #342 from AsherGlick/no-dll-timestamp
AsherGlick Aug 21, 2024
0c37c45
Merged changes in master into xml_converter
klingbolt Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ Roadmap

Known Bug Workarounds
=====================
* Burrito launches off-center or on the wrong monitor
* This seems to be WM dependant. on Gnome it can be solved by holding down the super key and dragging burrito to the right position.
* Burrito launches off-center or on the wrong monitor (This seems to be WM dependant.)
* On Gnome and KDE it can be solved by holding down the super key and dragging burrito to the right position.
* On KDE it is also possible to use [window-rules](https://docs.kde.org/stable5/en/kwin/kcontrol/windowspecific/examples.html) to set the position or a target monitor automatically by adding a new rule to `System Settings → Window Behavior → Window Rules` and setting `window class (application)` to `burrito`.
47 changes: 41 additions & 6 deletions Spatial.gd
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,22 @@ onready var markers_ui := $Control/Dialogs/CategoriesDialog/MarkersUI as Tree
onready var markers_3d := $Markers3D as Spatial
onready var markers_2d := $Control/Markers2D as Node2D

# Variables that store informations about ui scaling
# The ui-size as read from the link can have the values [0=small; 1=normal; 2=large; 3=larger]
var ui_size: int = 1
# This dictionary holds the left and right margin for the main button for every ui-scale
const button_margin = {
0: {"left": 292, "right": 318}, # small
1: {"left": 323, "right": 352}, # normal
2: {"left": 361, "right": 394}, # large
3: {"left": 395, "right": 431} # larger
}
const minimap_scale = {
0: {"offset": 32, "factor": 0.9}, # small
1: {"offset": 36, "factor": 1}, # normal
2: {"offset": 40, "factor": 1.11}, # large
3: {"offset": 44, "factor": 1.22} # larger
}

# Called when the node enters the scene tree for the first time.
func _ready():
Expand Down Expand Up @@ -269,7 +285,7 @@ func decode_frame_packet(spb: StreamPeerBuffer):
if (!map_is_open):
map_size = Vector2(compass_width, compass_height)
if !compass_is_top_right:
map_corner = get_viewport().size - Vector2(compass_width, compass_height + 36)
map_corner = get_viewport().size - Vector2(compass_width, compass_height + self.minimap_scale[self.ui_size]["offset"])
else:
map_corner = Vector2(get_viewport().size.x - compass_width, 0)

Expand Down Expand Up @@ -341,6 +357,20 @@ func decode_context_packet(spb: StreamPeerBuffer):
# vs radians. 70deg = 1.22173rad and 25deg = 0.4363323rad. We should redo
# this to just be a radian to degree conversion.

# Calculations to dynamically place the main icon/button
self.ui_size = int(identity["uisz"])
# If the value is not part of the dictionary use the "normal" size.
if !self.button_margin.has(self.ui_size):
self.ui_size = 1

$Control/GlobalMenuButton.margin_left = self.button_margin[self.ui_size]["left"]
$Control/GlobalMenuButton.margin_right = self.button_margin[self.ui_size]["right"]
if !is_any_dialog_visible():
set_minimal_mouse_block()

compass_width = compass_width * self.minimap_scale[self.ui_size]["factor"]
compass_height = compass_height * self.minimap_scale[self.ui_size]["factor"]

if self.map_id != old_map_id:
print("New Map")
var old_texture_path: String = ""
Expand Down Expand Up @@ -371,8 +401,8 @@ func reset_minimap_masks(reset_3d: bool = true):
var compass_corner1 = Vector2(0, 0)
var compass_corner2 = viewport_size
if !map_is_open && !compass_is_top_right:
compass_corner1 = Vector2(viewport_size.x-self.compass_width, 36)
compass_corner2 = compass_corner1 + Vector2(self.compass_width, self.compass_height)
compass_corner1 = Vector2(viewport_size.x-compass_width, self.minimap_scale[self.ui_size]["offset"])
compass_corner2 = compass_corner1 + Vector2(compass_width, compass_height)
elif !map_is_open && compass_is_top_right:
compass_corner1 = viewport_size - Vector2(self.compass_width, self.compass_height)
compass_corner2 = compass_corner1 + Vector2(self.compass_width, self.compass_height)
Expand Down Expand Up @@ -910,11 +940,16 @@ func _on_main_menu_toggle_pressed():
$Control/Dialogs/MainMenu.show()
set_maximal_mouse_block()

func _on_Dialog_hide():
func is_any_dialog_visible():
for dialog in $Control/Dialogs.get_children():
if dialog.visible:
return
set_minimal_mouse_block()
return true
return false


func _on_Dialog_hide():
if !is_any_dialog_visible():
set_minimal_mouse_block()


func _on_LoadTrail_pressed():
Expand Down
2 changes: 1 addition & 1 deletion burrito_link/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ target_link_libraries(${DX11LIB} PRIVATE "ws2_32")
set_target_properties(${DX11LIB} PROPERTIES
PREFIX ""
SUFFIX ""
LINK_FLAGS "../deffile.def -Wl,--allow-shlib-undefined -Wl,-O1 -shared -static -static-libgcc -static-libstdc++ -Wl,--file-alignment=4096 -lm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32"
LINK_FLAGS "../deffile.def -Wl,--allow-shlib-undefined,--no-insert-timestamp -Wl,-O1 -shared -static -static-libgcc -static-libstdc++ -Wl,--file-alignment=4096 -lm -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32"
)
Loading
Loading