예제 #1
0
 public bool ButtonImageText(NkImage img, string text, Alignment align)
 {
     fixed(char *text_ptr = text)
     {
         return(Nk.nk_button_image_text(_ctx, img, text_ptr, text.Length, align) != 0);
     }
 }
예제 #2
0
 public bool ButtonImageLabel(NkImage img, string label, Alignment align)
 {
     fixed(char *label_ptr = label)
     {
         return(Nk.nk_button_image_label(_ctx, img, label_ptr, align) != 0);
     }
 }
예제 #3
0
 public bool ComboBeginImageText(string selected, NkImage img, NkVec2 size)
 {
     fixed(char *selected_ptr = selected)
     {
         return(Nk.nk_combo_begin_image_text(_ctx, selected_ptr, selected.Length, img, size) != 0);
     }
 }
예제 #4
0
 public bool SelectImageLabel(NkImage img, string str, Alignment align, int value)
 {
     fixed(char *str_ptr = str)
     {
         return(Nk.nk_select_image_label(_ctx, img, str_ptr, align, value) != 0);
     }
 }
예제 #5
0
 public bool MenuItemImageText(NkImage img, string text, Alignment align)
 {
     fixed(char *text_ptr = text)
     {
         return(Nk.nk_menu_item_image_text(_ctx, img, text_ptr, text.Length, align) != 0);
     }
 }
예제 #6
0
 public bool SelectImageText(NkImage img, string str, Alignment align, int value)
 {
     fixed(char *str_ptr = str)
     {
         return(Nk.nk_select_image_text(_ctx, img, str_ptr, str.Length, align, value) != 0);
     }
 }
예제 #7
0
 public bool MenuBeginImageLabel(string title, Alignment align, NkImage img, NkVec2 size)
 {
     fixed(char *title_ptr = title)
     {
         return(Nk.nk_menu_begin_image_label(_ctx, title_ptr, align, img, size) != 0);
     }
 }
예제 #8
0
 public bool MenuItemImageLabel(NkImage img, string label, Alignment align)
 {
     fixed(char *label_ptr = label)
     {
         return(Nk.nk_menu_item_image_label(_ctx, img, label_ptr, align) != 0);
     }
 }
예제 #9
0
 public bool MenuBeginImage(string id, NkImage img, NkVec2 size)
 {
     fixed(char *id_ptr = id)
     {
         return(Nk.nk_menu_begin_image(_ctx, id_ptr, img, size) != 0);
     }
 }
예제 #10
0
 public bool ComboItemImageLabel(NkImage img, string text, Alignment alignment)
 {
     fixed(char *text_ptr = text)
     {
         return(Nk.nk_combo_item_image_label(_ctx, img, text_ptr, alignment) != 0);
     }
 }
예제 #11
0
 public bool ComboBeginImageLabel(string selected, NkImage img, NkVec2 size)
 {
     fixed(char *selected_ptr = selected)
     {
         return(Nk.nk_combo_begin_image_label(_ctx, selected_ptr, img, size) != 0);
     }
 }
예제 #12
0
 public bool ButtonImageLabelStyled(nk_style_button style, NkImage img, string label,
                                    Alignment text_alignment)
 {
     fixed(char *label_ptr = label)
     {
         return(Nk.nk_button_image_label_styled(_ctx, style, img, label_ptr, text_alignment) != 0);
     }
 }
예제 #13
0
        public static NkStyleItem nk_style_item_image(NkImage img)
        {
            NkStyleItem i = new NkStyleItem();

            i.Type       = (NkStyleItemType.IMAGE);
            i.Data.Image = (NkImage)(img);
            return((NkStyleItem)(i));
        }
예제 #14
0
 public bool TreeBase(NkTreeType type, NkImage img, string title, int initial_state, string hash, int line)
 {
     fixed(char *title_ptr = title)
     {
         fixed(char *hash_ptr = hash)
         {
             return(Nk.nk_tree_base(_ctx, type, img, title_ptr, initial_state, hash_ptr, hash.Length, line) != 0);
         }
     }
 }
예제 #15
0
 public bool TreeImagePushHashed(NkTreeType type, NkImage img, string title, int initial_state, string hash, int seed)
 {
     fixed(char *title_ptr = title)
     {
         fixed(char *hash_ptr = hash)
         {
             return(Nk.nk_tree_image_push_hashed(_ctx, type, img, title_ptr, initial_state, hash_ptr, hash.Length, seed) !=
                    0);
         }
     }
 }
예제 #16
0
        public static NkImage nk_image_handle(NkHandle handle)
        {
            NkImage s = new NkImage();

            s.handle    = (NkHandle)(handle);
            s.w         = (ushort)(0);
            s.h         = (ushort)(0);
            s.region[0] = (ushort)(0);
            s.region[1] = (ushort)(0);
            s.region[2] = (ushort)(0);
            s.region[3] = (ushort)(0);
            return((NkImage)(s));
        }
예제 #17
0
        public static NkImage nk_subimage_handle(NkHandle handle, ushort w, ushort h, NkRect r)
        {
            NkImage s = new NkImage();

            s.handle    = (NkHandle)(handle);
            s.w         = (ushort)(w);
            s.h         = (ushort)(h);
            s.region[0] = ((ushort)(r.x));
            s.region[1] = ((ushort)(r.y));
            s.region[2] = ((ushort)(r.w));
            s.region[3] = ((ushort)(r.h));
            return((NkImage)(s));
        }
예제 #18
0
 public void Image(NkImage img)
 {
     Nk.nk_image_(_ctx, img);
 }
예제 #19
0
 public static int nk_image_is_subimage(NkImage img)
 {
     return((int)((((img.w) == (0)) && ((img.h) == (0))) ? 1 : 0));
 }
예제 #20
0
 public bool ButtonImage(NkImage img)
 {
     return(Nk.nk_button_image(_ctx, img) != 0);
 }
예제 #21
0
 public bool ButtonImageStyled(nk_style_button style, NkImage img)
 {
     return(Nk.nk_button_image_styled(_ctx, style, img) != 0);
 }
예제 #22
0
 public bool ComboBeginImage(NkImage img, NkVec2 size)
 {
     return(Nk.nk_combo_begin_image(_ctx, img, size) != 0);
 }