Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Apr 2011
Offline Last Active Jun 05 2014 03:09 PM

Posts I've Made

In Topic: VS2013 Menu Item With Submenus not Disabling/Enabling

02 May 2014 - 02:54 PM

Well im not checking or unchecking menu item. Im enabling and disabling, as in greying or ungreying a menu item that contains submenus. It works on menu items by them selves and submenus, but not menu items that contain submenus.


And I know it works, because like I said in the first post, it works great on menu items and submenu items, even without using GetSubMenu(). But it does not work on menu items with the (>) symbol that contain submenus. Its very strange as to why it doesn't. I'm not using a floating menu bar. More like a menu created from a resource.

In Topic: Transparent Textured Polygons Not Working

20 March 2014 - 10:57 AM

I figured it out. It was a timing issue because i got the initial milliseconds in the MainActivity onCreate event, which was prior to loading textures. The time it took to load the textures made my timer continue to tick so it was always maxed when it came down to drawing. That why it was always opaque. So i put the time initialization in my onSurfaceCreated event and it was a flawless and beautiful fade in effect.

In Topic: Transparent Background Color Removed From Texture

09 March 2014 - 10:14 AM

I figured it out!


The solution...Photoshop. I have to freaking use photoshop to add my own transparent backgrounds. Heres what I did. Before I do anything I make my image have a purple background using RGB(255, 0 255) so the transparency works fluently. Although I can do it in photoshop, I found Microsoft Paint to be easier to fill the background with a color. Now with photoshop after opening the image, I zoom in the image using the magnifying glass from the toolbar and click "Fit to Screen" shown below the menu bar so I can see what I'm doing, just in case I notice the transparency isn't the result I expect. Then I press the "W" key to access the Magic Wand Tool and click the area I want to be transparent. If its perfect, I press Ctrl-X to cut it out. The entire background has been removed, and I save the image as a PNG. Believe it or not, it went pretty quickly if anyone plans on doing this to multiple images.


Then after I put the image in my res/drawable folder found in the Package Explore of my android eclipse project (manually created btw), which creates a resource, I pressed play aaaaand....success! The image is finally transparent. Didn't have to add some stupid shading code or add a couple for loops to remove the color I wanted pixel by pixel, which for some stupid reason is the results everyone seems to be getting on Google. Photoshop ftw!!!

In Topic: Empty Array In Structures

29 January 2014 - 05:50 PM

Well I just figured out how to load data from a file and store it into a vector declared array that is from a structure:

File.read(reinterpret_cast<char *>(Test.Myarray.data()), Test.Myarray.size());

In Topic: Empty Array In Structures

28 January 2014 - 11:52 PM

Such a royal pain to comprehend on why something so simple can be so cryptic. Back when I was learning VB6 14 years ago, doing empty arrays in structures to be redeclared later wasnt so hard:

Private Type MyStruct
     MyArray() As Byte
End Type

Dim Test As MyStruct

Private Sub Form_Load()
     ReDim Test.MyArray(10) As Byte
End Sub

Even with VB.Net theres no issue:

Public Class Form1

    Private Structure MyStruct
        Dim MyArray() As Byte
    End Structure

    Dim Test As MyStruct

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ReDim Test.MyArray(10)
    End Sub
End Class

And although itll work in C++ to use a pointer and make it an array later (I think), I still kinda find it funny that you have to go through including the library vector, using vector<your data type here>, Resizing the vector, store the address of the vector into a pointer buffer to be used as an array by static_casting<char *>, load the data into that buffer and possibly put it back into the vector array. Mega fail Microsoft on not keeping it simple.