flat assembler
Message board for the users of flat assembler.

flat assembler > Projects and Ideas > GUI Test

Author
Thread Post new topic Reply to topic
Picnic



Joined: 05 May 2007
Posts: 1246
Location: Icarian Sea
Hi,

I'm writing an othello game, working on the algorithms and the GUI in separate projects, and eventually will merge them together.

I wrote so far,
an owner drawn menu with images
a toolbar with tooltips
a right click context menu
a status bar
a resizable game area keeping a rectangle aspect ratio
an about box

Please test in windows XP/VISTA/7/8 and report any wierd or abnormal behavior you notice, any remark you have. A screenshot will be great if possible. The exe is clean, no virus inside, just an empty gui.

Thank you.

[GUI removed. project is being updated]


Last edited by Picnic on 17 Apr 2013, 06:28; edited 1 time in total
Post 19 Nov 2012, 15:09
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 7395
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
it seems nice, picnic!
waiting to play the game Wink


Description: Microsoft Windows [Version 6.1.7601]
Windows 7 SP1 64bit
Themes disabled, using classic
Filesize: 16.32 KB
Viewed: 5333 Time(s)

RIA.png


Post 19 Nov 2012, 15:24
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3475
Location: Bulgaria
Works good here: Win XP professional 32bit; Intel Core 2 Duo;

But IMHO more than 40K for this interface is pretty big.
You definitely need to optimize the size of the images.
True color for 16x16 icons is excessive. You have only 284 colors in the active toolbar and 138 in the disabled toolbar. The icon also need to be optimized. On these simple optimizations you can spare at least 20k.
Post 19 Nov 2012, 15:43
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1246
Location: Icarian Sea
@sleepsleep it won't be soon, my tempo is slow. MHajduk and YONG posting too many songs you know Razz

@JohnFound i did a quick optimize and saved immediately 1/3 of it's size. Nice tip. I haven't given much attention yet in size.

Thanks for the feedback guys.
Post 19 Nov 2012, 21:26
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 678
Location: Mar del Plata
Works well on XP SP3
Post 19 Nov 2012, 21:50
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1246
Location: Icarian Sea
^^Thanks for the response Enko.

I verified that it works good in Linux under Wine emulator.
Post 20 Nov 2012, 13:35
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 5976
Location: Poland
The GUI looks classy due to the style of the icons harmonized with the dark green and olive green colors of the game board. Smile Works perfectly in Windows 7 64-bit with one observable side effect during the resizing: the main game board and the right and down margins are separated by thick black "gaps" unless we don't release the left mouse button. After that the thick lines disappear.

Image
Post 20 Nov 2012, 20:40
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1246
Location: Icarian Sea
^^Thanks for the resposne MHajduk, i tried a lot of different icons.
Now the gap it's supposed to do that, for now, the reason is that i'm doing a size fix in WM_EXITSIZEMOVE event.
Post 20 Nov 2012, 22:34
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 7395
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
picnic,
is that you draw those grids, circles in WM_PAINT event?
Post 20 Nov 2012, 23:50
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1246
Location: Icarian Sea
hi sleepsleep, i use simple back buffer technique, drawing everything in memory and bitblt on screen in WM_PAINT event.
Post 21 Nov 2012, 06:52
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark
Which format do you store graphics in? If BMP, you could probably save quite a lot by converting to GIF - which is loadable even on relatively ancient Windows versions if you do so by OleLoadPicture (iirc for loading from resources, this includes a bit of faffing about with IID_IPicture and CreateStreamOnHGlobal - but it's not too bad, and it gives you GIF decoding for free).

EDIT: there's a topic about OleLoadPicture here, from 2004 - so GIF support should work on "quite a few Windows versions" Smile. Unfortunately it seems that I either forgot an attachment or it got lost (there were some forum attacks back in those days, and the content has also been migrated through a few forum systems). And I can't find mention of OleLoadPicture or CreateStreamOnHGlobal in any *.asm,*.c,*.cpp file on my source partition Sad - either I (accidentally?) tossed it away sometime, or I archived up some really old stuff and moved it elsewhere Smile
Post 21 Nov 2012, 21:39
View user's profile Send private message Visit poster's website Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1246
Location: Icarian Sea
hi f0dder, the images yes are in BMP format. I note your remark, i think i have used OleLoadPicture again in Visual Basic. Now i'm using image list functions for toolbar and menu icons.
Post 22 Nov 2012, 21:03
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3475
Location: Bulgaria
Fresh uses following approach for the toolbars:

1. Uses image lists, created from .gif images. For example the main toolbar contains 38 icons 16x16 in 1800bytes .gif image.
2. Disabled icons are created on the fly by the active one.
3. The whole library - gif decoder and disabled icons creator is 1616 bytes.
4. Total - maybe over 100 icons 16x16, 8 windows icons (not compressed) and 3 cursors - in 13kB resource section.
Post 22 Nov 2012, 21:33
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3172
Location: Denmark
JohnFound wrote:
1. Uses image lists, created from .gif images. For example the main toolbar contains 38 icons 16x16 in 1800bytes .gif image.
One big .gif rather than several small, the method that has been rediscovered by the web community and dubbed "CSS sprites"? It's a good (and old!) technique Smile

_________________
Image - carpe noctem
Post 22 Nov 2012, 21:51
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2018, Tomasz Grysztar.

Powered by rwasa.