Jump to content


Photo

Controle 2.2 - Now Compatible With Gm8!


  • Please log in to reply
88 replies to this topic

#61 Hxs2007

Hxs2007

    GMC Member

  • GMC Member
  • 39 posts
  • Version:Unknown

Posted 08 February 2010 - 08:25 PM

Okay, I know I'm overlooking something here and perhaps I'm just plain wiped out but I can't seem to figure out the problem...

The problem is that the resolution is not changing due to the return value always being -1...

Perhaps someone can help me out?

here's the code...

// create an options window ONLY if options are not open
if options_open = 0
   {
   options_window = ctrl_window_create(0, 0, room_width, room_height, "Options", -1, true, false, false);
   ctrl_text_create(options_window, 35, 52, "RESOLUTION", 100, fa_left, fa_middle, false);
   options_resolution = ctrl_listbox_create(options_window, 35, 65, 100, 86, true, false, false);
   ctrl_listbox_item_add(options_resolution, "640 x 480"); // 0
   ctrl_listbox_item_add(options_resolution, "800 x 600"); // 1
   ctrl_listbox_item_add(options_resolution, "1024 x 768"); // 2
   ctrl_listbox_item_add(options_resolution, "1152 x 864"); // 3
   ctrl_listbox_item_add(options_resolution, "1280 x 720"); // 4
   ctrl_listbox_item_add(options_resolution, "1280 x 768"); // 5
   ctrl_listbox_item_add(options_resolution, "1280 x 800"); // 6
   ctrl_listbox_item_add(options_resolution, "1280 x 960"); // 7
   ctrl_listbox_item_add(options_resolution, "1280 x 1024"); // 8
   ctrl_listbox_item_add(options_resolution, "1360 x 765"); // 9
   ctrl_listbox_item_add(options_resolution, "1360 x 768"); // 10
   ctrl_listbox_item_add(options_resolution, "1440 x 900"); // 11
   ctrl_listbox_item_add(options_resolution, "1600 x 900"); // 12
   ctrl_listbox_item_add(options_resolution, "1600 x 1024"); // 13
   ctrl_listbox_item_add(options_resolution, "1680 x 1050"); // 14
   options_open = 1;
   }

ctrl_text_create(options_window, 350, 52, "SELECTED RESOLUTION: " + string(ctrl_listbox_get_selection(options_resolution)), 250, fa_center, fa_middle, false);

switch (ctrl_listbox_get_selection(options_resolution))
   {
   case 0: sin_display_set(0, 640, 480, 32, 60); break;
   case 1: sin_display_set(0, 800, 600, 32, 60); break;
   case 2: sin_display_set(0, 1024, 768, 32, 60); break;
   case 3: sin_display_set(0, 800, 600, 32, 60); break;
   case 4: sin_display_set(0, 800, 600, 32, 60); break;
   case 5: sin_display_set(0, 800, 600, 32, 60); break;
   case 6: sin_display_set(0, 800, 600, 32, 60); break;
   case 7: sin_display_set(0, 800, 600, 32, 60); break;
   case 8: sin_display_set(0, 800, 600, 32, 60); break;
   case 9: sin_display_set(0, 800, 600, 32, 60); break;
   case 10: sin_display_set(0, 800, 600, 32, 60); break;
   case 11: sin_display_set(0, 800, 600, 32, 60); break;
   case 12: sin_display_set(0, 800, 600, 32, 60); break;
   case 13: sin_display_set(0, 800, 600, 32, 60); break;
   case 14: sin_display_set(0, 1680, 1050, 32, 60); break;
   }

ctrl_event_set(options_window, ctrl_wd_close, 'options_open = 0;');

The show text part is just to see what it was returning, and it's always -1 for some reason I'm flabbergasted...


I think the listbox is working right, but the text always displays -1 because it isn't updated. You must set its text every step if you want it to show a variable.

Also, I'm rewriting this extension's code, to be compatible with GM8, fix most bugs and to be more customizable (each control can have different font/colors).

