mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-15 21:32:35 +00:00
Borderless experimenting
This commit is contained in:
@@ -13,6 +13,24 @@ module TAC
|
|||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def hit_test(x, y)
|
||||||
|
if y <= 4
|
||||||
|
return 2 if x <= 4
|
||||||
|
return 4 if x >= width - 4
|
||||||
|
return 3
|
||||||
|
end
|
||||||
|
|
||||||
|
if y >= height - 4
|
||||||
|
return 8 if x <= 4
|
||||||
|
return 6 if x >= width - 4
|
||||||
|
return 7
|
||||||
|
end
|
||||||
|
|
||||||
|
return 1 if y <= 36 && x <= width - 74
|
||||||
|
|
||||||
|
0
|
||||||
|
end
|
||||||
|
|
||||||
def close
|
def close
|
||||||
if @backend.config_changed?
|
if @backend.config_changed?
|
||||||
push_state(Dialog::ConfirmDialog, title: "Unsaved Config", message: "Config has unsaved changes\nthat will be lost if you continue!", callback_method: proc { cleanup_and_close })
|
push_state(Dialog::ConfirmDialog, title: "Unsaved Config", message: "Config has unsaved changes\nthat will be lost if you continue!", callback_method: proc { cleanup_and_close })
|
||||||
@@ -31,4 +49,4 @@ module TAC
|
|||||||
close!
|
close!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -48,5 +48,5 @@ require_relative "lib/tacnet/server"
|
|||||||
# Thread.abort_on_exception = true
|
# Thread.abort_on_exception = true
|
||||||
|
|
||||||
if not defined?(Ocra)
|
if not defined?(Ocra)
|
||||||
TAC::Window.new(width: (Gosu.screen_width * 0.8).round, height: (Gosu.screen_height * 0.8).round, resizable: true).show
|
TAC::Window.new(width: (Gosu.screen_width * 0.8).round, height: (Gosu.screen_height * 0.8).round, resizable: true, borderless: true).show
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user