Re: handling the visual aspect of GUI applications

The convensions often depend on the type of application, and can vary in terms of layout, presentation, utility, and artistic qualities. On the surface this might seem complicated or opaque, but its not terribly difficult to take a mathematical, geometric approach to GUI design.

Lets say, hypothetically were making an FPS. In this case you would typically have a health guage and ammo guage in one or more corners of the screen. So for sake of argument lets say you would put the health bar in the lower left, and the ammo bar in the lower right.

Let's say the size of the window is 800 by 600. Now, let's also say the health bar is 60 by 40, and the ammo gauge is 40 by 40, and that the anchor point for both images is in their lower left corners.

Now, if we want to evenly place each bar in the left and right corners of the screen, we'd want a little padding so they aren't touching the borders of the window. so you'd put the health bar at [10,10]. This puts the lower left corner 10 pixels high by 10 pixels wide away from the lower left corner, nice and smooth.

Now for the ammo bar, we would put it at [(window.width - ammo_bar.width ) -10]. Because were dealthing with the lower left corner as the anchor point of the image, we would subtract the width of the image from the size of the window, minus 10 for the padding horizontally, and 10 vertically, so: [(window.width - ammo_bar.width ) -10, 10]. That makes it nice and flush with the lower right corner, just like the health bar on the left.

There are other design conventions to go over though, depending on the application, such as purely artistic or a programmed interface layout. But utilizing geometry and bounding squares can help give a sense of the asthetics of placement with enough practice.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : defender via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : goran via Audiogames-reflector

Reply via email to