content top

Time – Giavapps Game Jolt API

Time – Giavapps Game Jolt API

  About Time Functions   For more info about Time functions please visit the following link: http://gamejolt.com/game-api/doc/time   Time Functions   gj_time_fetch_all() Returns the time of the Game Jolt server. This function returns the id of the HTTP request. For more info: http://gamejolt.com/game-api/doc/time/fetch/   Code Examples   Fetching Game Jolt Server Time   Create Event   gj_init("game_id","private_key");//Initializes Giavapps Game Jolt API request_user_auth = gj_user_auth("username","user_token");//Authenticates the user request_time_fetch_all = –1;//Request for fetching Game Jolt server time   Game End Event   gj_deinit();//Deinitializes Giavapps Game Jolt API   Async – HTTP Event   if(gj_http_status() != 0){exit;}//Checks if the status is complete gj_http_result();//Retrieves result data for gj_result_* functions if(gj_http_id() == request_user_auth)//Checks if the id is equal to the http request id { if(gj_result_success()) { show_debug_message("THE USER’S CREDENTIALS ARE VALID!"); request_time_fetch_all = gj_time_fetch_all();//Fetches Game Jolt server time } else { show_debug_message("THE USER’S CREDENTIALS ARE INVALID!"); } } else if(gj_http_id() == request_time_fetch_all)//Checks if the id is equal to the http request id { if(gj_result_success()) { show_debug_message("TIME HAVE BEEN FETCHED!"); for(var r=0; r<gj_result_count(); r++)//Processes all results { show_debug_message("RESULT ID "+string(r)+":"); for(var f=0; f<gj_result_field_count(); f++)//Processes all fields { show_debug_message(gj_result_field_name(f)+"="+gj_result_field_value(r, gj_result_field_name(f))); } } } else { show_debug_message("TIME HAVE NOT BEEN FETCHED!"); } }   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More

Friend – Giavapps Game Jolt API

Friend – Giavapps Game Jolt API

  About Friends Functions   For more info about Friend functions please visit the following link: http://gamejolt.com/game-api/doc/friends   Friends Functions   gj_friend_fetch_all() Returns the list of a user’s friends. This function returns the id of the HTTP request. For more info: http://gamejolt.com/game-api/doc/friends/fetch/   Code Examples   Fetching User’s Friends   Create Event   gj_init("game_id","private_key");//Initializes Giavapps Game Jolt API request_user_auth = gj_user_auth("username","user_token");//Authenticates the user request_friend_fetch_all = –1;//Request for fetching user’s friends   Game End Event   gj_deinit();//Deinitializes Giavapps Game Jolt API   Async – HTTP Event   if(gj_http_status() != 0){exit;}//Checks if the status is complete gj_http_result();//Retrieves result data for gj_result_* functions if(gj_http_id() == request_user_auth)//Checks if the id is equal to the http request id { if(gj_result_success()) { show_debug_message("THE USER’S CREDENTIALS ARE VALID!"); request_friend_fetch_all = gj_friend_fetch_all();//Fetches user’s friends } else { show_debug_message("THE USER’S CREDENTIALS ARE INVALID!"); } } else if(gj_http_id() == request_friend_fetch_all)//Checks if the id is equal to the http request id { if(gj_result_success()) { show_debug_message("FRIENDS HAVE BEEN FETCHED!"); for(var r=0; r<gj_result_count(); r++)//Processes all results { show_debug_message("RESULT ID "+string(r)+":"); for(var f=0; f<gj_result_field_count(); f++)//Processes all fields { show_debug_message(gj_result_field_name(f)+"="+gj_result_field_value(r, gj_result_field_name(f))); } } } else { show_debug_message("FRIENDS HAVE NOT BEEN FETCHED!"); } }   I am Luigi Piscopo, also known as DJ GiDeejay / Producer / Remixer in the music world. I am a Producer with a lot of experience in photo editing, video editing, audio editing, graphic design, web design, programming and...

Read More

StatusBar Class

StatusBar Class

    About StatusBar Class   StatusBar class is mainly used for creating and managing status bars.   StatusBar Class Methods   StatusBar.Create( long ParentHandle, long Style, long ExStyle ) creates a status bar. If the function succeeds, the return value is a handle to the new control. If the function fails, the return value is 0. long ParentHandle: a handle to the parent or owner control of the control being created. long Style: the style of the control being created. This parameter can be a combination of the window styles and status bar styles. long ExStyle: the extended style of the control being created. This parameter can be a combination of the extended window styles.   StatusBar.Exists( long StatusBarHandle ) returns true if the specified control was created with StatusBar.Create() method and not destroyed yet or false otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. long StatusBarHandle: status bar handle.   StatusBar.Count() returns the total number of controls created with StatusBar.Create() method and not destroyed yet. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children.   StatusBar.GetHandleByIndex( ulong StatusBarIndex ) returns the handle from an index if the specified control was created with StatusBar.Create() method and not destroyed yet or 0 otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. StatusBarIndex parameter should be less or equal to StatusBar.Count()-1. ulong StatusBarIndex: zero-based index of the status bar.   StatusBar.SetParts( long StatusBarHandle, long Parts ) sets the number of parts for the specified status bar. The function returns true if successful, or false otherwise. long StatusBarHandle: status bar handle. long Parts: number of parts to set (cannot be greater than 256).   StatusBar.GetParts( long StatusBarHandle ) returns the number of parts in a status bar. The function returns true if successful, or false otherwise. long StatusBarHandle: status bar handle.   StatusBar.SetPart( long StatusBarHandle, ulong PartIndex, long Position, long IconHandle, string Text ) sets the position, icon and text of the given part in a status bar. long StatusBarHandle: status bar handle. ulong PartIndex: zero-based index of the part. long Position: position of the part. If this parameter is -1, the right edge of the corresponding part extends to the border of the window. long IconHandle: icon handle. string Text: text of the part.   StatusBar.SetPartPosition( long StatusBarHandle, ulong PartIndex, long Position ) sets the...