The new version will allow you to pass an expression to controls, so it's updated automatically every step.
  • 0

#62 masterm

masterm

    GMC Member

  • GMC Member
  • 1030 posts

Posted 08 February 2010 - 10:59 PM

How much will it take you to make the extension code compatible with GM8?
  • 0

#63 Postality

Postality

    GMC Member

  • New Member
  • 244 posts

Posted 09 February 2010 - 07:50 PM

Sounds good Hxs2007, I'll be looking forward to it.

Edited by Postality, 09 February 2010 - 07:51 PM.

  • 0

#64 Hxs2007

Hxs2007

    GMC Member

  • GMC Member
  • 39 posts
  • Version:Unknown

Posted 17 February 2010 - 10:54 PM

New version released! It was totally rewritten in code, it should look way better now!
See the first post and the help file for more information!

And, of course, leave feedback!
  • 0

#65 masterm

masterm

    GMC Member

  • GMC Member
  • 1030 posts

Posted 18 February 2010 - 02:40 AM

it says "error installing extension package"...with version 2.00 and 1.52
  • 0

#66 RTII

RTII

    RT

  • New Member
  • 402 posts

Posted 18 February 2010 - 05:59 PM

It works fine for me though.
Very nice extension.
Two suggestions:
- Remove the dotted rectangles from selected listbox items. They're quite useless and a waste of processing time since the listbox doesn't react to the keyboard.
- Prevent the user from dragging a child window outside the parent window
  • 0

#67 masterm

masterm

    GMC Member

  • GMC Member
  • 1030 posts

Posted 18 February 2010 - 06:10 PM

It works fine for me though.
Very nice extension.
Two suggestions:
- Remove the dotted rectangles from selected listbox items. They're quite useless and a waste of processing time since the listbox doesn't react to the keyboard.
- Prevent the user from dragging a child window outside the parent window

did you use the gm7 version or the gm8 version?
  • 0

#68 RTII

RTII

    RT

  • New Member
  • 402 posts

Posted 18 February 2010 - 06:18 PM

GM8
  • 0

#69 masterm

masterm

    GMC Member

  • GMC Member
  • 1030 posts

Posted 18 February 2010 - 06:20 PM

hmmmm strange, mine doesnt work...any suggestions what can be the cause of the problem?
  • 0

#70 Hxs2007

Hxs2007

    GMC Member

  • GMC Member
  • 39 posts
  • Version:Unknown

Posted 18 February 2010 - 08:44 PM

If you're having problems installing it, try running Game Maker as administrator (check "Run as administrator" on the properties of the Game Maker .exe)

I'm running Windows XP and it works fine here.
  • 0

#71 Postality

Postality

    GMC Member

  • New Member
  • 244 posts

Posted 24 February 2010 - 08:28 PM

Nice work, I'll be checking it out as soon as I can.

Thanx alot Hxs2007!
  • 0

#72 tsa05

tsa05

    GMC Member

  • New Member
  • 713 posts
  • Version:GM:Studio

Posted 24 February 2010 - 09:04 PM

You have no idea how hilarious this is...(but you're about to)

I just came on here to look for an alternative to this very extension, because I found it super-useful many times over the past year, but I just discovered last night that it doesn't work in GM8. And...what's the first post I see? "Controle 2.0 - Now Compatible With Gm8."

Beautiful. :) Thanks.
  • 0

#73 Kombowz

Kombowz

    GMC Member

  • GMC Member
  • 33 posts

Posted 12 March 2010 - 05:08 AM

Posted Image
  • 0

#74 Hxs2007

Hxs2007

    GMC Member

  • GMC Member
  • 39 posts
  • Version:Unknown

Posted 12 March 2010 - 05:11 PM

Posted Image


I left 2.0 so it would replace the previous version when you install it, and it's like the name of the extension: "Controle 2.0" - so you wouldn't think it's like the old ones.
  • 0

