KwikStrip rewrite

Stuff you want Bio to see. [Home]

Moderator: BioHazard

User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

KwikStrip rewrite

Post by BioHazard »

KwikStrip2 ALPHA 3

Questions:
  • Any options I missed?
  • Should right-clicking pop up a menu with "Preferences" and "Exit" pop up or should I make double-right-clicking bring up the config window?
Known Bugs:
  • Buttons will get stuck in the down state if you hold it down and move off the window. NOT FIXABLE
  • The item pointer matrix is extremly sensitive, please let me know of any problems
Changelog
  • *-- Oct 9th 2005 --*
  • W00T! : Released Alpha 3
  • Added:Space opens/closes the strip
  • Fixed:INI spaces bug
  • Fixed:Inefficent stuff (saving loop, loading loop)
  • Added:New INI system
  • Fixed:The button-deleting loop in Dlg_DeleteStuff() didn't run properly
  • Fixed:Cfg_DeleteButton() Didn't actually delete buttons :/
  • Fixed:Allocated buffers were 1 char too short (took 2 hours to get this one! >.<)
  • Change:Condensed Code
  • Fixed:Button changes presist on cancel
  • Fixed:Icon didn't redraw on false-click

    *-- Oct 8th 2005 --*
  • Remove:Icon caching (always on now)
  • Added:Item system started
  • Added:Shift-click button to enter extra args on the fly
  • Added:Ctrl-click button to supress defined args for a program
  • Change:Old skins put in skin pack

    *-- Oct 7th 2005 --*
  • Fixed:Made the OK button on the config dialog the default button
  • Change:Config dialog changed to suit skin system
  • Change:New skin system finished
  • Change:Re-ordered resource IDs to be more logical
  • Added:Config files can now be loaded on the command line

    *-- Oct 6th 2005 --*
  • Change:Rewrote the file searches to use the true KS dir as ./
  • Change:New skin system started
  • Added:Item parser started
  • Drop:Linked list item system, strips limited to 128 buttons

    *-- Oct 5th 2005 --*
  • W00T! : Alpha 2 released!
  • Fixed:If you were running dual monitors, the open/close animation would be funky
  • Fixed:If you had your taskbar on the top or right, the strip would get stuck behind the taskbar
  • Added:Finished INI reading and config dialog
  • Added:Y offset value
  • Added:User skins with skin.bmp
  • Change:Config dialog re-arrangment
  • Drop:User sounds

    *-- Oct 4th 2005 --*
  • Fixed:Sometimes sounds didn't play
  • Added:Username-based ini files. (a'la ZDoom) (kwikstrip-username.ini)
  • Change:Procedures broken up into seperate functions and exported to other files
  • Added:INI writing finished
Source Preview:

Code: Select all

void Dlg_LeftDown(HWND dlg,int pos){
	vr.hover = ((pos+(vr.btnsz/2))/vr.btnsz)-1;
	// Draw the down state
	if(vr.hover!=-1){ // Handle regular buttons
		BitBlt(buf,(BTN_SIZE/2)+(BTN_SIZE*vr.hover),0,BTN_SIZE,BTN_SIZE,gfx,GFX_BTN+GFX_DWN,0,SRCCOPY);
		DrawIconEx(buf,((BTN_SIZE/2)+(BTN_SIZE*vr.hover))+3,3,itm[vr.hover]->icn,32,32,0,NULL,DI_NORMAL);
	}else{ // Handle the open button
		// Display the right button depending on the strip state
		if(vr.open){BitBlt(buf,0,0,BTN_SIZE/2,BTN_SIZE,gfx,GFX_CLS+GFX_DWN,0,SRCCOPY);}
		else{BitBlt(buf,0,0,BTN_SIZE/2,BTN_SIZE,gfx,GFX_OPN+GFX_DWN,0,SRCCOPY);}
	}
	if(vr.sound){PlaySound(MAKEINTRESOURCE(SND_CLICK),GetModuleHandle(NULL),SND_RESOURCE);}
	SendMessage(dlg,WM_PAINT,0,0);
}
Stats:
  • 765 lines of code over 5 files
  • 3 .c (21.1KB)
  • 1 .h (3.2KB)
  • 1 .rc (3.79KB)
  • 5 resource files (6.35KB)
Last edited by BioHazard on Tue Oct 11, 2005 0:49, edited 2 times in total.
Shadow
Posts: 6
Joined: Tue Aug 02, 2005 22:27

Post by Shadow »

Hello, BioHazard. I thought you might be able to use some feedback. :-)
* Any options I missed?
None that I see, but If anyone else can think of anything, please be sure to post.
* Should right-clicking pop up a menu with "Preferences" and "Exit" pop up or should I make double-right-clicking bring up the config window?
Personally, the menu with preferences can be easier on the user. Double clicking with the right mouse button could potentially throw the user off if the user is used to a tray-icon sort of control style.
* Should I write a ton of code to minimize the memory usage to save ~768 bytes per button?
Having looked at the size of the file, I doubt it would be necessary to do this, because it'll be a small-yet-efficient file when it's finally configurable by the user. Besides, the code looks like it's a small, neat bundle. Why add tons of code just to save a few bytes for buttons? Save the space and use it to finish a great program. :-)
* Must I make it come out of the left side of the screen too? (I hope not, it's bad enough with all the current math)
Well, this one should be answered by popular demand. IMO, though, I don't see the need for a left-sided launcher.

Good Luck, BioHazard! I hope this helps. :-)
User avatar
Hobbs
Posts: 61
Joined: Sun Aug 07, 2005 22:15

