framerate indicator position
This commit is contained in:
parent
314b722528
commit
d00e434c63
|
@ -85,6 +85,7 @@ class Configuration(RawConfigParser):
|
||||||
set_option(section, "framerate-text-size", "16", False)
|
set_option(section, "framerate-text-size", "16", False)
|
||||||
set_option(section, "framerate-text-color", "0, 0, 0", False)
|
set_option(section, "framerate-text-color", "0, 0, 0", False)
|
||||||
set_option(section, "framerate-text-background", "255, 255, 255", False)
|
set_option(section, "framerate-text-background", "255, 255, 255", False)
|
||||||
|
set_option(section, "framerate-position", "-1, 0", False)
|
||||||
set_option(section, "use-framebuffer", "no", False)
|
set_option(section, "use-framebuffer", "no", False)
|
||||||
section = "input"
|
section = "input"
|
||||||
add_section(section)
|
add_section(section)
|
||||||
|
@ -411,14 +412,11 @@ class TypeDeclarations(dict):
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
|
||||||
"display": {"int": ["frame-duration", "wait-duration",
|
"display": {"int": ["frame-duration", "wait-duration", "framerate-text-size"],
|
||||||
"framerate-text-size"],
|
|
||||||
|
|
||||||
"bool": ["centered", "skip-frames", "fullscreen",
|
"bool": ["centered", "skip-frames", "fullscreen", "show-framerate", "use-framebuffer"],
|
||||||
"show-framerate", "use-framebuffer"],
|
|
||||||
|
|
||||||
"int-list": ["dimensions", "framerate-text-color",
|
"int-list": ["dimensions", "framerate-text-color", "framerate-text-background", "framerate-position"]},
|
||||||
"framerate-text-background"]},
|
|
||||||
|
|
||||||
"input": {"bool": "confirm-quit"},
|
"input": {"bool": "confirm-quit"},
|
||||||
|
|
||||||
|
@ -430,13 +428,10 @@ class TypeDeclarations(dict):
|
||||||
|
|
||||||
"bool": ["enable", "record-audio"]},
|
"bool": ["enable", "record-audio"]},
|
||||||
|
|
||||||
"setup": {"list": ["classifiers", "resource-search-path",
|
"setup": {"list": ["classifiers", "resource-search-path", "requirements", "data-exclude", "additional-packages", "osx-includes",
|
||||||
"requirements", "data-exclude",
|
"boolean-true-lowercase"],
|
||||||
"additional-packages", "osx-includes", "boolean-true-lowercase"],
|
|
||||||
|
|
||||||
"path": ["installation-dir", "changelog", "description-file",
|
"path": ["installation-dir", "changelog", "description-file", "main-object", "icon-path", "windows-dist-path", "package-root"]},
|
||||||
"main-object", "icon-path", "windows-dist-path",
|
|
||||||
"package-root"]},
|
|
||||||
|
|
||||||
"mouse": {"float": "double-click-time-limit",
|
"mouse": {"float": "double-click-time-limit",
|
||||||
|
|
||||||
|
@ -444,8 +439,7 @@ class TypeDeclarations(dict):
|
||||||
|
|
||||||
"keys": {"list": ["up", "right", "down", "left"]},
|
"keys": {"list": ["up", "right", "down", "left"]},
|
||||||
|
|
||||||
"joy": {"int": ["advance", "pause", "select", "vertical-axis",
|
"joy": {"int": ["advance", "pause", "select", "vertical-axis", "horizontal-axis"],
|
||||||
"horizontal-axis"],
|
|
||||||
|
|
||||||
"float": "delay-axis",
|
"float": "delay-axis",
|
||||||
|
|
||||||
|
@ -457,10 +451,7 @@ class TypeDeclarations(dict):
|
||||||
|
|
||||||
"path": "panel-font",
|
"path": "panel-font",
|
||||||
|
|
||||||
"path-list": [
|
"path-list": ["sfx-default-path", "sfx-repository-path", "sfx-project-path", "bgm-repository-path", "bgm-project-path"],
|
||||||
"sfx-default-path", "sfx-repository-path", "sfx-project-path",
|
|
||||||
"bgm-repository-path", "bgm-project-path"
|
|
||||||
],
|
|
||||||
|
|
||||||
"float": ["sfx-volume", "bgm-volume", "volume"],
|
"float": ["sfx-volume", "bgm-volume", "volume"],
|
||||||
|
|
||||||
|
@ -470,15 +461,10 @@ class TypeDeclarations(dict):
|
||||||
|
|
||||||
"event": {"int": "command-id-offset"},
|
"event": {"int": "command-id-offset"},
|
||||||
|
|
||||||
"interpolator-gui": {"int": ["margin", "marker-size", "label-size",
|
"interpolator-gui": {"int": ["margin", "marker-size", "label-size", "axis-label-count", "label-precision", "prompt-border-width",
|
||||||
"axis-label-count", "label-precision",
|
"prompt-character-limit", "prompt-text-size", "flat-y-range"],
|
||||||
"prompt-border-width",
|
|
||||||
"prompt-character-limit",
|
|
||||||
"prompt-text-size", "flat-y-range"],
|
|
||||||
|
|
||||||
"int-list": ["marker-color", "curve-color",
|
"int-list": ["marker-color", "curve-color", "prompt-size", "prompt-border-color"]},
|
||||||
"prompt-size",
|
|
||||||
"prompt-border-color"]},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,9 @@ class Mainloop(GameChild):
|
||||||
if self.framerate_display_active():
|
if self.framerate_display_active():
|
||||||
screen = self.get_screen()
|
screen = self.get_screen()
|
||||||
self.last_framerate_count = 0
|
self.last_framerate_count = 0
|
||||||
self.framerate_topright = screen.get_rect().topright
|
self.framerate_topright = self.get_configuration("display", "framerate-position")
|
||||||
|
if self.framerate_topright[0] == -1:
|
||||||
|
self.framerate_topright[0] = screen.get_rect().right
|
||||||
self.display_surface = screen
|
self.display_surface = screen
|
||||||
self.font = Font(None, self.framerate_text_size)
|
self.font = Font(None, self.framerate_text_size)
|
||||||
self.font.set_bold(True)
|
self.font.set_bold(True)
|
||||||
|
|
Loading…
Reference in New Issue