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