• entries
707
1173
• views
435681

# Untitled

73 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.

There are no comments to display.

## Create an account

Register a new account