Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zooming in on maps #46

Open
langhillie opened this issue Jul 2, 2021 · 1 comment
Open

Zooming in on maps #46

langhillie opened this issue Jul 2, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@langhillie
Copy link
Contributor

For Nuke in particular, it would be nice if I could zoom in the 2d view a bit. 50% of the width are areas of the map that rarely have anyone in them (T and CT Spawn), and the rest of the map feels kind of cramped as a result.

@Linus4 Linus4 added the enhancement New feature or request label Jul 7, 2021
@Linus4
Copy link
Owner

Linus4 commented Jul 7, 2021

That's a cool idea, but I think the sdl2-gfx library draws directly using the renderer.
Using the following functions we could maybe update the updateGraphics function like this:
https://pkg.go.dev/github.com/veandco/[email protected]/sdl#Renderer.GetRenderTarget
https://pkg.go.dev/github.com/veandco/[email protected]/sdl#Renderer.Copy

func (app *app) updateGraphics {
    Clear
    drawInfobars
    Copy Map
    Draw the things
    GetRenderTarget
    Copy (portion of the map we want to zoom in on, to the original map size)
    drawString("k shows hotkeys")
    Present
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants