#include <acknex.h> #include <default.c> #define PRAGMA_PATH "%EXE_DIR%\templates\images"; #define PRAGMA_PATH "%EXE_DIR%\samples"; #define PRAGMA_PATH "imgui_header" #include "imgui.h" //sky_color.red for slider int skyred=128; int skygreen=128; int skyblue=128; int draw_test=0; void synchronize_startup() { while(1) { if(draw_test==1) { draw_text("Chekbox TRUE",10,10,COLOR_RED); } sky_color.red=skyred; sky_color.green=skygreen; sky_color.blue=skyblue; wait(1); } } BMAP* b1="rock.tga"; BMAP* b2="sand.tga"; BMAP* b3="detail.tga"; BMAP* b4="display.pcx"; // show-hide handle for widnwow 1 static BOOL showWindow1 = true; void window_func() { if(showWindow1)//for show-hide window1 { #ifndef create_first_window #define create_first_window //set position and size imgui_set_next_window_pos(1, 50, ImGuiCond_Once); imgui_set_next_window_size(700, 400, ImGuiCond_Once); //create window imgui_begin("Pictures Window", &showWindow1, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse ); imgui_image(b1);//add image imgui_same_line();//add next image to same line imgui_image(b2);//add image imgui_image(b3);//add image (not same line) //add text imgui_text("Click to picture below"); //add button image if(imgui_button_img("Button Image",b4, 200, 200)) { //event printf("Test Message"); } imgui_end(); } #endif #ifndef create_second_window #define create_second_window //set position and size imgui_set_next_window_pos(screen_size.x-400, 50, ImGuiCond_Once); imgui_set_next_window_size(400, 600, ImGuiCond_Once); //create imgui_begin("Test Window", NULL, NULL); //add slider imgui_slider_int("Sky Red", skyred, 0, 255); imgui_slider_int("Sky Green", skygreen, 0, 255); imgui_slider_int("Sky Blue", skyblue, 0, 255); //add button if(imgui_button("Hide/Show Pictures window")) { //button event if(showWindow1==true) { showWindow1=false; return; } if(showWindow1==false) { showWindow1=true; } } imgui_checkbox("Test",&draw_test); imgui_end(); #endif } void loop() { imgui_start_imode(); window_func(); imgui_end_imode(); } void main() { mouse_sync = 0; mouse_pointer = 2; mouse_mode = 4; video_switch(10, 32, 2); wait(1); level_load(""); bmap_preload(b1); bmap_preload(b2); bmap_preload(b3); bmap_preload(b4); imgui_init(0); on_d3d_lost = imgui_reset; on_scanmessage = custom_scan_message; on_frame = loop; }
Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy
oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de