Jump to content

Recoil

Contributors
  • Content Count

    168
  • Donations

    $0.00 
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Recoil

    Custom SFML Control Library

    Okay, so here is a better idea of what I am having trouble with. Because a label has only text and no images, this is easy: TestLabel = New OGCLabel() Combobox on the other hand has the image for the back panel, as well as the header. This is not too bad: TestGroupbox = New OGCGroupbox(bmp1, bmp2) Button, however, have 3 images (normal/hover/down). They have an auto highlight feature, so all 3 images can be the same: TestButton = New OGCButton(bmp1, bmp1, bmp1) Here is where it is getting annoying at. The NumericUpDown has a back image for the textbox, and 3 images each for the up and down buttons. This allows people to use custom images for this control: TestNud = New OGCNumericUpDown(bmp0, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1) The scrollbar has 3 images each for the up/left, bottom/right, and thumb buttons, plus an image for the scrollbar back image: TestHorzScrollbar = New OGCScrollbar(OGCScrollbar.ScrollType.Horizontal, bmp2, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1) Which follows that standard here, with the multiline textbox. 10 images just for the scrollbar, plus one for the back of the textbox: TestChatbox = New OGCTextbox(bmp0, bmp2, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1, bmp1, True) And because regular and multiline textboxes are the same bloody class, a regular textbox MUST have all 11 images, even if they are set to Nothing: TestTextbox = New OGCTextbox(bmp0, bmp0, bmp0, bmp0, bmp0, bmp0, bmp0, bmp0, bmp0, bmp0, bmp0) Now, the whole point of going through all this trouble is to create something that can be easily customized for a plug-n-play control library. Skinning would be great, and I have some ideas for it, but will still require needing to include a folder with images in it, or a custom filetype with all the images in there (would require additional theme editor). Additional folders can be created with custom images in them, and when the control is initialized have a property that sets the name for the folder it should look for it's graphics for...but this also may cause issues if people don't have every image in there. My last idea is to do away with images altogether, and just draw all rectangle shapes, with optional parameters to set the color scheme of the shapes. So there is what I am running into...please feel free to offer some ideas. I'd prefer to stay away from stashing stuff in the resources, because that is a bugger to work with.
  2. Recoil

    Ascension Z

    This looks like you are getting off to a great start Whitespirits! I was personally never into the DBZ series, so I have no idea about the gfx, but IMO it looks good
  3. Recoil

    Custom SFML Control Library

    Controls Preview So here is the latest update. Listbox has issues with the number of items it displays, and the number is a set value in the control itself...which is not bad as long as you want every listbox to be like that. Also, if you will notice the initial starting point for the listbox displays the last section instead of at the top...so my maths are off on those, which has not been the easiest to figure out. Scrollbars need an autoshow property because right now they are always there. Chatbox (textbox with multiline set to true) is down at the bottom. I ripped word wrap functions from revamped and threw it in. I would like to have scrollbars autoshow on this as well, but it isn't even worked in. There is still so much I have to do to this. For right now I am going to concentrate on fixing the maths with the scrollbars, listbox, and textbox. Then I should be able to move on to the combobox and checkbox. I'd still like to figure out a way to bypass needing so many image ByVal's on the initialization of a few of the controls...those are to set the normal/up/down images for the buttons. Hopefully I will think of something.
  4. Recoil

    Custom SFML Control Library

    Making slight progress on this, but scrollbar maths are still screwey, so passing on that for now. Those values can still be changed by clicking the left/right or up/down buttons. I have been unable to locate any information on custom drawn control objects, and handling their events. Currently when I initialize the control, then draw it, I have to send mouse methods through when it checks the location of those controls. There is no simple way to use one of the controls and have it handle it's own mouse methods (like: mouseup/mousedown/mousemove). While what I currently have going on is a bit simpler to use than the gfx control from Revamped, they are still tedious to use. I've reached out for some help on the SFML forums but I don't believe I speak the native language of "KnowWhatTheFuzzImTalkingAbout", so it's about like trying to get help with stuff here. Listbox is next up on my list-o-things-to-do, because I require it before I can make the combobox. Anyways, just an update on the progress so far. Any questions, thoughts or feature requests just let me know.
  5. Recoil

    Introduce Yourself Thread!

    What he^^^ said
  6. In Revamped I created a control that was able to be used as both a button and a panel, which greatly reduced chunks of code. With my current project I am extending this to be a full control library that can be used for most of the Orion sources, and may be able to be used with most SFML projects. For everyone who hasn't been following along with our antics in the shoutbox, here is what I have so far: Preview Video Currently I have a Panel, Button, NumericUpDown, Groupbox, Horz/VertScrollbar(1 control). Been having some issues getting the scrollbar thumb button to adjust properly, so I will come back to it. Next in the lineup is going to be a combobox and a checkbox. This is going to be another open source project once it is done, but I would also like to include a dll that can be used easily with projects. That means I would ahve to include some gfx for all the stuffs (so if someone wants to volunteer some work with this that would be great XD ). Anyways, I wanted to get an idea of what everyone thinks so far, and any suggestion for this package.
  7. Recoil

    Why Trademark?

  8. Recoil

    Why Trademark?

    I may not be on when you get around to the shoutbox again...so why trademark? And should I trademark any of the code I have written since I have replaced/rewritten 99% of it? Seriously, I have no idea.
  9. Recoil

    Gwen and Multiline textboxes

    I could never get Gwen to work, so all my text was actually being drawn to the screen at the coordinates. Changing the font worked for what I was doing, but as far as Gwen goes it could be doing something different in the code that still inserts a [] when there is a line return char. I believe Damian was able to bypass that issue and just create a new string to draw for each line of text. It works too, so there may be a solution you could look into. All of the word wrap stuff for that is on Revamped and Orion+ though.
  10. Recoil

    Gwen and Multiline textboxes

    Try either ShareTechMono-Regular or Lucida Console (lucon). One of those did it for me I believe.
  11. Recoil

    Gwen and Multiline textboxes

    The [] is only because of the font you are using. I had to switch fonts with Revamped because of this same issue. You will have to either change the font or make a new line with the remaining text.
  12. Recoil

    [WIP] Human Base and Tiles

    You know the old saying, If they have big hands, and they have big feet,...
  13. Recoil

    [WIP] Human Base and Tiles

    I like it, and it looks pretty good IMO. The shadows give it more depth, don't remove them.
  14. Recoil

    SQL Setting Up SqLite Tables

    I'm checking things out and trying to get a feel for setting this up. My knowledge of databases is a bit rusty, and my experience was limited to working with Access DB files in Visual Studio...like 8-9 years ago. My biggest concern is the foreign key fields. Currently when I launch OTT I add/launch a campaign. Adding creates a new folder in the application directory, with an options file specific to that campaign, along with a folder that houses the map files. Maps are specific to a campaign. When the campaign is launched and on a map, I can add unique tokens to that map. So, tokens created on Map1 are not accessible on Map2 and must be recreated. They are unique to each map, and are not like separate NPC's. Campaign Table: CREATE TABLE `CAMPAIGNS` ( `CAMPAIGN_ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, `CAMPAIGN_NAME` TEXT NOT NULL DEFAULT 'New Campaign', `SETTINGS_LAST_MAP` INTEGER NOT NULL DEFAULT 1, `SETTINGS_AUTO_UPDATE_PLAYERS` INTEGER NOT NULL DEFAULT 0, `SETTINGS_MAX_MAP_X` INTEGER NOT NULL DEFAULT 27, `SETTINGS_MAX_MAP_Y` INTEGER NOT NULL DEFAULT 15, `SETTINGS_RESOLUTION` INTEGER NOT NULL DEFAULT 0, `TIME_LAST_HOUR` INTEGER NOT NULL DEFAULT 9, `TIME_LAST_MINUTE` INTEGER NOT NULL DEFAULT 0, `LEVELS_DAWN` INTEGER NOT NULL DEFAULT 180, `LEVELS_MIDDAY` INTEGER NOT NULL DEFAULT 0, `LEVELS_DUSK` INTEGER NOT NULL DEFAULT 180, `LEVELS_NIGHT` INTEGER NOT NULL DEFAULT 200, `LEVELS_CAVE` INTEGER NOT NULL DEFAULT 220, `GRID_SHOW_GRID_LINES` INTEGER NOT NULL DEFAULT 1, `GRID_RED_VALUE` INTEGER NOT NULL DEFAULT 255, `GRID_GREEN_VALUE` INTEGER NOT NULL DEFAULT 255, `GRID_BLUE_VALUE` INTEGER NOT NULL DEFAULT 255, `GRID_OPACITY` INTEGER NOT NULL DEFAULT 255, `LAYERS_TILES_AUTO_SHADOW` INTEGER NOT NULL DEFAULT 1, `LAYERS_GROUND_OPACITY` INTEGER NOT NULL DEFAULT 255, `LAYERS_CLUTTER_OPACITY` INTEGER NOT NULL DEFAULT 255, `LAYERS_WALLS_OPACITY` INTEGER NOT NULL DEFAULT 255, `LAYERS_SHADOWS_OPACITY` INTEGER NOT NULL DEFAULT 255, `LAYERS_OVERHEAD_OPACITY` INTEGER NOT NULL DEFAULT 255, `LAYERS_FOW_OPACITY` INTEGER NOT NULL DEFAULT 255, `TOKENS_SHOW_TOKENS` INTEGER NOT NULL DEFAULT 1, `TOKENS_TOKEN_OPACITY` INTEGER NOT NULL DEFAULT 255 ) In my Maps Table, I have an extra field for the Campaign_ID that a map is tied to [ ForeignKey: `CAMPAIGNS`(`CAMPAIGN_ID`) ]. My understanding is that when launched into the campaign it will only be able to display maps specific to that campaign: Maps Table: CREATE TABLE "MAPS" ( `MAP_ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, `MAP_CAMPAIGN_ID` INTEGER NOT NULL, `MAP_NAME` TEXT NOT NULL DEFAULT 'Empty', `MAP_REVISION` INTEGER NOT NULL DEFAULT 0, `MAP_TILESET` INTEGER NOT NULL DEFAULT 0, `MAP_TYPE` INTEGER NOT NULL DEFAULT 0, `MAP_NORTH` INTEGER NOT NULL DEFAULT 0, `MAP_SOUTH` INTEGER NOT NULL DEFAULT 0, `MAP_WEST` INTEGER NOT NULL DEFAULT 0, `MAP_EAST` INTEGER NOT NULL DEFAULT 0, `MAP_MAX_X` INTEGER NOT NULL DEFAULT 27, `MAP_MAX_Y` INTEGER NOT NULL DEFAULT 15, `MAP_TILES` BLOB, FOREIGN KEY(`MAP_CAMPAIGN_ID`) REFERENCES CAMPAIGNS(CAMPAIGN_ID) ) Likewise, in my Tokens Table, there is an extra field for the MAP_ID that this token is tied to [ ForeignKey: `MAPS`(`MAP_ID`) ]. When on the map it will only select the Tokens specific to that map: Tokens Table CREATE TABLE "TOKENS" ( `TOKEN_ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, `TOKEN_MAP_ID` INTEGER NOT NULL, `TOKEN_NAME` TEXT NOT NULL DEFAULT 'Token', `TOKEN_SPRITE` INTEGER NOT NULL DEFAULT 0, `TOKEN_X` INTEGER NOT NULL DEFAULT 0, `TOKEN_Y` INTEGER NOT NULL DEFAULT 0, `TOKEN_DIR` INTEGER NOT NULL DEFAULT 0, `TOKEN_SCALE` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY(`TOKEN_MAP_ID`) REFERENCES MAPS(MAP_ID) ) In my experience, databases is not something you can really "wing-it" on, and work so much better when they are mapped out properly ahead of time. So...I would like some advice on what I currently have setup. Also, I am still unsure how I am going to go about the layers and tiles when saving and loading the maps. I have that set to a BLOB data field [ `MAP_TILES` BLOB, ], but how am I supposed to compile the list of stuff that will go in there to save it, as well as read it back out when I am loading the map?
  15. Recoil

    List(of T)

    On initial startup, I am doing this now, which is cleaner, but still does the same thing as I was doing before: Friend Sub CheckMaps() ' Create the initial list of map names for cboMapWarp. MapNameList = New List(Of String)() MapNameList.Clear() MapNameList.Add("None") ' Create new initial list of maps. Map = New List(Of Maps) ' Check each file in the directory. For Each MapFile In Directory.GetFiles(Application.StartupPath & "\Data Files\Campaigns\" & CampaignName & "\Maps\") 'Map" & i & MapExt) ' If it has the MapExt then add it to our count. If MapFile.EndsWith(MapExt) Then MapCount += 1 ' Open up a space in our list. Map.Add(New Maps) ' - By itself causes out of range exception: CheckMap -> FileGetObject(f, Map(mapNum).Name) End If Next ' Check if we are first starting a new campaign and there are no maps. If MapCount = 0 Then MakeNewMap(1) End If End Sub On a new campaign, there are no maps in the directory, so I have to make one: Private Sub MakeNewMap(ByVal mapNum As Long) ' If not let's create the next map in our index. MapCount += 1 ' Open up a space in our list. Map.Add(New Maps) ' Save the newly create map. SaveMap(mapNum) End Sub I am getting my error on the bottom of this: Private Sub SaveMap(ByVal mapNum As Long) ' Note: Do not use this method outside of this module...use SetSaveMap instead. Dim fileName As String = Application.StartupPath & "\Data Files\Campaigns\" & CampaignName & "\Maps\" & "Map" & mapNum & MapExt Dim f As Long Dim x As Long Dim y As Long f = FreeFile() FileOpen(f, fileName, OpenMode.Binary, OpenAccess.Write, OpenShare.Default) FilePutObject(f, Map(mapNum).Name) Auto Locals: Map : Count=1 f : 1 mapnum : 1 The filename is correct, it creates Map1.map in the directory when it has this error...so I restart, and on loading Map1.map, it errors on load, on the same Map(mapNum).Name when it is getting it.
×