Post by Hobbs »

YES! Anyway, for an alpha, its a very good program. You *may* wan't to make the options interface a bit easier to use, but thats up to you (and how you do it if you do it is up to you too). Anyway, IMO you neither need to cut down anymore on the memory, or make it for the left side either. The way it is now is just fine.
User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

Post by BioHazard »

Hobbs wrote:make the options interface a bit easier to use
What's wrong with it? Please be specific.
User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

Post by BioHazard »

Changelog info
  • Fixed: Sometimes sounds didn't play.
  • Added: Username-based ini files. (a'la ZDoom) (kwikstrip-username.ini)
  • Changed: Procedures broken up into seperate functions and exported to other files
  • Added: INI writing finished.
MasterOFDeath
Posts: 125
Joined: Wed Jul 06, 2005 17:52

Post by MasterOFDeath »

I come back from a long hiatus away from the doom community for 5 minuites and see this! It is about damn time! :D

[EDIT]Yay, always on top. Also some of the new features like sounds and skin color are cool (although I'm not racist).

I know I shouldn't be asking this juuuust yet, but sometime in the distant future, would making our own skins be possible?
User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

Post by BioHazard »

Yes, you can put a BMP file called "skin.bmp" in the KS dir and it will use it for a skin. The same thing works for the sounds. ("up.wav" and "down.wav")
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

Hey, I like what I see here. I might just keep this running all the time (like SysMetrix). I didn't check to see if I could move the strip to the bottom-right corner of the screen though...
User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

Post by BioHazard »

wildweasel wrote:I might just keep this running all the time (like SysMetrix).
That's it's intended usage. That's why I'm going crazy about saving memory.
wildweasel wrote:I didn't check to see if I could move the strip to the bottom-right corner of the screen though...
I can make it clip to the bottom without too much trouble but please don't ask for left placement.

Actually, I can make it come out anywhere on the right side pretty easily. Would you like a "Y Offset" option? Or just "Clip to bottom"?
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

A Y-Offset would be the better idea - I have an idea about sticking it just beneath my Sysmetrix display. See the screenshot:
Image
User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

Post by BioHazard »

Changelog info
  • W00T! \o/:Alpha 2 released!
  • Fixed: If you were running dual monitors, the open/close animation would be funky.
  • Fixed: If you had your taskbar on the top or right, the strip would get stuck behind the taskbar.
  • Added: Finished INI reading and config dialog
  • Added: Y offset value
  • Added: User skins with skin.bmp
  • Changed: Config dialog re-arrangment
  • Dropped: User sounds
Todo
  • Item system (duh)
  • Pallette translated skins (to save 40KB of memory) (HELP REQUESTED (GDI))
User avatar
Hobbs
Posts: 61
Joined: Sun Aug 07, 2005 22:15

Post by Hobbs »

\o/ Bio did all that, plus about 25 other bugfixes/minor additions additions that only a dedicated programmer like Bio could do. :D

Anyway, Time to look at Alpha 2, I'll get back to the awesome programmer when I take a good hard look at it (and get done with the school day).

EDIT: I have a few questions to ask you later. Actually its a bunch, which is why I'm not going to spend my last class period doing just that (and I have 12 hours at home to work on getting it typed)

EDIT2: Issues resolved, er, sorta.
Last edited by Hobbs on Fri Oct 07, 2005 7:32, edited 1 time in total.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

Weasel is wholly satisfied with the program so far. I can't wait 'til it actually supports adding programs to it (so I can get rid of XP's default QuickLaunch toolbar).
User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

Post by BioHazard »

Check out the first post.
Last edited by BioHazard on Tue Oct 11, 2005 2:19, edited 2 times in total.
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post by wildweasel »

I'm not entirely sure if adding items to the Strip works yet. The Add button is greyed out, yet the changelog says you added the item system (not sure what this means?).

Also, I managed to crash it by pressing on the Delete, Up and Down buttons with no items in the list.
Locked

Return to “Bio's Site-Place”