#75 Kombowz

Kombowz

    GMC Member

  • GMC Member
  • 33 posts

Posted 21 March 2010 - 04:13 PM

Gotcha, well in that case there's nothing to complain about.

Great EXT it's very useful.
  • 0

#76 The Pizza Boy

The Pizza Boy

    GMC Member

  • New Member
  • 60 posts

Posted 02 April 2010 - 03:41 AM

COMPILATION ERROR in code action
Error in code at line 9:
   if (ctrl_radio_get_selected(global.ctrl_radio_cart) != cart)
                                                     ^
at position 52: Wrong number of arguments to function or script.



...It takes one argument (id), so why am I getting this error?

Edit- The picture in the help file on Functions -> Child Windows is missing.

Edited by The Pizza Boy, 02 April 2010 - 03:44 AM.

  • 0

#77 The Pizza Boy

The Pizza Boy

    GMC Member

  • New Member
  • 60 posts

Posted 03 April 2010 - 10:55 PM

A list box's scroll bar is visible even if the list box isn't visible.
  • 0

#78 mcoot

mcoot

    GMC Member

  • New Member
  • 387 posts

Posted 05 April 2010 - 06:43 AM

Just found a small bug.

If you have a child window open with an editbox in it, and your cursor is over the editbox when the window is closed, the cursor stays as the text editing cursor (the 'I' thing), rather than changing back to the normal arrow cursor.
  • 0

#79 Hxs2007

Hxs2007

    GMC Member

  • GMC Member
  • 39 posts
  • Version:Unknown

Posted 28 April 2010 - 05:51 PM

Bump...!
  • 0

#80 General~DEST

General~DEST

    GMC Member

  • New Member
  • 5 posts

Posted 07 May 2010 - 11:32 AM

Amazing! The best I've seen! I am using this for a Math Program I am making, I will probably sell it. I am going credit you, but would you like 5% income? Just keep developing this and I could raise it to 10 or 15%. I do hope you continue to work on this project. It's a very worthwhile cause and this program is so helpful. I couldn't believe how short the code was. You coded it very efficently, and for that you deserve congratulations. I've looked at nearly every Windows GUI for Game Maker out there in the last few days, and yours bypasses them all by both functionality, features, speed, stability, and efficiently. Some of the code is a bit confusing, but it's quite managable, it just takes a little bit to learn it.

Thanks so much,
Micah
Stairs

EDIT: I can't get this to work. When I click on the Print Checkbox, I want the Number of Copies textbox to pop up.

but2=ctrl_checkbox_create(-1,-1,x+6,y+164,"Print",0)
but3=ctrl_edit_create(-1,-1,x+16,y+204,(28*3+92)-12,20,"",1)
ctrl_edit_set_help(but3,"Number Of Copies:",ctrl_place_top)
but3.visible=0
ctrl_controle_event(but2,ctrl_cb_pressed,"if ctrl_checkbox_get_checked(but2) {but2.visible=1} else {but2.visible=0}")

I get this error:

___________________________________________
ERROR in
action number 1
of Draw Event
for object __newobject9:

Error in code at line 1:
   if ctrl_checkbox_get_checked(but2) {but3.visible=1} else {but3.visible=0}
							   ^
at position 30: Unknown variable but2

EDIT2:

Figured it out. For those who are interested it is here:

but2=ctrl_edit_create(-1,-1,x+16,y+196,(28*3+92)-12,20,"",1) with ctrl_controle_inactive(but2,1);
but3=ctrl_checkbox_create(-1,-1,x+6,y+144,"Save  To File",0)
but=ctrl_checkbox_create(-1,-1,x+6,y+164,"Print",0)
ctrl_edit_set_help(but2,"Number Of Copies:",ctrl_place_top)
ctrl_controle_event(but,ctrl_cb_released,"ctrl_controle_inactive("+string(but2)+",!(argument0))")

Edited by General~DEST, 10 May 2010 - 10:54 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users