diff --git a/lib/constants.rb b/lib/constants.rb
index a531849..ddd0a61 100644
--- a/lib/constants.rb
+++ b/lib/constants.rb
@@ -1,7 +1,8 @@
class IMICFPS
GAME_ROOT_PATH = File.expand_path("..", File.dirname(__FILE__))
- SANS_SERIF_FONT = "#{GAME_ROOT_PATH}/static/fonts/Oxygen_Mono/OxygenMono-Regular.ttf"
+ SANS_FONT = "#{GAME_ROOT_PATH}/static/fonts/Cantarell/Cantarell-Regular.otf"
+ BOLD_SANS_FONT = "#{GAME_ROOT_PATH}/static/fonts/Cantarell/Cantarell-Bold.otf"
MONOSPACE_FONT = "#{GAME_ROOT_PATH}/static/fonts/Oxygen_Mono/OxygenMono-Regular.ttf"
# Objects exported from blender using the default or meter object scale will be close to 1 GL unit
diff --git a/lib/hud/widgets/chat_history.rb b/lib/hud/widgets/chat_history.rb
index b38a4fe..d7285ed 100644
--- a/lib/hud/widgets/chat_history.rb
+++ b/lib/hud/widgets/chat_history.rb
@@ -12,7 +12,7 @@ class IMICFPS
shadow_alpha: 0,
shadow_color: Gosu::Color::WHITE,
mode: :add,
- font: SANS_SERIF_FONT
+ font: SANS_FONT
)
@last_message_time = 0
diff --git a/lib/hud/widgets/squad.rb b/lib/hud/widgets/squad.rb
index 26086a9..f6630b6 100644
--- a/lib/hud/widgets/squad.rb
+++ b/lib/hud/widgets/squad.rb
@@ -13,7 +13,7 @@ class IMICFPS
"MATE\nTinyTanker\nOther Player Dude\nHuman 0xdeadbeef",
size: 18,
mode: :add,
- font: SANS_SERIF_FONT,
+ font: SANS_FONT,
color: @color,
shadow: true,
shadow_color: 0x88000000,
diff --git a/lib/managers/entity_manager.rb b/lib/managers/entity_manager.rb
index 829d904..e72e913 100644
--- a/lib/managers/entity_manager.rb
+++ b/lib/managers/entity_manager.rb
@@ -1,7 +1,7 @@
class IMICFPS
module EntityManager # Get included into GameState context
def add_entity(entity)
- @collision_manager.add(entity) if @collision_manager && entity.manifest.collision# Add every entity to collision manager
+ @collision_manager.add(entity) if @collision_manager && entity.manifest.collision # Add every entity to collision manager
Publisher.instance.publish(:create, nil, entity)
@entities << entity
end
diff --git a/lib/states/game_states/loading_state.rb b/lib/states/game_states/loading_state.rb
index 35df049..433001f 100644
--- a/lib/states/game_states/loading_state.rb
+++ b/lib/states/game_states/loading_state.rb
@@ -11,10 +11,10 @@ class IMICFPS
end
title IMICFPS::NAME
- @subheading = Text.new("Loading Map: #{@map_parser.metadata.name}", y: 100, size: 50, alignment: :center, font: SANS_SERIF_FONT)
- @description = Text.new("Map created by: #{@map_parser.metadata.authors.join(", ")}\n#{@map_parser.metadata.description}", y: 180, size: 24, alignment: :center, font: SANS_SERIF_FONT)
- @state = Text.new("Preparing...", y: window.height/2-40, size: 40, alignment: :center, font: SANS_SERIF_FONT)
- @percentage = Text.new("0%", y: window.height - 100 + 25, size: 50, alignment: :center, font: MONOSPACE_FONT)
+ @subheading = Text.new("Loading Map: #{@map_parser.metadata.name}", y: 100, size: 50, alignment: :center, font: SANS_FONT)
+ @description = Text.new("Map created by: #{@map_parser.metadata.authors.join(", ")}\n#{@map_parser.metadata.description}", y: 180, size: 24, alignment: :center, font: SANS_FONT)
+ @state = Text.new("Preparing...", y: window.height/2-40, size: 40, alignment: :center, font: SANS_FONT)
+ @percentage = Text.new("0%", y: window.height - 100 + 25, size: 50, alignment: :center, font: SANS_FONT)
@dummy_entity = nil
@assets = []
diff --git a/lib/tools/map_editor/lib/editor.rb b/lib/tools/map_editor/lib/editor.rb
index e482abe..f68b288 100644
--- a/lib/tools/map_editor/lib/editor.rb
+++ b/lib/tools/map_editor/lib/editor.rb
@@ -1,14 +1,14 @@
class IMICFPS
class MapEditorTool
class Editor < CyberarmEngine::GuiState
-
attr_reader :map
+
def setup
# TODO: Move everything required for a playable game map
# in to a Scene or Scene3D container object
# and refactor Game to use it.
Publisher.new
- @map = Map.new( map_parser: @options[:map_parser] )
+ @map = Map.new(map_parser: @options[:map_parser])
@camera = PerspectiveCamera.new( position: Vector.new, aspect_ratio: window.aspect_ratio )
@editor = IMICFPS::Editor.new( manifest: Manifest.new(package: "base", name: "editor") )
@camera_controller = CameraController.new(camera: @camera, entity: @editor)
diff --git a/lib/ui/menu.rb b/lib/ui/menu.rb
index fdc5eb3..6a2b674 100644
--- a/lib/ui/menu.rb
+++ b/lib/ui/menu.rb
@@ -20,27 +20,54 @@ class IMICFPS
@accent_color = ACCENT_COLOR
window.needs_cursor = true
- @__version_text = CyberarmEngine::Text.new("#{IMICFPS::NAME} v#{IMICFPS::VERSION} (#{IMICFPS::RELEASE_NAME})", font: MONOSPACE_FONT)
+ @__version_text = CyberarmEngine::Text.new("#{IMICFPS::NAME} v#{IMICFPS::VERSION} (#{IMICFPS::RELEASE_NAME})", font: BOLD_SANS_FONT)
@__version_text.x = window.width - (@__version_text.width + 10)
@__version_text.y = window.height - (@__version_text.height + 10)
super(*args)
- theme({ Label: { font: SANS_SERIF_FONT } })
+ theme(
+ {
+ Label:
+ {
+ font: SANS_FONT
+ },
+ Button:
+ {
+ font: BOLD_SANS_FONT,
+ background: [0xff222222, 0xff3A3A3E],
+ border_color: [0xaa_111111, 0xaa_000000],
+ border_thickness: 2,
+ text_align: :center,
+ # color: 0xffff8800,
+ color: 0xffffffff,
+
+ hover: {
+ background: [0xff444444, 0xff5A5A5E],
+ color: 0xffeeeeee
+ },
+
+ active: {
+ color: Gosu::Color::WHITE,
+ background: [0xff222222, 0xff1A1A1E]
+ }
+ }
+ }
+ )
end
def title(text, color = Gosu::Color::BLACK)
- @elements << Text.new(text, color: color, size: 100, x: 0, y: 15, font: SANS_SERIF_FONT)
+ @elements << Text.new(text, color: color, size: 100, x: 0, y: 15, font: BOLD_SANS_FONT)
@_title = @elements.last
end
def subtitle(text, color = Gosu::Color::WHITE)
- @elements << Text.new(text, color: color, size: 50, x: 0, y: 100, font: SANS_SERIF_FONT)
+ @elements << Text.new(text, color: color, size: 50, x: 0, y: 100, font: SANS_FONT)
@_subtitle = @elements.last
end
def link(text, color = Gosu::Color.rgb(0,127,127), &block)
- text = Text.new(text, color: color, size: 50, x: 0, y: 100 + (60 * @elements.count), font: SANS_SERIF_FONT)
+ text = Text.new(text, color: color, size: 50, x: 0, y: 100 + (60 * @elements.count), font: BOLD_SANS_FONT)
@elements << Link.new(text, self, block)
end
diff --git a/maps/islands_test_map.json b/maps/islands_test_map.json
index 0cb4b76..1504c53 100644
--- a/maps/islands_test_map.json
+++ b/maps/islands_test_map.json
@@ -21,30 +21,6 @@
},
"lights":[
- {
- "type":"directional",
- "intensity": 1,
- "position": {
- "x":30,
- "y":10,
- "z":30
- },
- "diffuse": {
- "red":1,
- "green":1,
- "blue":1
- },
- "ambient": {
- "red":0.5,
- "green":0.5,
- "blue":0.5
- },
- "specular": {
- "red":0.2,
- "green":0.2,
- "blue":0.2
- }
- },
{
"type":"point",
"intensity": 1,
@@ -68,6 +44,30 @@
"green":0.2,
"blue":0.2
}
+ },
+ {
+ "type": "directional",
+ "intensity": 1,
+ "position": {
+ "x": 30,
+ "y": 10,
+ "z": 30
+ },
+ "diffuse": {
+ "red": 1,
+ "green": 1,
+ "blue": 1
+ },
+ "ambient": {
+ "red": 0.5,
+ "green": 0.5,
+ "blue": 0.5
+ },
+ "specular": {
+ "red": 0.2,
+ "green": 0.2,
+ "blue": 0.2
+ }
}
],
diff --git a/static/fonts/Cantarell/Cantarell-Bold.otf b/static/fonts/Cantarell/Cantarell-Bold.otf
new file mode 100644
index 0000000..5f94321
Binary files /dev/null and b/static/fonts/Cantarell/Cantarell-Bold.otf differ
diff --git a/static/fonts/Cantarell/Cantarell-ExtraBold.otf b/static/fonts/Cantarell/Cantarell-ExtraBold.otf
new file mode 100644
index 0000000..04fd95f
Binary files /dev/null and b/static/fonts/Cantarell/Cantarell-ExtraBold.otf differ
diff --git a/static/fonts/Cantarell/Cantarell-Light.otf b/static/fonts/Cantarell/Cantarell-Light.otf
new file mode 100644
index 0000000..4c6264d
Binary files /dev/null and b/static/fonts/Cantarell/Cantarell-Light.otf differ
diff --git a/static/fonts/Cantarell/Cantarell-Regular.otf b/static/fonts/Cantarell/Cantarell-Regular.otf
new file mode 100644
index 0000000..515a6e9
Binary files /dev/null and b/static/fonts/Cantarell/Cantarell-Regular.otf differ
diff --git a/static/fonts/Cantarell/Cantarell-Thin.otf b/static/fonts/Cantarell/Cantarell-Thin.otf
new file mode 100644
index 0000000..53830f7
Binary files /dev/null and b/static/fonts/Cantarell/Cantarell-Thin.otf differ
diff --git a/static/fonts/Cantarell/Cantarell-VF.otf b/static/fonts/Cantarell/Cantarell-VF.otf
new file mode 100644
index 0000000..5e3a82e
Binary files /dev/null and b/static/fonts/Cantarell/Cantarell-VF.otf differ
diff --git a/static/fonts/Nobile/OFL.txt b/static/fonts/Cantarell/LICENSE.txt
similarity index 84%
rename from static/fonts/Nobile/OFL.txt
rename to static/fonts/Cantarell/LICENSE.txt
index 11839fd..8b3931c 100644
--- a/static/fonts/Nobile/OFL.txt
+++ b/static/fonts/Cantarell/LICENSE.txt
@@ -1,93 +1,112 @@
-Copyright (c) 2010-2012, Vernon Adams (vern@newtypography.co.uk), with Reserved Font Name Nobile.
-
-This Font Software is licensed under the SIL Open Font License, Version 1.1.
-This license is copied below, and is also available with a FAQ at:
-http://scripts.sil.org/OFL
-
-
------------------------------------------------------------
-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
------------------------------------------------------------
-
-PREAMBLE
-The goals of the Open Font License (OFL) are to stimulate worldwide
-development of collaborative font projects, to support the font creation
-efforts of academic and linguistic communities, and to provide a free and
-open framework in which fonts may be shared and improved in partnership
-with others.
-
-The OFL allows the licensed fonts to be used, studied, modified and
-redistributed freely as long as they are not sold by themselves. The
-fonts, including any derivative works, can be bundled, embedded,
-redistributed and/or sold with any software provided that any reserved
-names are not used by derivative works. The fonts and derivatives,
-however, cannot be released under any other type of license. The
-requirement for fonts to remain under this license does not apply
-to any document created using the fonts or their derivatives.
-
-DEFINITIONS
-"Font Software" refers to the set of files released by the Copyright
-Holder(s) under this license and clearly marked as such. This may
-include source files, build scripts and documentation.
-
-"Reserved Font Name" refers to any names specified as such after the
-copyright statement(s).
-
-"Original Version" refers to the collection of Font Software components as
-distributed by the Copyright Holder(s).
-
-"Modified Version" refers to any derivative made by adding to, deleting,
-or substituting -- in part or in whole -- any of the components of the
-Original Version, by changing formats or by porting the Font Software to a
-new environment.
-
-"Author" refers to any designer, engineer, programmer, technical
-writer or other person who contributed to the Font Software.
-
-PERMISSION & CONDITIONS
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Font Software, to use, study, copy, merge, embed, modify,
-redistribute, and sell modified and unmodified copies of the Font
-Software, subject to the following conditions:
-
-1) Neither the Font Software nor any of its individual components,
-in Original or Modified Versions, may be sold by itself.
-
-2) Original or Modified Versions of the Font Software may be bundled,
-redistributed and/or sold with any software, provided that each copy
-contains the above copyright notice and this license. These can be
-included either as stand-alone text files, human-readable headers or
-in the appropriate machine-readable metadata fields within text or
-binary files as long as those fields can be easily viewed by the user.
-
-3) No Modified Version of the Font Software may use the Reserved Font
-Name(s) unless explicit written permission is granted by the corresponding
-Copyright Holder. This restriction only applies to the primary font name as
-presented to the users.
-
-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
-Software shall not be used to promote, endorse or advertise any
-Modified Version, except to acknowledge the contribution(s) of the
-Copyright Holder(s) and the Author(s) or with their explicit written
-permission.
-
-5) The Font Software, modified or unmodified, in part or in whole,
-must be distributed entirely under this license, and must not be
-distributed under any other license. The requirement for fonts to
-remain under this license does not apply to any document created
-using the Font Software.
-
-TERMINATION
-This license becomes null and void if any of the above conditions are
-not met.
-
-DISCLAIMER
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
+Copyright (c) 2009--2019, The Cantarell Authors
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
+
+-------------------------------------------------------------------------------
+
+Scripts contain parts of the source code of glyphsLib:
+
+# Copyright 2015 Google Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
diff --git a/static/fonts/Nobile/Nobile-Bold.ttf b/static/fonts/Nobile/Nobile-Bold.ttf
deleted file mode 100644
index cee7250..0000000
Binary files a/static/fonts/Nobile/Nobile-Bold.ttf and /dev/null differ
diff --git a/static/fonts/Nobile/Nobile-BoldItalic.ttf b/static/fonts/Nobile/Nobile-BoldItalic.ttf
deleted file mode 100644
index b171be5..0000000
Binary files a/static/fonts/Nobile/Nobile-BoldItalic.ttf and /dev/null differ
diff --git a/static/fonts/Nobile/Nobile-Italic.ttf b/static/fonts/Nobile/Nobile-Italic.ttf
deleted file mode 100644
index c17a6e6..0000000
Binary files a/static/fonts/Nobile/Nobile-Italic.ttf and /dev/null differ
diff --git a/static/fonts/Nobile/Nobile-Medium.ttf b/static/fonts/Nobile/Nobile-Medium.ttf
deleted file mode 100644
index ff98405..0000000
Binary files a/static/fonts/Nobile/Nobile-Medium.ttf and /dev/null differ
diff --git a/static/fonts/Nobile/Nobile-MediumItalic.ttf b/static/fonts/Nobile/Nobile-MediumItalic.ttf
deleted file mode 100644
index 98bb77e..0000000
Binary files a/static/fonts/Nobile/Nobile-MediumItalic.ttf and /dev/null differ
diff --git a/static/fonts/Nobile/Nobile-Regular.ttf b/static/fonts/Nobile/Nobile-Regular.ttf
deleted file mode 100644
index df56777..0000000
Binary files a/static/fonts/Nobile/Nobile-Regular.ttf and /dev/null differ