mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 19:58:54 +01:00
examples/windowsize: Better instruction message
This commit is contained in:
parent
bc3d1393a6
commit
844dbc4a9b
@ -295,38 +295,38 @@ func (g *game) Draw(screen *ebiten.Image) {
|
|||||||
|
|
||||||
var lines []string
|
var lines []string
|
||||||
if !ebiten.IsWindowMaximized() {
|
if !ebiten.IsWindowMaximized() {
|
||||||
lines = append(lines, "Press M key to maximize the window")
|
lines = append(lines, "[M] Maximize the window")
|
||||||
}
|
}
|
||||||
if !ebiten.IsWindowMinimized() {
|
if !ebiten.IsWindowMinimized() {
|
||||||
lines = append(lines, "Press I key to minimize the window")
|
lines = append(lines, "[I] Minimize the window")
|
||||||
}
|
}
|
||||||
if ebiten.IsWindowMaximized() || ebiten.IsWindowMinimized() {
|
if ebiten.IsWindowMaximized() || ebiten.IsWindowMinimized() {
|
||||||
lines = append(lines, "Press E key to restore the window from maximized/minimized state")
|
lines = append(lines, "[E] Restore the window from maximized/minimized state")
|
||||||
}
|
}
|
||||||
msgM := strings.Join(lines, "\n")
|
msgM := strings.Join(lines, "\n")
|
||||||
|
|
||||||
var msgS string
|
var msgS string
|
||||||
var msgR string
|
var msgR string
|
||||||
if *flagLegacy {
|
if *flagLegacy {
|
||||||
msgS = "Press S key to change the window scale (only for desktops)\n"
|
msgS = "[S] Change the window scale (only for desktops)\n"
|
||||||
} else {
|
} else {
|
||||||
msgR = "Press R key to switch the window resizable state (only for desktops)\n"
|
msgR = "[R] Switch the window resizable state (only for desktops)\n"
|
||||||
}
|
}
|
||||||
fg := "Yes"
|
fg := "Yes"
|
||||||
if !ebiten.IsFocused() {
|
if !ebiten.IsFocused() {
|
||||||
fg = "No"
|
fg = "No"
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := fmt.Sprintf(`Press arrow keys to move the window
|
msg := fmt.Sprintf(`[Arrow keys] Move the window
|
||||||
Press shift + arrow keys to change the window size
|
[Shift + Arrow keys] Change the window size
|
||||||
%sPress F key to switch the fullscreen state (only for desktops)
|
%s[F] Switch the fullscreen state (only for desktops)
|
||||||
Press U key to switch the runnable-on-unfocused state
|
[U] Switch the runnable-on-unfocused state
|
||||||
Press C key to switch the cursor visibility
|
[C] Switch the cursor visibility
|
||||||
Press I key to change the window icon (only for desktops)
|
[I] Change the window icon (only for desktops)
|
||||||
Press V key to switch vsync
|
[V] Switch vsync
|
||||||
Press T key to switch TPS (ticks per second)
|
[T] Switch TPS (ticks per second)
|
||||||
Press D key to switch the window decoration (only for desktops)
|
[D] Switch the window decoration (only for desktops)
|
||||||
Press L key to switch the window floating state (only for desktops)
|
[L] Switch the window floating state (only for desktops)
|
||||||
%s
|
%s
|
||||||
%s
|
%s
|
||||||
IsFocused?: %s
|
IsFocused?: %s
|
||||||
|
Loading…
Reference in New Issue
Block a user