Jump to content
  • Advertisement
  • entries
    707
  • comments
    1173
  • views
    436773

Untitled

Sign in to follow this  
Programmer16

92 views

I started writing Chompy2D to make sure the core's graphics and input code was working as I expected (good thing I did because, of course, not all of it was.) Got to the point where I could eat food and the snake grew and I felt that was far enough. Anyway, here's a screenshot:


Then I started working on the UI. It's coming along nicely (a lot better than any of my old UI systems anyway.) I'm going the route I took the very first time I wrote a UI; I'm completely skipping skins (just for now, I'll go back and add skinning once it's all working.) The system is designed like so:

Environment
BaseControl
Button
ListView
ProgressBar
EditBox
Etc...

BaseContainer
Panel
GroupBox
TabContainer
TabPage
Dialog


When it comes to the environment, all BaseControl-derived classes must reside in a container. A panel will be added to the environment upon creation so to support free-controls.

However, the system is designed independant of the environment, so you can do exactly what I've done here; I've created 2 free controls and I'm handling them (meaning rendering and passing input) by hand. This is actually how I've designed the whole core system; from Graphics you can load textures, fonts, etc or you can do it by hand. Graphics just makes it easier and does the caching for you.

Anyway, a screenshot:


The background is still CornflowerBlue, but there is a panel over it with a background-color of argb(128, 0, 0, 0), a background-image, and a tiling ImageLayout. Currently the background-image is rendered in white, but using the alpha of the control's background-color.

The button's OnClick member is attached to my application's Button_OnClick() and shows a message box confirming the quit. The button has the default style settings, but you can change the size of the border, the color of the border, and the background-colors (normal, hover, clicked.)

I need to make a list of controls that I want so I'm not jumping around and randomly adding controls.

If I get some more controls done tomorrow I'll post some more screenshots.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!