Read More

ScrollBar Class

ScrollBar Class

    About ScrollBar Class   ScrollBar class is mainly used for creating and managing scroll bars.   ScrollBar Class Methods   ScrollBar.Create( long ParentHandle, long X, long Y, long Width, long Height, long Style, long ExStyle ) creates a scroll bar. If the function succeeds, the return value is a handle to the new control. If the function fails, the return value is 0. long ParentHandle: a handle to the parent or owner control of the control being created. long X: x coordinate. You can also use CW_USEDEFAULT constant for this argument. long Y: y coordinate. You can also use CW_USEDEFAULT constant for this argument. long Width: width. You can also use CW_USEDEFAULT constant for this argument. long Height: height. You can also use CW_USEDEFAULT constant for this argument. long Style: the style of the control being created. This parameter can be a combination of the window styles and scroll bar styles. long ExStyle: the extended style of the control being created. This parameter can be a combination of the extended window styles.   ScrollBar.Exists( long ScrollBarHandle ) returns true if the specified control was created with ScrollBar.Create() method and not destroyed yet or false otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. long ScrollBarHandle: scroll bar handle.   ScrollBar.Count() returns the total number of controls created with ScrollBar.Create() method and not destroyed yet. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children.   ScrollBar.GetHandleByIndex( ulong ScrollBarIndex ) returns the handle from an index if the specified control was created with ScrollBar.Create() method and not destroyed yet or 0 otherwise. Note that all child controls are destroyed when parent control is destroyed. You can also call Control.Destroy() method for destroying a specific control with all of its children. ScrollBarIndex parameter should be less or equal to ScrollBar.Count()-1. ulong ScrollBarIndex: zero-based index of the scroll bar.   ScrollBar.SetRange( long ScrollBarHandle, long Type, long Minimum, long Maximum ) sets the minimum and maximum scroll box positions for the specified scroll bar. The return value is the current position of the scroll box. long ScrollBarHandle: scroll bar handle or window handle. long Type: specifies the scroll bar type. long Minimum: the minimum scrolling position. long Maximum: the maximum scrolling position. Type parameter can be one of the following constants. SB_CTL Sets the range of a scroll bar control. The ScrollBarHandle parameter must be the handle to the scroll bar control. SB_HORZ Sets the range of a...

Read More

Menu Class

Menu Class

    About Menu Class   Menu class is mainly used for creating and managing menus.   Menu Class Methods   Menu.Add() adds a menu. The menu is initially empty. If the function succeeds, the return value is a MenuHandle. If the function fails, the return value is 0. Resources associated with a menu that is assigned to a window are freed automatically. If the menu is not assigned to a window, an application must free system resources associated with the menu before closing. An application frees menu resources by calling the Menu.Delete() function.   Menu.AddSubMenu( long MenuHandle, long Position, string Text ) adds a drop-down menu or submenu to the given menu. If the function succeeds, the return value is a MenuHandle. If the function fails, the return value is 0. long MenuHandle: menu handle. long Position: zero-based position of the new menu item. If this argument is -1, the new menu item is appended to the end of the menu. string Text: text of the submenu.   Menu.AddItem( long MenuHandle, long Position, long UncheckedBitmapHandle, long CheckedBitmapHandle, string Text ) adds a menu item to the specified drop-down menu, submenu, or shortcut menu. If the fuction succeeds, the return value is the ItemIndex or -1 otherwise. long MenuHandle: menu handle. long Position: zero-based position of the new menu item. If this argument is -1, the new menu item is appended to the end of the menu. long UncheckedBitmapHandle: the bitmap shown when the menu item is unchecked. If this parameter is 0 no bitmap is shown. long CheckedBitmapHandle: the bitmap shown when the menu item is checked. If this parameter is 0 no bitmap is shown. string Text: text of the submenu.   Menu.AddItemBitmap( long MenuHandle, long Position, long UncheckedBitmapHandle, long CheckedBitmapHandle, long BitmapHandle ) adds a menu item as a bitmap. If the fuction succeeds, the return value is the ItemIndex or -1 otherwise. long MenuHandle: menu handle. long Position: zero-based position of the new menu item. If this argument is -1, the new menu item is appended to the end of the menu. long UncheckedBitmapHandle: the bitmap shown when the menu item is unchecked. If this parameter is 0 no bitmap is shown. long CheckedBitmapHandle: the bitmap shown when the menu item is checked. If this parameter is 0 no bitmap is shown. long BitmapHandle: bitmap handle.   Menu.AddItemBarBreak( long MenuHandle, long Position ) functions the same as the Menu.AddItemBreak() a menu bar. For a drop-down menu, submenu, or shortcut menu, the new column is separated from the old column by a vertical line. If the fuction succeeds, the return value is the ItemIndex or -1 otherwise. long MenuHandle: menu handle....

Read More
content top